summaryrefslogtreecommitdiff
path: root/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php')
-rw-r--r--vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php16
1 files changed, 8 insertions, 8 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);
}