private function findMostLikelyFile(string $procedure)
    {
        foreach($this->paths as $path) {

            $filename = Strings::afterLast($path, '/');
            $filenameWithoutExtension = Strings::untilLast($filename, '.');

            if($procedure === $filenameWithoutExtension) {
                return $filename;
            }
        }
        return null;
    }
private function findMostLikelyFile(string $procedure)
    {
        foreach($this->paths as $path) {

            $filename = Strings::afterLast($path, '/');
            $filenameWithoutExtension = Strings::untilLast($filename, '.');

            if($procedure === $filenameWithoutExtension) {
                return $filename;
            }
        }
        return null;
    }
private function findMostLikelyFile ( string $ procedure ) { foreach ( $ this -> paths as $ path ) { $ filename = Strings :: afterLast ( $ path , '/' ) ; $ filenameWithoutExtension = Strings :: untilLast ( $ filename , '.' ) ; if ( $ procedure === $ filenameWithoutExtension ) { return $ filename ; } } return null ; }
Find the file that is most likely to contain the given procedure.
Prioritizes files with the same name as the procedure.
Find the file that is most likely to contain the given procedure . Prioritizes files with the same name as the procedure .