summaryrefslogtreecommitdiff
path: root/vendor/symfony/http-kernel/Profiler
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/http-kernel/Profiler')
-rw-r--r--vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php16
-rw-r--r--vendor/symfony/http-kernel/Profiler/Profile.php10
-rw-r--r--vendor/symfony/http-kernel/Profiler/Profiler.php8
3 files changed, 17 insertions, 17 deletions
diff --git a/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php b/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php
index 955afed580..863998fd31 100644
--- a/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php
+++ b/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php
@@ -52,13 +52,13 @@ class FileProfilerStorage implements ProfilerStorageInterface
$file = $this->getIndexFilename();
if (!file_exists($file)) {
- return array();
+ return [];
}
$file = fopen($file, 'r');
fseek($file, 0, SEEK_END);
- $result = array();
+ $result = [];
while (\count($result) < $limit && $line = $this->readLineFromFile($file)) {
$values = str_getcsv($line);
list($csvToken, $csvIp, $csvMethod, $csvUrl, $csvTime, $csvParent, $csvStatusCode) = $values;
@@ -76,7 +76,7 @@ class FileProfilerStorage implements ProfilerStorageInterface
continue;
}
- $result[$csvToken] = array(
+ $result[$csvToken] = [
'token' => $csvToken,
'ip' => $csvIp,
'method' => $csvMethod,
@@ -84,7 +84,7 @@ class FileProfilerStorage implements ProfilerStorageInterface
'time' => $csvTime,
'parent' => $csvParent,
'status_code' => $csvStatusCode,
- );
+ ];
}
fclose($file);
@@ -149,7 +149,7 @@ class FileProfilerStorage implements ProfilerStorageInterface
}, $profile->getChildren()));
// Store profile
- $data = array(
+ $data = [
'token' => $profileToken,
'parent' => $parentToken,
'children' => $childrenToken,
@@ -159,7 +159,7 @@ class FileProfilerStorage implements ProfilerStorageInterface
'url' => $profile->getUrl(),
'time' => $profile->getTime(),
'status_code' => $profile->getStatusCode(),
- );
+ ];
if (false === file_put_contents($file, serialize($data))) {
return false;
@@ -171,7 +171,7 @@ class FileProfilerStorage implements ProfilerStorageInterface
return false;
}
- fputcsv($file, array(
+ fputcsv($file, [
$profile->getToken(),
$profile->getIp(),
$profile->getMethod(),
@@ -179,7 +179,7 @@ class FileProfilerStorage implements ProfilerStorageInterface
$profile->getTime(),
$profile->getParentToken(),
$profile->getStatusCode(),
- ));
+ ]);
fclose($file);
}
diff --git a/vendor/symfony/http-kernel/Profiler/Profile.php b/vendor/symfony/http-kernel/Profiler/Profile.php
index 4716a229ea..f896c00e52 100644
--- a/vendor/symfony/http-kernel/Profiler/Profile.php
+++ b/vendor/symfony/http-kernel/Profiler/Profile.php
@@ -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)
{
@@ -201,7 +201,7 @@ class Profile
*/
public function setChildren(array $children)
{
- $this->children = array();
+ $this->children = [];
foreach ($children as $child) {
$this->addChild($child);
}
@@ -262,7 +262,7 @@ class Profile
*/
public function setCollectors(array $collectors)
{
- $this->collectors = array();
+ $this->collectors = [];
foreach ($collectors as $collector) {
$this->addCollector($collector);
}
@@ -290,6 +290,6 @@ class Profile
public function __sleep()
{
- return array('token', 'parent', 'children', 'collectors', 'ip', 'method', 'url', 'time', 'statusCode');
+ return ['token', 'parent', 'children', 'collectors', 'ip', 'method', 'url', 'time', 'statusCode'];
}
}
diff --git a/vendor/symfony/http-kernel/Profiler/Profiler.php b/vendor/symfony/http-kernel/Profiler/Profiler.php
index 809a3396b9..4a32c78420 100644
--- a/vendor/symfony/http-kernel/Profiler/Profiler.php
+++ b/vendor/symfony/http-kernel/Profiler/Profiler.php
@@ -31,7 +31,7 @@ class Profiler implements ResetInterface
/**
* @var DataCollectorInterface[]
*/
- private $collectors = array();
+ private $collectors = [];
private $logger;
private $initiallyEnabled = true;
@@ -101,7 +101,7 @@ class Profiler implements ResetInterface
}
if (!($ret = $this->storage->write($profile)) && null !== $this->logger) {
- $this->logger->warning('Unable to store the profiler information.', array('configured_storage' => \get_class($this->storage)));
+ $this->logger->warning('Unable to store the profiler information.', ['configured_storage' => \get_class($this->storage)]);
}
return $ret;
@@ -196,9 +196,9 @@ class Profiler implements ResetInterface
*
* @param DataCollectorInterface[] $collectors An array of collectors
*/
- public function set(array $collectors = array())
+ public function set(array $collectors = [])
{
- $this->collectors = array();
+ $this->collectors = [];
foreach ($collectors as $collector) {
$this->add($collector);
}