updated-packages

This commit is contained in:
RafficMohammed
2023-01-08 00:13:22 +05:30
parent 3ff7df7487
commit da241bacb6
12659 changed files with 563377 additions and 510538 deletions

View File

@@ -25,7 +25,7 @@ class Profile
/**
* @var DataCollectorInterface[]
*/
private $collectors = array();
private $collectors = [];
private $ip;
private $method;
@@ -41,7 +41,7 @@ class Profile
/**
* @var Profile[]
*/
private $children = array();
private $children = [];
public function __construct(string $token)
{
@@ -99,7 +99,7 @@ class Profile
/**
* Returns the IP.
*
* @return string The IP
* @return string|null The IP
*/
public function getIp()
{
@@ -119,7 +119,7 @@ class Profile
/**
* Returns the request method.
*
* @return string The request method
* @return string|null The request method
*/
public function getMethod()
{
@@ -134,13 +134,16 @@ class Profile
/**
* Returns the URL.
*
* @return string The URL
* @return string|null The URL
*/
public function getUrl()
{
return $this->url;
}
/**
* @param string $url
*/
public function setUrl($url)
{
$this->url = $url;
@@ -153,11 +156,7 @@ class Profile
*/
public function getTime()
{
if (null === $this->time) {
return 0;
}
return $this->time;
return $this->time ?? 0;
}
/**
@@ -177,7 +176,7 @@ class Profile
}
/**
* @return int
* @return int|null
*/
public function getStatusCode()
{
@@ -201,7 +200,7 @@ class Profile
*/
public function setChildren(array $children)
{
$this->children = array();
$this->children = [];
foreach ($children as $child) {
$this->addChild($child);
}
@@ -262,7 +261,7 @@ class Profile
*/
public function setCollectors(array $collectors)
{
$this->collectors = array();
$this->collectors = [];
foreach ($collectors as $collector) {
$this->addCollector($collector);
}
@@ -288,8 +287,11 @@ class Profile
return isset($this->collectors[$name]);
}
/**
* @return array
*/
public function __sleep()
{
return array('token', 'parent', 'children', 'collectors', 'ip', 'method', 'url', 'time', 'statusCode');
return ['token', 'parent', 'children', 'collectors', 'ip', 'method', 'url', 'time', 'statusCode'];
}
}