updated packages

This commit is contained in:
2019-05-18 09:06:43 +00:00
parent 901d16349e
commit e9487fa58a
2025 changed files with 30366 additions and 49653 deletions

View File

@@ -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);
}