src/Phug/Formatter.php
public function setFormatHandler($doctype, $format)
    {
        if (!is_a($format, FormatInterface::class, true)) {
            throw new \InvalidArgumentException(
                "Passed format class $format must ".
                'implement '.FormatInterface::class
            );
        }
        $this->setOption(['formats', $doctype], $format);

        return $this;
    }
public function setFormatHandler($doctype, $format)
    {
        if (!is_a($format, FormatInterface::class, true)) {
            throw new \InvalidArgumentException(
                "Passed format class $format must ".
                'implement '.FormatInterface::class
            );
        }
        $this->setOption(['formats', $doctype], $format);

        return $this;
    }
public function setFormatHandler ( $ doctype , $ format ) { if ( ! is_a ( $ format , FormatInterface :: class , true ) ) { throw new \ InvalidArgumentException ( "Passed format class $format must " . 'implement ' . FormatInterface :: class ) ; } $ this -> setOption ( [ 'formats' , $ doctype ] , $ format ) ; return $ this ; }
Set the format handler for a given doctype identifier.

@param string                 $doctype doctype identifier
@param FormatInterface|string $format  format handler

@return $this
Set the format handler for a given doctype identifier .