diff --git a/src/svgtinyps.php b/src/svgtinyps.php index 549f926..b4597c0 100644 --- a/src/svgtinyps.php +++ b/src/svgtinyps.php @@ -48,7 +48,7 @@ function showHelp() echo 'Usage: svgtinyps [options] [command] [input-file] [output-file]'.PHP_EOL; echo PHP_EOL; echo 'Options:'.PHP_EOL; - echo " -v, --verbose Enable verbose mode".PHP_EOL; + echo ' -v, --verbose Enable verbose mode'.PHP_EOL; echo PHP_EOL; echo 'Commands:'.PHP_EOL; echo ' convert [input] [output] - Convert SVG file'.PHP_EOL; @@ -57,7 +57,7 @@ function showHelp() echo ' help - Show this help information'.PHP_EOL; echo PHP_EOL; echo 'Informations:'.PHP_EOL; - echo !str_starts_with($version, '@git_tag') ? ' Version: '.$version.PHP_EOL : ''; + echo ! str_starts_with($version, '@git_tag') ? ' Version: '.$version.PHP_EOL : ''; // echo 'PHP sapi name: '.php_sapi_name().PHP_EOL; echo ' Based on https://github.com/srwiez/php-svg-ps-converter version: '.getComposerVersion('srwiez/php-svg-ps-converter').PHP_EOL; echo ' Built with https://github.com/box-project/box'.PHP_EOL; diff --git a/tests/Feature/ValidationTest.php b/tests/Feature/ValidationTest.php index dc121e1..372513e 100644 --- a/tests/Feature/ValidationTest.php +++ b/tests/Feature/ValidationTest.php @@ -10,13 +10,13 @@ test('it output an error if output directory does not exist', function () { exec('php src/svgtinyps.php convert assets/twitter.svg tmp/output/does-not-exist.svg', $output, $exitCode); $output = implode("\n", $output); // Combine array elements into a single string - expect($output)->toContain("Error: The output directory either does not exist or is not writeable") + expect($output)->toContain('Error: The output directory either does not exist or is not writeable') ->and($exitCode)->toBe(1); }); test('it output an error if output directory is not provided', function () { exec('php src/svgtinyps.php convert assets/twitter.svg', $output, $exitCode); $output = implode("\n", $output); // Combine array elements into a single string - expect($output)->toContain("Error: Output file not provided for conversion") + expect($output)->toContain('Error: Output file not provided for conversion') ->and($exitCode)->toBe(1); });