src/Parser/Parser.php
private function getClassName(string $filename, array $previousDeclaredClasses)
    {
        $filename = realpath($filename);
        $classes = get_declared_classes();
        $newClasses = array_values(array_diff($classes, $previousDeclaredClasses));

        $className = $this->_searchForUnitTestClass($newClasses, $filename);
        if (isset($className)) {
            return $className;
        }

        $className = $this->_searchForUnitTestClass($classes, $filename);
        if (isset($className)) {
            return $className;
        }
    }
private function getClassName(string $filename, array $previousDeclaredClasses)
    {
        $filename = realpath($filename);
        $classes = get_declared_classes();
        $newClasses = array_values(array_diff($classes, $previousDeclaredClasses));

        $className = $this->_searchForUnitTestClass($newClasses, $filename);
        if (isset($className)) {
            return $className;
        }

        $className = $this->_searchForUnitTestClass($classes, $filename);
        if (isset($className)) {
            return $className;
        }
    }
private function getClassName ( string $ filename , array $ previousDeclaredClasses ) { $ filename = realpath ( $ filename ) ; $ classes = get_declared_classes ( ) ; $ newClasses = array_values ( array_diff ( $ classes , $ previousDeclaredClasses ) ) ; $ className = $ this -> _searchForUnitTestClass ( $ newClasses , $ filename ) ; if ( isset ( $ className ) ) { return $ className ; } $ className = $ this -> _searchForUnitTestClass ( $ classes , $ filename ) ; if ( isset ( $ className ) ) { return $ className ; } }
Return the class name of the class contained
in the file.

@param mixed $filename
@param mixed $previousDeclaredClasses

@return string
Return the class name of the class contained in the file .