mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-02 21:19:58 +09:00
Update dependencies
This commit is contained in:
@@ -108,12 +108,7 @@ class Exporter
|
||||
$arrayValue = (array) $value;
|
||||
} elseif ($value instanceof \Serializable
|
||||
|| $value instanceof \__PHP_Incomplete_Class
|
||||
|| $value instanceof \DatePeriod
|
||||
|| (\PHP_VERSION_ID >= 80200 && (
|
||||
$value instanceof \DateTimeInterface
|
||||
|| $value instanceof \DateTimeZone
|
||||
|| $value instanceof \DateInterval
|
||||
))
|
||||
|| \PHP_VERSION_ID < 80200 && $value instanceof \DatePeriod
|
||||
) {
|
||||
++$objectsCount;
|
||||
$objectsPool[$value] = [$id = \count($objectsPool), serialize($value), [], 0];
|
||||
@@ -138,7 +133,7 @@ class Exporter
|
||||
$i = 0;
|
||||
$n = (string) $name;
|
||||
if ('' === $n || "\0" !== $n[0]) {
|
||||
$c = 'stdClass';
|
||||
$c = \PHP_VERSION_ID >= 80100 && $reflector->hasProperty($n) && ($p = $reflector->getProperty($n))->isReadOnly() ? $p->class : 'stdClass';
|
||||
} elseif ('*' === $n[1]) {
|
||||
$n = substr($n, 3);
|
||||
$c = $reflector->getProperty($n)->class;
|
||||
@@ -193,12 +188,13 @@ class Exporter
|
||||
public static function export($value, string $indent = '')
|
||||
{
|
||||
switch (true) {
|
||||
case \is_int($value) || \is_float($value) || $value instanceof \UnitEnum: return var_export($value, true);
|
||||
case \is_int($value) || \is_float($value): return var_export($value, true);
|
||||
case [] === $value: return '[]';
|
||||
case false === $value: return 'false';
|
||||
case true === $value: return 'true';
|
||||
case null === $value: return 'null';
|
||||
case '' === $value: return "''";
|
||||
case $value instanceof \UnitEnum: return ltrim(var_export($value, true), '\\');
|
||||
}
|
||||
|
||||
if ($value instanceof Reference) {
|
||||
|
||||
Reference in New Issue
Block a user