4 * @license https://opensource.org/licenses/Apache-2.0 Apache-2.0
7 namespace Wikimedia\CSS\Objects;
10 * Represent a list of CSS declarations
12 class ComponentValueList extends CSSObjectList {
13 protected static $objectType = ComponentValue::class;
15 protected static function testObjects( array $objects ) {
16 foreach ( $objects as $object ) {
17 $type = $object instanceof Token ? $object->type() : 'n/a';
19 case Token::T_FUNCTION:
20 case Token::T_LEFT_BRACKET:
21 case Token::T_LEFT_PAREN:
22 case Token::T_LEFT_BRACE:
23 throw new \InvalidArgumentException(
24 static::class . " may not contain tokens of type \"$type\"."
31 public function toComponentValueArray() {
32 return $this->objects;