package and depencies

This commit is contained in:
RafficMohammed
2023-01-08 02:57:24 +05:30
parent d5332eb421
commit 1d54b8bc7f
4309 changed files with 193331 additions and 172289 deletions

View File

@@ -23,9 +23,9 @@ namespace Symfony\Component\CssSelector\XPath;
*/
class XPathExpr
{
private $path;
private $element;
private $condition;
private string $path;
private string $element;
private string $condition;
public function __construct(string $path = '', string $element = '*', string $condition = '', bool $starPrefix = false)
{
@@ -46,7 +46,7 @@ class XPathExpr
/**
* @return $this
*/
public function addCondition(string $condition): self
public function addCondition(string $condition): static
{
$this->condition = $this->condition ? sprintf('(%s) and (%s)', $this->condition, $condition) : $condition;
@@ -61,7 +61,7 @@ class XPathExpr
/**
* @return $this
*/
public function addNameTest(): self
public function addNameTest(): static
{
if ('*' !== $this->element) {
$this->addCondition('name() = '.Translator::getXpathLiteral($this->element));
@@ -74,7 +74,7 @@ class XPathExpr
/**
* @return $this
*/
public function addStarPrefix(): self
public function addStarPrefix(): static
{
$this->path .= '*/';
@@ -86,7 +86,7 @@ class XPathExpr
*
* @return $this
*/
public function join(string $combiner, self $expr): self
public function join(string $combiner, self $expr): static
{
$path = $this->__toString().$combiner;