upgrade to laravel 7 and set branch to v2

This commit is contained in:
2020-12-25 11:22:15 +00:00
parent 516105c492
commit 0ddd298350
4638 changed files with 132501 additions and 190226 deletions

View File

@@ -47,7 +47,7 @@ class FileProfilerStorage implements ProfilerStorageInterface
/**
* {@inheritdoc}
*/
public function find($ip, $url, $limit, $method, $start = null, $end = null, $statusCode = null): array
public function find(?string $ip, ?string $url, ?int $limit, ?string $method, int $start = null, int $end = null, string $statusCode = null): array
{
$file = $this->getIndexFilename();
@@ -113,7 +113,7 @@ class FileProfilerStorage implements ProfilerStorageInterface
/**
* {@inheritdoc}
*/
public function read($token): ?Profile
public function read(string $token): ?Profile
{
if (!$token || !file_exists($file = $this->getFilename($token))) {
return null;
@@ -200,11 +200,9 @@ class FileProfilerStorage implements ProfilerStorageInterface
/**
* Gets filename to store data, associated to the token.
*
* @param string $token
*
* @return string The profile filename
*/
protected function getFilename($token)
protected function getFilename(string $token)
{
// Uses 4 last characters, because first are mostly the same.
$folderA = substr($token, -2, 2);
@@ -270,7 +268,7 @@ class FileProfilerStorage implements ProfilerStorageInterface
return '' === $line ? null : $line;
}
protected function createProfileFromData($token, $data, $parent = null)
protected function createProfileFromData(string $token, array $data, Profile $parent = null)
{
$profile = new Profile($token);
$profile->setIp($data['ip']);