final protected function throwIfArray(ReflectionParameter $param, ?string $type): void
    {
        if ($type === 'array') {
            throw new Exception('The parameter `$' . $param->getName() . '` on method ' . $this->getMethodFullName($param->getDeclaringFunction()) . ' is type hinted as `array` and is not overridden via `@API\Argument` annotation. Either change the type hint or specify the type with `@API\Argument` annotation.');
        }
    }
final protected function throwIfArray(ReflectionParameter $param, ?string $type): void
    {
        if ($type === 'array') {
            throw new Exception('The parameter `$' . $param->getName() . '` on method ' . $this->getMethodFullName($param->getDeclaringFunction()) . ' is type hinted as `array` and is not overridden via `@API\Argument` annotation. Either change the type hint or specify the type with `@API\Argument` annotation.');
        }
    }
final protected function throwIfArray ( ReflectionParameter $ param , ? string $ type ) : void { if ( $ type === 'array' ) { throw new Exception ( 'The parameter `$' . $ param -> getName ( ) . '` on method ' . $ this -> getMethodFullName ( $ param -> getDeclaringFunction ( ) ) . ' is type hinted as `array` and is not overridden via `@API\Argument` annotation. Either change the type hint or specify the type with `@API\Argument` annotation.' ) ; } }
Throws exception if type is an array

@param ReflectionParameter $param
@param null|string $type

@throws Exception
Throws exception if type is an array