diff --git a/app/Factories/ConfigurationResolverFactory.php b/app/Factories/ConfigurationResolverFactory.php index 4d8f2659..7b42cfbb 100644 --- a/app/Factories/ConfigurationResolverFactory.php +++ b/app/Factories/ConfigurationResolverFactory.php @@ -18,6 +18,7 @@ class ConfigurationResolverFactory */ public static $presets = [ 'laravel', + 'per', 'psr12', 'symfony', ]; diff --git a/app/Output/SummaryOutput.php b/app/Output/SummaryOutput.php index eaa2cc35..3ecbc1f9 100644 --- a/app/Output/SummaryOutput.php +++ b/app/Output/SummaryOutput.php @@ -19,6 +19,7 @@ class SummaryOutput * @var array */ protected $presets = [ + 'per' => 'PER', 'psr12' => 'PSR 12', 'laravel' => 'Laravel', 'symfony' => 'Symfony', diff --git a/resources/presets/per.php b/resources/presets/per.php new file mode 100644 index 00000000..f8a7f300 --- /dev/null +++ b/resources/presets/per.php @@ -0,0 +1,8 @@ + true, + 'no_unused_imports' => true, +]); diff --git a/tests/Feature/PresetTest.php b/tests/Feature/PresetTest.php index fbe8be4d..94e637fd 100644 --- a/tests/Feature/PresetTest.php +++ b/tests/Feature/PresetTest.php @@ -21,6 +21,17 @@ ->toContain('── PSR 12'); }); +it('may use the PER preset', function () { + [$statusCode, $output] = run('default', [ + 'path' => base_path('tests/Fixtures/without-issues'), + '--preset' => 'per', + ]); + + expect($statusCode)->toBe(0) + ->and($output) + ->toContain('── PER'); +}); + it('may use the Laravel preset', function () { [$statusCode, $output] = run('default', [ 'path' => base_path('tests/Fixtures/without-issues'),