Skip to content

Commit

Permalink
fix(grumphp): wrong options detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Mte90 committed Jun 10, 2022
1 parent fa23a65 commit cc9f83a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions generator/tools.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,27 +65,27 @@ function grumphp() {
global $config, $clio, $info;
if ( file_exists( getcwd() . DIRECTORY_SEPARATOR . WPBP_PLUGIN_SLUG . '/grumphp.yml' ) ) {
$grumphp = yaml_parse_file ( getcwd() . DIRECTORY_SEPARATOR . WPBP_PLUGIN_SLUG . '/grumphp.yml' );
if ( !is_empty_or_false( $config[ 'grunt' ] ) ) {
if ( is_empty_or_false( $config[ 'grunt' ] ) ) {
unset( $grumphp[ 'parameters' ][ 'tasks' ][ 'grunt' ] );
$clio->clear()->style( $info )->display( "πŸ˜€ Grunt removed from GrumPHP" )->newLine();
}

if ( !is_empty_or_false( $config[ 'phpstan' ] ) ) {
if ( is_empty_or_false( $config[ 'phpstan' ] ) ) {
unset( $grumphp[ 'parameters' ][ 'tasks' ][ 'phpstan' ] );
$clio->clear()->style( $info )->display( "πŸ˜€ PHPStan removed from GrumPHP" )->newLine();
}

if ( !is_empty_or_false( $config[ 'unit-test' ] ) ) {
if ( is_empty_or_false( $config[ 'unit-test' ] ) ) {
unset( $grumphp[ 'parameters' ][ 'tasks' ][ 'codeception' ] );
$clio->clear()->style( $info )->display( "πŸ˜€ Codeception removed from GrumPHP" )->newLine();
}

if ( !is_empty_or_false( $config[ 'phpcs' ] ) ) {
if ( is_empty_or_false( $config[ 'phpcs' ] ) ) {
unset( $grumphp[ 'parameters' ][ 'tasks' ][ 'phpcs' ] );
$clio->clear()->style( $info )->display( "πŸ˜€ PHPCS removed from GrumPHP" )->newLine();
}

if ( !is_empty_or_false( $config[ 'phpmd' ] ) ) {
if ( is_empty_or_false( $config[ 'phpmd' ] ) ) {
unset( $grumphp[ 'parameters' ][ 'tasks' ][ 'phpmd' ] );
$clio->clear()->style( $info )->display( "πŸ˜€ PHPMD removed from GrumPHP" )->newLine();
}
Expand Down

0 comments on commit cc9f83a

Please sign in to comment.