original_string: 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)
              ));
          }
      }
code: 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)
              ));
          }
      }
code_tokens: 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 ) ) ) ; } }
docstring: Check only scalar types allowed.
  
  @param mixed $value
  
  @throws InvalidScalarParameterException
docstring_tokens: Check only scalar types allowed .