public static function checkNamespace($value)
    {
        $value = static::check($value);

        if (0 === strpos($value, '\\') || '\\' === substr($value, -1)) {
            throw new \InvalidArgumentException('Invalid namespace.');
        }

        return $value;
    }
public static function checkNamespace($value)
    {
        $value = static::check($value);

        if (0 === strpos($value, '\\') || '\\' === substr($value, -1)) {
            throw new \InvalidArgumentException('Invalid namespace.');
        }

        return $value;
    }
public static function checkNamespace ( $ value ) { $ value = static :: check ( $ value ) ; if ( 0 === strpos ( $ value , '\\' ) || '\\' === substr ( $ value , - 1 ) ) { throw new \ InvalidArgumentException ( 'Invalid namespace.' ) ; } return $ value ; }
Checks that namespace has no leading or trailing backslashes

@param string $value
@throws InvalidArgumentException
@return string
Checks that namespace has no leading or trailing backslashes