src/Parser/PhpClassParser.php
public function parse(PhpClass $phpClass, SplFileInfo $fileInfo) {
        try {
            $this->nodeVisitor->setPhpClass($phpClass);

            $this->traverse($fileInfo->getContents(), [$this->nodeVisitor]);

            $phpClass->setFile($fileInfo);

            $phpClass->setLastModified((new \DateTime())->setTimestamp($fileInfo->getMTime()));
        } catch (\Exception $e) {
            return false;
        }

        if($phpClass->isValid()){
            return $phpClass;
        }

        return false;
    }
public function parse(PhpClass $phpClass, SplFileInfo $fileInfo) {
        try {
            $this->nodeVisitor->setPhpClass($phpClass);

            $this->traverse($fileInfo->getContents(), [$this->nodeVisitor]);

            $phpClass->setFile($fileInfo);

            $phpClass->setLastModified((new \DateTime())->setTimestamp($fileInfo->getMTime()));
        } catch (\Exception $e) {
            return false;
        }

        if($phpClass->isValid()){
            return $phpClass;
        }

        return false;
    }
public function parse ( PhpClass $ phpClass , SplFileInfo $ fileInfo ) { try { $ this -> nodeVisitor -> setPhpClass ( $ phpClass ) ; $ this -> traverse ( $ fileInfo -> getContents ( ) , [ $ this -> nodeVisitor ] ) ; $ phpClass -> setFile ( $ fileInfo ) ; $ phpClass -> setLastModified ( ( new \ DateTime ( ) ) -> setTimestamp ( $ fileInfo -> getMTime ( ) ) ) ; } catch ( \ Exception $ e ) { return false ; } if ( $ phpClass -> isValid ( ) ) { return $ phpClass ; } return false ; }
Builds the cache

@param PhpClass $phpClass
@param SplFileInfo $fileInfo
@return \Synga\InheritanceFinder\PhpClass[]
Builds the cache