private function findComposerFile($fileName)
    {
        if (null !== $this->composerDir) {
            $filePath = $this->composerDir . '/' . $fileName;

            if (file_exists($filePath)) {
                return new SplFileInfo($filePath, dirname($filePath), dirname($filePath));
            }
        }

        $finder = new Finder();
        $result = $finder->name($fileName)
            ->in($this->getSearchDirs())
            ->depth(0);

        if (count($result)) {
            return $result->getIterator()->current();
        }

        return null;
    }
private function findComposerFile($fileName)
    {
        if (null !== $this->composerDir) {
            $filePath = $this->composerDir . '/' . $fileName;

            if (file_exists($filePath)) {
                return new SplFileInfo($filePath, dirname($filePath), dirname($filePath));
            }
        }

        $finder = new Finder();
        $result = $finder->name($fileName)
            ->in($this->getSearchDirs())
            ->depth(0);

        if (count($result)) {
            return $result->getIterator()->current();
        }

        return null;
    }
private function findComposerFile ( $ fileName ) { if ( null !== $ this -> composerDir ) { $ filePath = $ this -> composerDir . '/' . $ fileName ; if ( file_exists ( $ filePath ) ) { return new SplFileInfo ( $ filePath , dirname ( $ filePath ) , dirname ( $ filePath ) ) ; } } $ finder = new Finder ( ) ; $ result = $ finder -> name ( $ fileName ) -> in ( $ this -> getSearchDirs ( ) ) -> depth ( 0 ) ; if ( count ( $ result ) ) { return $ result -> getIterator ( ) -> current ( ) ; } return null ; }
Searches a composer file

@return SplFileInfo the found composer file or null if composer file isn't found
Searches a composer file