package and depencies

This commit is contained in:
RafficMohammed
2023-01-08 02:57:24 +05:30
parent d5332eb421
commit 1d54b8bc7f
4309 changed files with 193331 additions and 172289 deletions

View File

@@ -22,10 +22,7 @@ use Symfony\Component\VarDumper\Cloner\Stub;
*/
class ResourceCaster
{
/**
* @param \CurlHandle|resource $h
*/
public static function castCurl($h, array $a, Stub $stub, bool $isNested): array
public static function castCurl(\CurlHandle $h, array $a, Stub $stub, bool $isNested): array
{
return curl_getinfo($h);
}
@@ -66,15 +63,6 @@ class ResourceCaster
return $a;
}
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);
$a['server'] = mysql_get_server_info($h);
return $a;
}
public static function castOpensslX509($h, array $a, Stub $stub, bool $isNested)
{
$stub->cut = -1;
@@ -89,7 +77,7 @@ class ResourceCaster
$a += [
'subject' => new EnumStub(array_intersect_key($info['subject'], ['organizationName' => true, 'commonName' => true])),
'issuer' => new EnumStub(array_intersect_key($info['issuer'], ['organizationName' => true, 'commonName' => true])),
'expiry' => new ConstStub(date(\DateTime::ISO8601, $info['validTo_time_t']), $info['validTo_time_t']),
'expiry' => new ConstStub(date(\DateTimeInterface::ISO8601, $info['validTo_time_t']), $info['validTo_time_t']),
'fingerprint' => new EnumStub([
'md5' => new ConstStub(wordwrap(strtoupper(openssl_x509_fingerprint($h, 'md5')), 2, ':', true)),
'sha1' => new ConstStub(wordwrap(strtoupper(openssl_x509_fingerprint($h, 'sha1')), 2, ':', true)),