Update to laravel 7

This commit is contained in:
KodeStar
2022-03-10 11:54:29 +00:00
parent 61a5a1a8b0
commit f9a19fce91
7170 changed files with 274189 additions and 283773 deletions

View File

@@ -17,15 +17,20 @@ use Symfony\Component\VarDumper\Cloner\Stub;
* Casts common resource types to array representation.
*
* @author Nicolas Grekas <p@tchwork.com>
*
* @final
*/
class ResourceCaster
{
public static function castCurl($h, array $a, Stub $stub, $isNested)
/**
* @param \CurlHandle|resource $h
*/
public static function castCurl($h, array $a, Stub $stub, bool $isNested): array
{
return curl_getinfo($h);
}
public static function castDba($dba, array $a, Stub $stub, $isNested)
public static function castDba($dba, array $a, Stub $stub, bool $isNested)
{
$list = dba_list();
$a['file'] = $list[(int) $dba];
@@ -33,27 +38,27 @@ class ResourceCaster
return $a;
}
public static function castProcess($process, array $a, Stub $stub, $isNested)
public static function castProcess($process, array $a, Stub $stub, bool $isNested)
{
return proc_get_status($process);
}
public static function castStream($stream, array $a, Stub $stub, $isNested)
public static function castStream($stream, array $a, Stub $stub, bool $isNested)
{
$a = stream_get_meta_data($stream) + static::castStreamContext($stream, $a, $stub, $isNested);
if (isset($a['uri'])) {
if ($a['uri'] ?? false) {
$a['uri'] = new LinkStub($a['uri']);
}
return $a;
}
public static function castStreamContext($stream, array $a, Stub $stub, $isNested)
public static function castStreamContext($stream, array $a, Stub $stub, bool $isNested)
{
return @stream_context_get_params($stream) ?: $a;
}
public static function castGd($gd, array $a, Stub $stub, $isNested)
public static function castGd($gd, array $a, Stub $stub, bool $isNested)
{
$a['size'] = imagesx($gd).'x'.imagesy($gd);
$a['trueColor'] = imageistruecolor($gd);
@@ -61,7 +66,7 @@ class ResourceCaster
return $a;
}
public static function castMysqlLink($h, array $a, Stub $stub, $isNested)
public static function castMysqlLink($h, array $a, Stub $stub, bool $isNested)
{
$a['host'] = mysql_get_host_info($h);
$a['protocol'] = mysql_get_proto_info($h);
@@ -70,7 +75,7 @@ class ResourceCaster
return $a;
}
public static function castOpensslX509($h, array $a, Stub $stub, $isNested)
public static function castOpensslX509($h, array $a, Stub $stub, bool $isNested)
{
$stub->cut = -1;
$info = openssl_x509_parse($h, false);