Skip to content

Commit

Permalink
file path issue fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
varunsridharan committed Oct 4, 2019
1 parent 37c422b commit 3c1a05e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ public static function create_map( $path, $args = array() ) {
$cwd = realpath( getcwd() );

foreach ( $path as $file ) {
$file_path = $file->getPathname();
$file_path_base = $file_path;
$file_path = $file->getPathname();
if ( ! in_array( pathinfo( $file_path, PATHINFO_EXTENSION ), array( 'php', 'inc', 'hh' ), true ) ) {
continue;
}
Expand Down Expand Up @@ -138,7 +137,7 @@ public static function create_map( $path, $args = array() ) {
}

if ( false === $failed && ! isset( $map[ $class ] ) ) {
$map[ $class ] = ( false === $args['fullpath'] ) ? $file_path_base : $file_path;
$map[ $class ] = ( false === $args['fullpath'] ) ? $file->getrelativePathname() : $file_path;
}
}
}
Expand Down

0 comments on commit 3c1a05e

Please sign in to comment.