Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
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 * A base interface for "CSS objects"
11 *
12 * Each object has a position and an ability to be turned into a sequence of
13 * Tokens.
14 */
15interface CSSObject {
16    /**
17     * Get the position of this object in the input stream
18     *
19     * Position is reported as one-based line and one-based codepoint within
20     * the line. If no position is available, returns -1 for both line and
21     * position.
22     *
23     * @return array [ $line, $pos ]
24     */
25    public function getPosition();
26
27    /**
28     * Return an array of Tokens that correspond to this object.
29     * @return Token[]
30     */
31    public function toTokenArray();
32
33    /**
34     * Return an array of ComponentValues that correspond to this object.
35     * @warning Do not return any Tokens that aren't valid in a ComponentValueList.
36     * @return ComponentValue[]
37     */
38    public function toComponentValueArray();
39}