final protected function checkParameterType($value): void
    {
        if (\is_array($value)) {
            foreach ($value as $val) {
                $this->checkParameterType($val);
            }
        } elseif ($value !== null && !\is_scalar($value)) {
            throw new InvalidScalarParameterException(\sprintf(
                'Class %s can only accept scalar payload parameters, %s given',
                self::class,
                \is_object($value) ? \get_class($value) : \gettype($value)
            ));
        }
    }
final protected function checkParameterType($value): void
    {
        if (\is_array($value)) {
            foreach ($value as $val) {
                $this->checkParameterType($val);
            }
        } elseif ($value !== null && !\is_scalar($value)) {
            throw new InvalidScalarParameterException(\sprintf(
                'Class %s can only accept scalar payload parameters, %s given',
                self::class,
                \is_object($value) ? \get_class($value) : \gettype($value)
            ));
        }
    }
final protected function checkParameterType ( $ value ) : void { if ( \ is_array ( $ value ) ) { foreach ( $ value as $ val ) { $ this -> checkParameterType ( $ val ) ; } } elseif ( $ value !== null && ! \ is_scalar ( $ value ) ) { throw new InvalidScalarParameterException ( \ sprintf ( 'Class %s can only accept scalar payload parameters, %s given' , self :: class , \ is_object ( $ value ) ? \ get_class ( $ value ) : \ gettype ( $ value ) ) ) ; } }
Check only scalar types allowed.

@param mixed $value

@throws InvalidScalarParameterException
Check only scalar types allowed .