| @@ 10-38 (lines=29) @@ | ||
| 7 | use PhpGitHooks\Module\Configuration\Domain\Undefined; |
|
| 8 | use PhpGitHooks\Module\Tests\Infrastructure\Stub\RandomStubInterface; |
|
| 9 | ||
| 10 | class ComposerStub implements RandomStubInterface |
|
| 11 | { |
|
| 12 | /** |
|
| 13 | * @param Undefined $undefined |
|
| 14 | * @param Enabled $enabled |
|
| 15 | * |
|
| 16 | * @return Composer |
|
| 17 | */ |
|
| 18 | public static function create(Undefined $undefined, Enabled $enabled) |
|
| 19 | { |
|
| 20 | return new Composer($undefined, $enabled); |
|
| 21 | } |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @return Composer |
|
| 25 | */ |
|
| 26 | public static function random() |
|
| 27 | { |
|
| 28 | return self::create(new Undefined(false), EnabledStub::random()); |
|
| 29 | } |
|
| 30 | ||
| 31 | /** |
|
| 32 | * @return Composer |
|
| 33 | */ |
|
| 34 | public static function createEnabled() |
|
| 35 | { |
|
| 36 | return self::create(new Undefined(false), EnabledStub::create(true)); |
|
| 37 | } |
|
| 38 | } |
|
| 39 | ||
| @@ 10-37 (lines=28) @@ | ||
| 7 | use PhpGitHooks\Module\Configuration\Domain\Undefined; |
|
| 8 | use PhpGitHooks\Module\Tests\Infrastructure\Stub\RandomStubInterface; |
|
| 9 | ||
| 10 | class JsonLintStub implements RandomStubInterface |
|
| 11 | { |
|
| 12 | /** |
|
| 13 | * @param Undefined $undefined |
|
| 14 | * @param Enabled $enabled |
|
| 15 | * |
|
| 16 | * @return JsonLint |
|
| 17 | */ |
|
| 18 | public static function create(Undefined $undefined, Enabled $enabled) |
|
| 19 | { |
|
| 20 | return new JsonLint($undefined, $enabled); |
|
| 21 | } |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @return JsonLint |
|
| 25 | */ |
|
| 26 | public static function random() |
|
| 27 | { |
|
| 28 | return self::create(new Undefined(false), EnabledStub::random()); |
|
| 29 | } |
|
| 30 | /** |
|
| 31 | * @return JsonLint |
|
| 32 | */ |
|
| 33 | public static function createEnabled() |
|
| 34 | { |
|
| 35 | return self::create(new Undefined(false), EnabledStub::create(true)); |
|
| 36 | } |
|
| 37 | } |
|
| 38 | ||
| @@ 10-38 (lines=29) @@ | ||
| 7 | use PhpGitHooks\Module\Configuration\Domain\Undefined; |
|
| 8 | use PhpGitHooks\Module\Tests\Infrastructure\Stub\RandomStubInterface; |
|
| 9 | ||
| 10 | class PhpLintStub implements RandomStubInterface |
|
| 11 | { |
|
| 12 | /** |
|
| 13 | * @param Undefined $undefined |
|
| 14 | * @param Enabled $enabled |
|
| 15 | * |
|
| 16 | * @return PhpLint |
|
| 17 | */ |
|
| 18 | public static function create(Undefined $undefined, Enabled $enabled) |
|
| 19 | { |
|
| 20 | return new PhpLint($undefined, $enabled); |
|
| 21 | } |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @return PhpLint |
|
| 25 | */ |
|
| 26 | public static function random() |
|
| 27 | { |
|
| 28 | return self::create(new Undefined(false), EnabledStub::random()); |
|
| 29 | } |
|
| 30 | ||
| 31 | /** |
|
| 32 | * @return PhpLint |
|
| 33 | */ |
|
| 34 | public static function createEnabled() |
|
| 35 | { |
|
| 36 | return self::create(new Undefined(false), EnabledStub::create(true)); |
|
| 37 | } |
|
| 38 | } |
|
| 39 | ||