src/Charcoal/Admin/Action/Filesystem/LoadAction.php
protected function assertValidName($name)
    {
        if (!is_string($name) && $name !== null) {
            $actualType = is_object($name) ? get_class($name) : gettype($name);
            $message = $this->translator()->translate(
                '{{ parameter }} must be a {{ expectedType }}, received {{ actualType }}',
                [
                    '{{ parameter }}'    => '"name"',
                    '{{ expectedType }}' => 'string',
                    '{{ actualType }}'   => $actualType,
                ]
            );

            throw new InvalidArgumentException($message, 400);
        }
    }
protected function assertValidName($name)
    {
        if (!is_string($name) && $name !== null) {
            $actualType = is_object($name) ? get_class($name) : gettype($name);
            $message = $this->translator()->translate(
                '{{ parameter }} must be a {{ expectedType }}, received {{ actualType }}',
                [
                    '{{ parameter }}'    => '"name"',
                    '{{ expectedType }}' => 'string',
                    '{{ actualType }}'   => $actualType,
                ]
            );

            throw new InvalidArgumentException($message, 400);
        }
    }
protected function assertValidName ( $ name ) { if ( ! is_string ( $ name ) && $ name !== null ) { $ actualType = is_object ( $ name ) ? get_class ( $ name ) : gettype ( $ name ) ; $ message = $ this -> translator ( ) -> translate ( '{{ parameter }} must be a {{ expectedType }}, received {{ actualType }}' , [ '{{ parameter }}' => '"name"' , '{{ expectedType }}' => 'string' , '{{ actualType }}' => $ actualType , ] ) ; throw new InvalidArgumentException ( $ message , 400 ) ; } }
Asserts that the custom file name is valid, throws an exception if not.

@param  mixed $name A custom file name.
@throws InvalidArgumentException If the name is not a string or NULL.
@return void
Asserts that the custom file name is valid throws an exception if not .