Augmentation vers version 3.3.0
This commit is contained in:
25
vendor/symfony/http-kernel/Profiler/Profile.php
vendored
25
vendor/symfony/http-kernel/Profiler/Profile.php
vendored
@@ -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 = [];
|
||||
|
||||
/**
|
||||
* @param string $token The token
|
||||
@@ -74,7 +74,7 @@ class Profile
|
||||
/**
|
||||
* Sets the parent token.
|
||||
*/
|
||||
public function setParent(Profile $parent)
|
||||
public function setParent(self $parent)
|
||||
{
|
||||
$this->parent = $parent;
|
||||
}
|
||||
@@ -102,7 +102,7 @@ class Profile
|
||||
/**
|
||||
* Returns the IP.
|
||||
*
|
||||
* @return string The IP
|
||||
* @return string|null The IP
|
||||
*/
|
||||
public function getIp()
|
||||
{
|
||||
@@ -122,7 +122,7 @@ class Profile
|
||||
/**
|
||||
* Returns the request method.
|
||||
*
|
||||
* @return string The request method
|
||||
* @return string|null The request method
|
||||
*/
|
||||
public function getMethod()
|
||||
{
|
||||
@@ -137,13 +137,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;
|
||||
@@ -180,7 +183,7 @@ class Profile
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
* @return int|null
|
||||
*/
|
||||
public function getStatusCode()
|
||||
{
|
||||
@@ -204,7 +207,7 @@ class Profile
|
||||
*/
|
||||
public function setChildren(array $children)
|
||||
{
|
||||
$this->children = array();
|
||||
$this->children = [];
|
||||
foreach ($children as $child) {
|
||||
$this->addChild($child);
|
||||
}
|
||||
@@ -213,7 +216,7 @@ class Profile
|
||||
/**
|
||||
* Adds the child token.
|
||||
*/
|
||||
public function addChild(Profile $child)
|
||||
public function addChild(self $child)
|
||||
{
|
||||
$this->children[] = $child;
|
||||
$child->setParent($this);
|
||||
@@ -254,7 +257,7 @@ class Profile
|
||||
*/
|
||||
public function setCollectors(array $collectors)
|
||||
{
|
||||
$this->collectors = array();
|
||||
$this->collectors = [];
|
||||
foreach ($collectors as $collector) {
|
||||
$this->addCollector($collector);
|
||||
}
|
||||
@@ -282,6 +285,6 @@ class Profile
|
||||
|
||||
public function __sleep()
|
||||
{
|
||||
return array('token', 'parent', 'children', 'collectors', 'ip', 'method', 'url', 'time');
|
||||
return ['token', 'parent', 'children', 'collectors', 'ip', 'method', 'url', 'time', 'statusCode'];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user