public function validateSpaces($name)
    {
        $string = $this->removeSpaces($name);
        if ($string == $name) {
            return $name;
        } else {
            throw new \InvalidArgumentException(
                sprintf(
                    'The name "%s" is invalid, spaces between words are not allowed.',
                    $name
                )
            );
        }
    }
public function validateSpaces($name)
    {
        $string = $this->removeSpaces($name);
        if ($string == $name) {
            return $name;
        } else {
            throw new \InvalidArgumentException(
                sprintf(
                    'The name "%s" is invalid, spaces between words are not allowed.',
                    $name
                )
            );
        }
    }
public function validateSpaces ( $ name ) { $ string = $ this -> removeSpaces ( $ name ) ; if ( $ string == $ name ) { return $ name ; } else { throw new \ InvalidArgumentException ( sprintf ( 'The name "%s" is invalid, spaces between words are not allowed.' , $ name ) ) ; } }
Validates if class name have spaces between words.

@param string $name

@return string
Validates if class name have spaces between words .