From 3c1a05e69400b3cf6fea40c3b0bbf9b4247f80fe Mon Sep 17 00:00:00 2001 From: Varun Date: Fri, 4 Oct 2019 15:13:17 +0530 Subject: [PATCH] file path issue fixed. --- src/generator.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/generator.php b/src/generator.php index 5f9b69f..be40e4d 100644 --- a/src/generator.php +++ b/src/generator.php @@ -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; } @@ -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; } } }