src/PHPCoverFish/CoverFishScanner.php
public function analyseClassesInFile($file)
    {
        $ts = new PHP_Token_Stream($file);
        $this->phpUnitFile = new CoverFishPHPUnitFile();

        foreach ($ts->getClasses() as $className => $classData) {
            $fqnClass = sprintf('%s\\%s',
                $this->coverFishHelper->getAttributeByKey('namespace', $classData['package']),
                $className
            );

            if (false === $this->coverFishHelper->isValidTestClass($fqnClass)) {
                continue;
            }

            $classData['className'] = $className;
            $classData['classFile'] = $file;
            $this->analyseClass($classData);
        }
    }
public function analyseClassesInFile($file)
    {
        $ts = new PHP_Token_Stream($file);
        $this->phpUnitFile = new CoverFishPHPUnitFile();

        foreach ($ts->getClasses() as $className => $classData) {
            $fqnClass = sprintf('%s\\%s',
                $this->coverFishHelper->getAttributeByKey('namespace', $classData['package']),
                $className
            );

            if (false === $this->coverFishHelper->isValidTestClass($fqnClass)) {
                continue;
            }

            $classData['className'] = $className;
            $classData['classFile'] = $file;
            $this->analyseClass($classData);
        }
    }
public function analyseClassesInFile ( $ file ) { $ ts = new PHP_Token_Stream ( $ file ) ; $ this -> phpUnitFile = new CoverFishPHPUnitFile ( ) ; foreach ( $ ts -> getClasses ( ) as $ className => $ classData ) { $ fqnClass = sprintf ( '%s\\%s' , $ this -> coverFishHelper -> getAttributeByKey ( 'namespace' , $ classData [ 'package' ] ) , $ className ) ; if ( false === $ this -> coverFishHelper -> isValidTestClass ( $ fqnClass ) ) { continue ; } $ classData [ 'className' ] = $ className ; $ classData [ 'classFile' ] = $ file ; $ this -> analyseClass ( $ classData ) ; } }
scan all classes inside one defined unit test file

@param string $file

@return array
scan all classes inside one defined unit test file