public function append(array $selectors, $declarationsBlock, $media = '')
    {
        $selectorsAsKeys = \array_flip($selectors);

        $mediaRule = $this->getOrCreateMediaRuleToAppendTo($media);
        $lastRuleBlock = \end($mediaRule->ruleBlocks);

        $hasSameDeclarationsAsLastRule = $lastRuleBlock !== false
            && $declarationsBlock === $lastRuleBlock->declarationsBlock;
        if ($hasSameDeclarationsAsLastRule) {
            $lastRuleBlock->selectorsAsKeys += $selectorsAsKeys;
        } else {
            $hasSameSelectorsAsLastRule = $lastRuleBlock !== false
                && static::hasEquivalentSelectors($selectorsAsKeys, $lastRuleBlock->selectorsAsKeys);
            if ($hasSameSelectorsAsLastRule) {
                $lastDeclarationsBlockWithoutSemicolon = \rtrim(\rtrim($lastRuleBlock->declarationsBlock), ';');
                $lastRuleBlock->declarationsBlock = $lastDeclarationsBlockWithoutSemicolon . ';' . $declarationsBlock;
            } else {
                $mediaRule->ruleBlocks[] = (object)\compact('selectorsAsKeys', 'declarationsBlock');
            }
        }
    }
public function append(array $selectors, $declarationsBlock, $media = '')
    {
        $selectorsAsKeys = \array_flip($selectors);

        $mediaRule = $this->getOrCreateMediaRuleToAppendTo($media);
        $lastRuleBlock = \end($mediaRule->ruleBlocks);

        $hasSameDeclarationsAsLastRule = $lastRuleBlock !== false
            && $declarationsBlock === $lastRuleBlock->declarationsBlock;
        if ($hasSameDeclarationsAsLastRule) {
            $lastRuleBlock->selectorsAsKeys += $selectorsAsKeys;
        } else {
            $hasSameSelectorsAsLastRule = $lastRuleBlock !== false
                && static::hasEquivalentSelectors($selectorsAsKeys, $lastRuleBlock->selectorsAsKeys);
            if ($hasSameSelectorsAsLastRule) {
                $lastDeclarationsBlockWithoutSemicolon = \rtrim(\rtrim($lastRuleBlock->declarationsBlock), ';');
                $lastRuleBlock->declarationsBlock = $lastDeclarationsBlockWithoutSemicolon . ';' . $declarationsBlock;
            } else {
                $mediaRule->ruleBlocks[] = (object)\compact('selectorsAsKeys', 'declarationsBlock');
            }
        }
    }
public function append ( array $ selectors , $ declarationsBlock , $ media = '' ) { $ selectorsAsKeys = \ array_flip ( $ selectors ) ; $ mediaRule = $ this -> getOrCreateMediaRuleToAppendTo ( $ media ) ; $ lastRuleBlock = \ end ( $ mediaRule -> ruleBlocks ) ; $ hasSameDeclarationsAsLastRule = $ lastRuleBlock !== false && $ declarationsBlock === $ lastRuleBlock -> declarationsBlock ; if ( $ hasSameDeclarationsAsLastRule ) { $ lastRuleBlock -> selectorsAsKeys += $ selectorsAsKeys ; } else { $ hasSameSelectorsAsLastRule = $ lastRuleBlock !== false && static :: hasEquivalentSelectors ( $ selectorsAsKeys , $ lastRuleBlock -> selectorsAsKeys ) ; if ( $ hasSameSelectorsAsLastRule ) { $ lastDeclarationsBlockWithoutSemicolon = \ rtrim ( \ rtrim ( $ lastRuleBlock -> declarationsBlock ) , ';' ) ; $ lastRuleBlock -> declarationsBlock = $ lastDeclarationsBlockWithoutSemicolon . ';' . $ declarationsBlock ; } else { $ mediaRule -> ruleBlocks [ ] = ( object ) \ compact ( 'selectorsAsKeys' , 'declarationsBlock' ) ; } } }
Appends a declaration block to the CSS.

@param string[] $selectors Array of selectors for the rule, e.g. ["ul", "ol", "p:first-child"].
@param string $declarationsBlock The property declarations, e.g. "margin-top: 0.5em; padding: 0".
@param string $media The media query for the rule, e.g. "@media screen and (max-width:639px)",
or an empty string if none.
Appends a declaration block to the CSS .