Mockery\Container::isValidClassName PHP Method

isValidClassName() public method

see http://php.net/manual/en/language.oop5.basic.php
public isValidClassName ( string $className ) : boolean
$className string
return boolean
    public function isValidClassName($className)
    {
        $pos = strpos($className, '\\');
        if ($pos === 0) {
            $className = substr($className, 1);
            // remove the first backslash
        }
        // all the namespaces and class name should match the regex
        $invalidNames = array_filter(explode('\\', $className), function ($name) {
            return !preg_match('/^[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*$/', $name);
        });
        return empty($invalidNames);
    }