public function getReports()
    {
        $reports = array();
        $dir = ini_get("xhprof.output_dir");

        if (is_dir($dir)) {
            $finder = new Finder();
            $finder
                ->files()
                ->name('*.'.$this->namespace)
                ->notName($this->id.'.'.$this->namespace)
                ->in($dir)
                ->sort(function (SplFileInfo $a, SplFileInfo $b) {
                    return strcmp($b->getRealpath(), $a->getRealpath());
                })
            ;

            foreach ($finder as $runFile) {
                $infos = explode('.', basename($runFile));
                $runId = array_shift($infos);

                $reports[] = $this->getReport($runId);

                if (count($reports) > 5) {
                    break;
                }
            }
        }

        return $reports;
    }
public function getReports()
    {
        $reports = array();
        $dir = ini_get("xhprof.output_dir");

        if (is_dir($dir)) {
            $finder = new Finder();
            $finder
                ->files()
                ->name('*.'.$this->namespace)
                ->notName($this->id.'.'.$this->namespace)
                ->in($dir)
                ->sort(function (SplFileInfo $a, SplFileInfo $b) {
                    return strcmp($b->getRealpath(), $a->getRealpath());
                })
            ;

            foreach ($finder as $runFile) {
                $infos = explode('.', basename($runFile));
                $runId = array_shift($infos);

                $reports[] = $this->getReport($runId);

                if (count($reports) > 5) {
                    break;
                }
            }
        }

        return $reports;
    }
public function getReports ( ) { $ reports = array ( ) ; $ dir = ini_get ( "xhprof.output_dir" ) ; if ( is_dir ( $ dir ) ) { $ finder = new Finder ( ) ; $ finder -> files ( ) -> name ( '*.' . $ this -> namespace ) -> notName ( $ this -> id . '.' . $ this -> namespace ) -> in ( $ dir ) -> sort ( function ( SplFileInfo $ a , SplFileInfo $ b ) { return strcmp ( $ b -> getRealpath ( ) , $ a -> getRealpath ( ) ) ; } ) ; foreach ( $ finder as $ runFile ) { $ infos = explode ( '.' , basename ( $ runFile ) ) ; $ runId = array_shift ( $ infos ) ; $ reports [ ] = $ this -> getReport ( $ runId ) ; if ( count ( $ reports ) > 5 ) { break ; } } } return $ reports ; }
Gets the last reports.

@return array The last reports
Gets the last reports .