| Total Complexity | 2 |
| Total Lines | 15 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class ResultFormatRegistry { |
||
| 8 | |||
| 9 | /** |
||
| 10 | * @var ResultFormat[] |
||
| 11 | */ |
||
| 12 | private $resultFormats; |
||
| 13 | |||
| 14 | public function newFormat(): ResultFormatRegistrator { |
||
| 15 | 5 | return new ResultFormatRegistrator( function( ResultFormat $info ) { |
|
| 16 | 5 | $this->resultFormats[$info->getName()] = $info; |
|
| 17 | 5 | } ); |
|
| 18 | } |
||
| 19 | |||
| 20 | 5 | public function getFormatByName( string $name ): ResultFormat { |
|
| 22 | } |
||
| 23 | |||
| 25 |