Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
DeclarationList
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
1 / 1
2
100.00% covered (success)
100.00%
1 / 1
 getSeparator
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
1 / 1
2
1<?php
2/**
3 * @file
4 * @license https://opensource.org/licenses/Apache-2.0 Apache-2.0
5 */
6
7namespace Wikimedia\CSS\Objects;
8
9/**
10 * Represent a list of declarations
11 */
12class DeclarationList extends CSSObjectList {
13    /**
14     * @var string
15     */
16    protected static $objectType = Declaration::class;
17
18    /** @inheritDoc */
19    protected function getSeparator( CSSObject $left, CSSObject $right = null ) {
20        if ( $right ) {
21            return [
22                new Token( Token::T_SEMICOLON ),
23                new Token( Token::T_WHITESPACE, [ 'significant' => false ] ),
24            ];
25        }
26
27        return [ new Token( Token::T_SEMICOLON, [ 'significant' => false ] ) ];
28    }
29}