It looks like you reimplemented http://php.net/manual/en/function.basename.php.  Consider replacing `static::getFileName($file)` with `basename($file, '.php')`