src/Config/ConfigFinder.php
protected function fileMatchesMoreSpecificExtension(string $filename, string $extension) : bool
    {
      return array_reduce($this->extensions, function ($match, $compare) use ($filename, $extension) {
        if ($match || $compare === $extension || strlen($compare) < strlen($extension)) {
          return $match;
        }

        return $filename === basename($filename, ".{$compare}").".{$compare}";
      }, false);
    }
protected function fileMatchesMoreSpecificExtension(string $filename, string $extension) : bool
    {
      return array_reduce($this->extensions, function ($match, $compare) use ($filename, $extension) {
        if ($match || $compare === $extension || strlen($compare) < strlen($extension)) {
          return $match;
        }

        return $filename === basename($filename, ".{$compare}").".{$compare}";
      }, false);
    }
protected function fileMatchesMoreSpecificExtension ( string $ filename , string $ extension ) : bool { return array_reduce ( $ this -> extensions , function ( $ match , $ compare ) use ( $ filename , $ extension ) { if ( $ match || $ compare === $ extension || strlen ( $ compare ) < strlen ( $ extension ) ) { return $ match ; } return $ filename === basename ( $ filename , ".{$compare}" ) . ".{$compare}" ; } , false ) ; }
Determines if a file matches another more specific extension

@param string $filename
@param string $extension
@return bool
Determines if a file matches another more specific extension