src/php/Validator.php
public function validateEvent($event)
    {
        if (!is_string($event)
            || strlen($event) > 1000
            || strlen($event) < 1
        ) {
            throw new InvalidArgumentException(
                'Event name must be a non empty string of at most 1,000 ' .
                'characters',
                400
            );
        }

        return $this;
    }
public function validateEvent($event)
    {
        if (!is_string($event)
            || strlen($event) > 1000
            || strlen($event) < 1
        ) {
            throw new InvalidArgumentException(
                'Event name must be a non empty string of at most 1,000 ' .
                'characters',
                400
            );
        }

        return $this;
    }
public function validateEvent ( $ event ) { if ( ! is_string ( $ event ) || strlen ( $ event ) > 1000 || strlen ( $ event ) < 1 ) { throw new InvalidArgumentException ( 'Event name must be a non empty string of at most 1,000 ' . 'characters' , 400 ) ; } return $ this ; }
Validates the given event name.

@param string $event Event name.

@return $this

@throws InvalidArgumentException Thrown if the event name is invalid.
Validates the given event name .