updated packages
This commit is contained in:
@@ -41,11 +41,11 @@ class ClassParser implements ParserInterface
|
||||
// 2 => string 'input' (length=5)
|
||||
// 3 => string 'ab6bd_field' (length=11)
|
||||
if (preg_match('/^(?:([a-z]++)\|)?+([\w-]++|\*)?+\.([\w-]++)$/i', trim($source), $matches)) {
|
||||
return array(
|
||||
return [
|
||||
new SelectorNode(new ClassNode(new ElementNode($matches[1] ?: null, $matches[2] ?: null), $matches[3])),
|
||||
);
|
||||
];
|
||||
}
|
||||
|
||||
return array();
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,9 +39,9 @@ class ElementParser implements ParserInterface
|
||||
// 1 => string 'testns' (length=6)
|
||||
// 2 => string 'testel' (length=6)
|
||||
if (preg_match('/^(?:([a-z]++)\|)?([\w-]++|\*)$/i', trim($source), $matches)) {
|
||||
return array(new SelectorNode(new ElementNode($matches[1] ?: null, $matches[2])));
|
||||
return [new SelectorNode(new ElementNode($matches[1] ?: null, $matches[2]))];
|
||||
}
|
||||
|
||||
return array();
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,9 +38,9 @@ class EmptyStringParser implements ParserInterface
|
||||
{
|
||||
// Matches an empty string
|
||||
if ('' == $source) {
|
||||
return array(new SelectorNode(new ElementNode(null, '*')));
|
||||
return [new SelectorNode(new ElementNode(null, '*'))];
|
||||
}
|
||||
|
||||
return array();
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,11 +41,11 @@ class HashParser implements ParserInterface
|
||||
// 2 => string 'input' (length=5)
|
||||
// 3 => string 'ab6bd_field' (length=11)
|
||||
if (preg_match('/^(?:([a-z]++)\|)?+([\w-]++|\*)?+#([\w-]++)$/i', trim($source), $matches)) {
|
||||
return array(
|
||||
return [
|
||||
new SelectorNode(new HashNode(new ElementNode($matches[1] ?: null, $matches[2] ?: null), $matches[3])),
|
||||
);
|
||||
];
|
||||
}
|
||||
|
||||
return array();
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user