1 && isset( $argv[1] ) && stripos( $argv[1], 'php-version' ) !== false ) { $raw_argv = explode( '=', escapeshellcmd( $argv[1] ) ); $value = $raw_argv[1]; $extra_agr_php_version = "ANALYSIS_PHP_VERSION=$value "; } $commands = array( "cd $php_stan_dir && ", // we run commands from the PHPStan dir because we save MailPoet-specific configuration in it. "$extra_agr_php_version", 'php -d memory_limit=-1 ', "$php_stan_bin analyse ", "-c $email_editor_custom_config ", "$email_editor_php_dir/src ", "$email_editor_php_dir/tests/integration ", "$email_editor_php_dir/tests/unit ", ); $all_commands = implode( ' ', $commands ); echo "[run-phpstan] Running command: $all_commands \n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- This file is not used within WordPress environment. passthru( $all_commands ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.system_calls_passthru -- This file is not used within WordPress environment.