| Total Complexity | 10 |
| Total Lines | 54 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 10 | class MockSnippetFile extends AbstractSnippetFile |
||
| 11 | { |
||
| 12 | private string $name; |
||
| 13 | |||
| 14 | private bool $isBase; |
||
| 15 | |||
| 16 | private string $iso; |
||
| 17 | |||
| 18 | private string $technicalName; |
||
| 19 | |||
| 20 | public function __construct(string $name, ?string $iso = null, string $content = '{}', bool $isBase = true, string $technicalName = 'mock') |
||
| 27 | } |
||
| 28 | |||
| 29 | public static function cleanup(): void |
||
| 30 | { |
||
| 31 | foreach (glob(__DIR__ . '/_fixtures/*.json') ?: [] as $mockFile) { |
||
| 32 | unlink($mockFile); |
||
| 33 | } |
||
| 34 | } |
||
| 35 | |||
| 36 | public function getName(): string |
||
| 37 | { |
||
| 38 | return $this->name; |
||
| 39 | } |
||
| 40 | |||
| 41 | public function getPath(): string |
||
| 42 | { |
||
| 43 | return sprintf('%s/_fixtures/%s.json', __DIR__, $this->getName()); |
||
| 44 | } |
||
| 45 | |||
| 46 | public function getIso(): string |
||
| 47 | { |
||
| 48 | return $this->iso; |
||
| 49 | } |
||
| 50 | |||
| 51 | public function getAuthor(): string |
||
| 54 | } |
||
| 55 | |||
| 56 | public function isBase(): bool |
||
| 59 | } |
||
| 60 | |||
| 61 | public function getTechnicalName(): string |
||
| 66 |