Update dependencies

This commit is contained in:
Chris Hunt
2024-02-16 21:36:54 +00:00
parent 22d7a59e59
commit d52ae0d3c3
9569 changed files with 460443 additions and 282416 deletions

View File

@@ -23,9 +23,9 @@ namespace Symfony\Component\CssSelector\Parser;
*/
class Reader
{
private $source;
private $length;
private $position = 0;
private string $source;
private int $length;
private int $position = 0;
public function __construct(string $source)
{
@@ -53,17 +53,14 @@ class Reader
return substr($this->source, $this->position + $offset, $length);
}
public function getOffset(string $string)
public function getOffset(string $string): int|false
{
$position = strpos($this->source, $string, $this->position);
return false === $position ? false : $position - $this->position;
}
/**
* @return array|false
*/
public function findPattern(string $pattern)
public function findPattern(string $pattern): array|false
{
$source = substr($this->source, $this->position);
@@ -74,12 +71,12 @@ class Reader
return false;
}
public function moveForward(int $length)
public function moveForward(int $length): void
{
$this->position += $length;
}
public function moveToEnd()
public function moveToEnd(): void
{
$this->position = $this->length;
}