diff options
Diffstat (limited to 'vendor/symfony/var-exporter/Internal/Registry.php')
| -rw-r--r-- | vendor/symfony/var-exporter/Internal/Registry.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/vendor/symfony/var-exporter/Internal/Registry.php b/vendor/symfony/var-exporter/Internal/Registry.php index 705722650a..629836b00b 100644 --- a/vendor/symfony/var-exporter/Internal/Registry.php +++ b/vendor/symfony/var-exporter/Internal/Registry.php @@ -21,11 +21,11 @@ use Symfony\Component\VarExporter\Exception\NotInstantiableTypeException; */ class Registry { - public static $reflectors = array(); - public static $prototypes = array(); - public static $factories = array(); - public static $cloneable = array(); - public static $instantiableWithoutConstructor = array(); + public static $reflectors = []; + public static $prototypes = []; + public static $factories = []; + public static $cloneable = []; + public static $instantiableWithoutConstructor = []; public function __construct(array $classes) { @@ -60,7 +60,7 @@ class Registry { $reflector = self::$reflectors[$class] ?? self::getClassReflector($class, true, false); - return self::$factories[$class] = \Closure::fromCallable(array($reflector, 'newInstanceWithoutConstructor')); + return self::$factories[$class] = \Closure::fromCallable([$reflector, 'newInstanceWithoutConstructor']); } public static function getClassReflector($class, $instantiableWithoutConstructor = false, $cloneable = null) @@ -118,17 +118,17 @@ class Registry static $setTrace; if (null === $setTrace) { - $setTrace = array( + $setTrace = [ new \ReflectionProperty(\Error::class, 'trace'), new \ReflectionProperty(\Exception::class, 'trace'), - ); + ]; $setTrace[0]->setAccessible(true); $setTrace[1]->setAccessible(true); - $setTrace[0] = \Closure::fromCallable(array($setTrace[0], 'setValue')); - $setTrace[1] = \Closure::fromCallable(array($setTrace[1], 'setValue')); + $setTrace[0] = \Closure::fromCallable([$setTrace[0], 'setValue']); + $setTrace[1] = \Closure::fromCallable([$setTrace[1], 'setValue']); } - $setTrace[$proto instanceof \Exception]($proto, array()); + $setTrace[$proto instanceof \Exception]($proto, []); } return self::$reflectors[$class] = $reflector; |
