public function getRenderer(string $format): ResultsRendererInterface
    {
        if ($format === self::FORMAT_CSV) {
            return new CsvResultsRenderer;
        }

        if ($format === self::FORMAT_JSON) {
            return new JsonResultsRenderer;
        }

        if ($format === self::FORMAT_TEXT) {
            return new ConsoleResultsRenderer;
        }

        throw new InvalidArgumentException('Invalid output format provided');
    }
public function getRenderer(string $format): ResultsRendererInterface
    {
        if ($format === self::FORMAT_CSV) {
            return new CsvResultsRenderer;
        }

        if ($format === self::FORMAT_JSON) {
            return new JsonResultsRenderer;
        }

        if ($format === self::FORMAT_TEXT) {
            return new ConsoleResultsRenderer;
        }

        throw new InvalidArgumentException('Invalid output format provided');
    }
public function getRenderer ( string $ format ) : ResultsRendererInterface { if ( $ format === self :: FORMAT_CSV ) { return new CsvResultsRenderer ; } if ( $ format === self :: FORMAT_JSON ) { return new JsonResultsRenderer ; } if ( $ format === self :: FORMAT_TEXT ) { return new ConsoleResultsRenderer ; } throw new InvalidArgumentException ( 'Invalid output format provided' ) ; }
Render the results
@param string $format Format to render.
@throws InvalidArgumentException If output format invalid.
@return ResultsRendererInterface
Render the results