| 1 | <?php  | 
            ||
| 8 | class ReporterFactory  | 
            ||
| 9 | { | 
            ||
| 10 | protected $formatters = [];  | 
            ||
| 11 | |||
| 12 | public static function create()  | 
            ||
| 19 | |||
| 20 | public function __construct(array $formatters = [])  | 
            ||
| 26 | |||
| 27 | /**  | 
            ||
| 28 | * @param string $format  | 
            ||
| 29 | * @param Formatter\ReportFormatter $formatter  | 
            ||
| 30 | */  | 
            ||
| 31 | public function registerFormatter($format, Formatter\ReportFormatter $formatter)  | 
            ||
| 35 | |||
| 36 | /**  | 
            ||
| 37 | * @param string $format  | 
            ||
| 38 | * @param OutputInterface $output  | 
            ||
| 39 | *  | 
            ||
| 40 | * @return Reporter  | 
            ||
| 41 | *  | 
            ||
| 42 | * @throws \LogicException If no reporter is registered for the given format.  | 
            ||
| 43 | */  | 
            ||
| 44 | public function getReporter($format, OutputInterface $output)  | 
            ||
| 52 | }  | 
            ||
| 53 |