src/Crossjoin/Css/Format/Rule/Style/StyleDeclaration.php
public function checkValue(&$value)
    {
        if (parent::checkValue($value)) {
            $value = trim($value, " \r\n\t\f;");

            // Check if declaration contains "!important"
            if (strpos($value, "!") !== false) {
                $charset = $this->getStyleSheet()->getCharset();
                if (mb_strtolower(mb_substr($value, -10, null, $charset), $charset) === "!important") {
                    $this->setIsImportant(true);
                    $value = rtrim(mb_substr($value, 0, -10, $charset));
                }
            }

            // Optimize the value
            $value = Optimizer::optimizeDeclarationValue($value);

            return true;
        }

        return false;
    }
public function checkValue(&$value)
    {
        if (parent::checkValue($value)) {
            $value = trim($value, " \r\n\t\f;");

            // Check if declaration contains "!important"
            if (strpos($value, "!") !== false) {
                $charset = $this->getStyleSheet()->getCharset();
                if (mb_strtolower(mb_substr($value, -10, null, $charset), $charset) === "!important") {
                    $this->setIsImportant(true);
                    $value = rtrim(mb_substr($value, 0, -10, $charset));
                }
            }

            // Optimize the value
            $value = Optimizer::optimizeDeclarationValue($value);

            return true;
        }

        return false;
    }
public function checkValue ( & $ value ) { if ( parent :: checkValue ( $ value ) ) { $ value = trim ( $ value , " \r\n\t\f;" ) ; // Check if declaration contains "!important" if ( strpos ( $ value , "!" ) !== false ) { $ charset = $ this -> getStyleSheet ( ) -> getCharset ( ) ; if ( mb_strtolower ( mb_substr ( $ value , - 10 , null , $ charset ) , $ charset ) === "!important" ) { $ this -> setIsImportant ( true ) ; $ value = rtrim ( mb_substr ( $ value , 0 , - 10 , $ charset ) ) ; } } // Optimize the value $ value = Optimizer :: optimizeDeclarationValue ( $ value ) ; return true ; } return false ; }
Checks the value.

@param string $value
@return bool
Checks the value .