: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* This file is part of the Symfony package.
* (c) Fabien Potencier <fabien@symfony.com>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
namespace WPForms\Vendor\Symfony\Component\CssSelector\Parser;
* This component is a port of the Python cssselect library,
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
const TYPE_FILE_END = 'eof';
const TYPE_DELIMITER = 'delimiter';
const TYPE_WHITESPACE = 'whitespace';
const TYPE_IDENTIFIER = 'identifier';
const TYPE_HASH = 'hash';
const TYPE_NUMBER = 'number';
const TYPE_STRING = 'string';
public function __construct($type, $value, $position)
$this->position = $position;
public function getType()
public function getValue()
public function getPosition()
public function isFileEnd()
return self::TYPE_FILE_END === $this->type;
public function isDelimiter(array $values = array())
if (self::TYPE_DELIMITER !== $this->type) {
return \in_array($this->value, $values);
public function isWhitespace()
return self::TYPE_WHITESPACE === $this->type;
public function isIdentifier()
return self::TYPE_IDENTIFIER === $this->type;
return self::TYPE_HASH === $this->type;
public function isNumber()
return self::TYPE_NUMBER === $this->type;
public function isString()
return self::TYPE_STRING === $this->type;
public function __toString()
return \sprintf('<%s "%s" at %s>', $this->type, $this->value, $this->position);
return \sprintf('<%s at %s>', $this->type, $this->position);