File "BooleanOption.php"

Full Path: /var/www/html/wordpress/wp-content/plugins/wp-optimize/vendor/rosell-dk/webp-convert/src/Options/BooleanOption.php
File size: 597 bytes
MIME-type: text/x-php
Charset: utf-8

 
Open Back
<?php

namespace WebPConvert\Options;

use WebPConvert\Options\Option;
use WebPConvert\Options\Exceptions\InvalidOptionValueException;

/**
 * Boolean option
 *
 * @package    WebPConvert
 * @author     Bjørn Rosell <[email protected]>
 * @since      Class available since Release 2.0.0
 */
class BooleanOption extends Option
{

    protected $typeId = 'boolean';
    protected $schemaType = ['boolean'];

    public function check()
    {
        $this->checkType('boolean');
    }

    public function getValueForPrint()
    {
        return ($this->getValue() === true ? 'true' : 'false');
    }
}