| @@ 9-44 (lines=36) @@ | ||
| 6 | use PhpGitHooks\Module\Configuration\Domain\PhpCsFixerLevels; |
|
| 7 | use PhpGitHooks\Module\Tests\Infrastructure\Stub\RandomStubInterface; |
|
| 8 | ||
| 9 | class PhpCsFixerLevelsStub implements RandomStubInterface |
|
| 10 | { |
|
| 11 | /** |
|
| 12 | * @param Level $psr0 |
|
| 13 | * @param Level $psr1 |
|
| 14 | * @param Level $psr2 |
|
| 15 | * @param Level $symfony |
|
| 16 | * |
|
| 17 | * @return PhpCsFixerLevels |
|
| 18 | */ |
|
| 19 | public static function create(Level $psr0, Level $psr1, Level $psr2, Level $symfony) |
|
| 20 | { |
|
| 21 | return new PhpCsFixerLevels($psr0, $psr1, $psr2, $symfony); |
|
| 22 | } |
|
| 23 | ||
| 24 | /** |
|
| 25 | * @return PhpCsFixerLevels |
|
| 26 | */ |
|
| 27 | public static function random() |
|
| 28 | { |
|
| 29 | return self::create(LevelStub::random(), LevelStub::random(), LevelStub::random(), LevelStub::random()); |
|
| 30 | } |
|
| 31 | ||
| 32 | /** |
|
| 33 | * @return PhpCsFixerLevels |
|
| 34 | */ |
|
| 35 | public static function createEnabled() |
|
| 36 | { |
|
| 37 | return self::create( |
|
| 38 | LevelStub::create(true), |
|
| 39 | LevelStub::create(true), |
|
| 40 | LevelStub::create(true), |
|
| 41 | LevelStub::create(true) |
|
| 42 | ); |
|
| 43 | } |
|
| 44 | } |
|
| 45 | ||
| @@ 12-42 (lines=31) @@ | ||
| 9 | use PhpGitHooks\Module\Configuration\Domain\Undefined; |
|
| 10 | use PhpGitHooks\Module\Tests\Infrastructure\Stub\RandomStubInterface; |
|
| 11 | ||
| 12 | class PhpCsFixerStub implements RandomStubInterface |
|
| 13 | { |
|
| 14 | /** |
|
| 15 | * @param Undefined $undefined |
|
| 16 | * @param Enabled $enabled |
|
| 17 | * @param PhpCsFixerLevels $levels |
|
| 18 | * @param PhpCsFixerOptions $options |
|
| 19 | * |
|
| 20 | * @return PhpCsFixer |
|
| 21 | */ |
|
| 22 | public static function create(Undefined $undefined, Enabled $enabled, PhpCsFixerLevels $levels, PhpCsFixerOptions $options) |
|
| 23 | { |
|
| 24 | return new PhpCsFixer($undefined, $enabled, $levels, $options); |
|
| 25 | } |
|
| 26 | ||
| 27 | /** |
|
| 28 | * @return PhpCsFixer |
|
| 29 | */ |
|
| 30 | public static function random() |
|
| 31 | { |
|
| 32 | return self::create(new Undefined(false), EnabledStub::random(), PhpCsFixerLevelsStub::random(), PhpCsFixerOptionsStub::random()); |
|
| 33 | } |
|
| 34 | ||
| 35 | /** |
|
| 36 | * @return PhpCsFixer |
|
| 37 | */ |
|
| 38 | public static function createEnabled() |
|
| 39 | { |
|
| 40 | return self::create(new Undefined(false), EnabledStub::create(true), PhpCsFixerLevelsStub::createEnabled(), PhpCsFixerOptionsStub::create(null)); |
|
| 41 | } |
|
| 42 | } |
|
| 43 | ||