mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-19 21:27:50 +09:00
Updates to vendors etc
This commit is contained in:
@@ -28,10 +28,7 @@ use Symfony\Component\VarDumper\Cloner\VarCloner;
|
||||
*/
|
||||
abstract class DataCollector implements DataCollectorInterface
|
||||
{
|
||||
/**
|
||||
* @var array|Data
|
||||
*/
|
||||
protected $data = [];
|
||||
protected array|Data $data = [];
|
||||
|
||||
private ClonerInterface $cloner;
|
||||
|
||||
@@ -58,14 +55,26 @@ abstract class DataCollector implements DataCollectorInterface
|
||||
/**
|
||||
* @return callable[] The casters to add to the cloner
|
||||
*/
|
||||
protected function getCasters()
|
||||
protected function getCasters(): array
|
||||
{
|
||||
$casters = [
|
||||
return [
|
||||
'*' => function ($v, array $a, Stub $s, $isNested) {
|
||||
if (!$v instanceof Stub) {
|
||||
$b = $a;
|
||||
foreach ($a as $k => $v) {
|
||||
if (\is_object($v) && !$v instanceof \DateTimeInterface && !$v instanceof Stub) {
|
||||
$a[$k] = new CutStub($v);
|
||||
if (!\is_object($v) || $v instanceof \DateTimeInterface || $v instanceof Stub) {
|
||||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
$a[$k] = $s = new CutStub($v);
|
||||
|
||||
if ($b[$k] === $s) {
|
||||
// we've hit a non-typed reference
|
||||
$a[$k] = $v;
|
||||
}
|
||||
} catch (\TypeError $e) {
|
||||
// we've hit a typed reference
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -73,8 +82,6 @@ abstract class DataCollector implements DataCollectorInterface
|
||||
return $a;
|
||||
},
|
||||
] + ReflectionCaster::UNSET_CLOSURE_FILE_INFO;
|
||||
|
||||
return $casters;
|
||||
}
|
||||
|
||||
public function __sleep(): array
|
||||
@@ -82,10 +89,7 @@ abstract class DataCollector implements DataCollectorInterface
|
||||
return ['data'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function __wakeup()
|
||||
public function __wakeup(): void
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user