diff --git a/composer.json b/composer.json index 937f955..7090ae4 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ } ], "require": { - "php": ">=5.6.0" + "php": ">=7.0.0" }, "require-dev": { "phpunit/phpunit": "^5.7.20" diff --git a/src/Formatter/Locale/deDE.json b/src/Formatter/Locale/deDE.json index cf7764f..ce48e91 100644 --- a/src/Formatter/Locale/deDE.json +++ b/src/Formatter/Locale/deDE.json @@ -1,4 +1,4 @@ -{ +{ "thousands_separator": ".", "decimal_separator": ",", "currency": "€", diff --git a/src/Parser/CssToXpath.php b/src/Parser/CssToXpath.php index d60b19e..7b26efb 100644 --- a/src/Parser/CssToXpath.php +++ b/src/Parser/CssToXpath.php @@ -103,9 +103,11 @@ private function removeSpacesFromDirectDecend($css) { public function getDepth($css) { - return count($this->split($css)); + $parts = $css->splitOnToken(Tokenizer::COLON); + return count($this->split($parts[0])); } + public function getPseudo($css) { $parts = $css->splitOnToken(Tokenizer::COLON); array_shift($parts);