private function parameters(): array
    {
        try {
            $reflection = new \ReflectionClass($this->class);
        }

        catch (\ReflectionException $e) {
            return [];
        }

        $constructor = $reflection->getConstructor();

        return is_null($constructor) ? [] : $constructor->getParameters();
    }
private function parameters(): array
    {
        try {
            $reflection = new \ReflectionClass($this->class);
        }

        catch (\ReflectionException $e) {
            return [];
        }

        $constructor = $reflection->getConstructor();

        return is_null($constructor) ? [] : $constructor->getParameters();
    }
private function parameters ( ) : array { try { $ reflection = new \ ReflectionClass ( $ this -> class ) ; } catch ( \ ReflectionException $ e ) { return [ ] ; } $ constructor = $ reflection -> getConstructor ( ) ; return is_null ( $ constructor ) ? [ ] : $ constructor -> getParameters ( ) ; }
Return the non variadic class constructor parameter reflections.

When the string is not a class name the method does not fail and returns
an empty array. This way the script keeps going until the factory tries
to instantiate a non class and fail like it would by manually doing so.

@return \ReflectionParameter[]
Return the non variadic class constructor parameter reflections .