diff --git a/Instantiator.php b/Instantiator.php index 9e33ea7..368c769 100644 --- a/Instantiator.php +++ b/Instantiator.php @@ -39,10 +39,10 @@ final class Instantiator * Bar::class => ['privateBarProperty' => $propertyValue], * ]); * - * Instances of ArrayObject, ArrayIterator and SplObjectHash can be created + * Instances of ArrayObject, ArrayIterator and SplObjectStorage can be created * by using the special "\0" property name to define their internal value: * - * // creates an SplObjectHash where $info1 is attached to $obj1, etc. + * // creates an SplObjectStorage where $info1 is attached to $obj1, etc. * Instantiator::instantiate(SplObjectStorage::class, ["\0" => [$obj1, $info1, $obj2, $info2...]]); * * // creates an ArrayObject populated with $inputArray diff --git a/Internal/Exporter.php b/Internal/Exporter.php index 2395430..a034ddd 100644 --- a/Internal/Exporter.php +++ b/Internal/Exporter.php @@ -108,7 +108,7 @@ public static function prepare($values, $objectsPool, &$refsPool, &$objectsCount $arrayValue = (array) $value; } elseif ($value instanceof \Serializable || $value instanceof \__PHP_Incomplete_Class - || PHP_VERSION_ID < 80200 && $value instanceof \DatePeriod + || \PHP_VERSION_ID < 80200 && $value instanceof \DatePeriod ) { ++$objectsCount; $objectsPool[$value] = [$id = \count($objectsPool), serialize($value), [], 0];