updated packages
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user