Skip to content

Commit

Permalink
fix(composer): now autoload is cleaned
Browse files Browse the repository at this point in the history
  • Loading branch information
Mte90 committed Sep 20, 2022
1 parent 02f1086 commit 5f9343f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion generator/composer.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function clean_composer_file() {
if ( empty( $composer[ 'extra' ][ 'installer-paths' ][ 'vendor/{$name}/' ] ) ) {
unset( $composer[ 'extra' ] );
}

$composer = remove_folder_for_autoload( $composer );

$clio->style( $info )->display( "😎 Cleaning Composer file" )->newLine();
Expand Down
4 changes: 2 additions & 2 deletions generator/remove.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function count_files_in_a_folder($path) {

while ($file = readdir( $dir_handle )) {
if ( in_array( $file, array( '.', '..', 'index.php' ), true ) ) continue;

if ( is_dir( $path . $file ) ){
$file_count += count_files_in_a_folder($path . $file . DIRECTORY_SEPARATOR);
continue;
Expand All @@ -75,7 +75,7 @@ function count_files_in_a_folder($path) {
}

if ( !is_dir( $path ) ) {
return 1;
return 0;
}

return $file_count;
Expand Down

0 comments on commit 5f9343f

Please sign in to comment.