src/SimpleSoftwareIO/QrCode/BaconQrCodeGenerator.php
public function format($format)
    {
        switch ($format) {
            case 'png':
                $this->writer->setRenderer(new Png());
                break;
            case 'eps':
                $this->writer->setRenderer(new Eps());
                break;
            case 'svg':
                $this->writer->setRenderer(new Svg());
                break;
            default:
                throw new \InvalidArgumentException('Invalid format provided.');
        }

        return $this;
    }
public function format($format)
    {
        switch ($format) {
            case 'png':
                $this->writer->setRenderer(new Png());
                break;
            case 'eps':
                $this->writer->setRenderer(new Eps());
                break;
            case 'svg':
                $this->writer->setRenderer(new Svg());
                break;
            default:
                throw new \InvalidArgumentException('Invalid format provided.');
        }

        return $this;
    }
public function format ( $ format ) { switch ( $ format ) { case 'png' : $ this -> writer -> setRenderer ( new Png ( ) ) ; break ; case 'eps' : $ this -> writer -> setRenderer ( new Eps ( ) ) ; break ; case 'svg' : $ this -> writer -> setRenderer ( new Svg ( ) ) ; break ; default : throw new \ InvalidArgumentException ( 'Invalid format provided.' ) ; } return $ this ; }
Switches the format of the outputted QrCode or defaults to SVG.

@param string $format The desired format.

@throws \InvalidArgumentException

@return $this
Switches the format of the outputted QrCode or defaults to SVG .