Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/wpforms-.../vendor_p.../symfony/css-sele...
File: CssSelectorConverter.php
<?php
[0] Fix | Delete
[1] Fix | Delete
/*
[2] Fix | Delete
* This file is part of the Symfony package.
[3] Fix | Delete
*
[4] Fix | Delete
* (c) Fabien Potencier <fabien@symfony.com>
[5] Fix | Delete
*
[6] Fix | Delete
* For the full copyright and license information, please view the LICENSE
[7] Fix | Delete
* file that was distributed with this source code.
[8] Fix | Delete
*/
[9] Fix | Delete
namespace WPForms\Vendor\Symfony\Component\CssSelector;
[10] Fix | Delete
[11] Fix | Delete
use WPForms\Vendor\Symfony\Component\CssSelector\Parser\Shortcut\ClassParser;
[12] Fix | Delete
use WPForms\Vendor\Symfony\Component\CssSelector\Parser\Shortcut\ElementParser;
[13] Fix | Delete
use WPForms\Vendor\Symfony\Component\CssSelector\Parser\Shortcut\EmptyStringParser;
[14] Fix | Delete
use WPForms\Vendor\Symfony\Component\CssSelector\Parser\Shortcut\HashParser;
[15] Fix | Delete
use WPForms\Vendor\Symfony\Component\CssSelector\XPath\Extension\HtmlExtension;
[16] Fix | Delete
use WPForms\Vendor\Symfony\Component\CssSelector\XPath\Translator;
[17] Fix | Delete
/**
[18] Fix | Delete
* CssSelectorConverter is the main entry point of the component and can convert CSS
[19] Fix | Delete
* selectors to XPath expressions.
[20] Fix | Delete
*
[21] Fix | Delete
* @author Christophe Coevoet <stof@notk.org>
[22] Fix | Delete
*/
[23] Fix | Delete
class CssSelectorConverter
[24] Fix | Delete
{
[25] Fix | Delete
private $translator;
[26] Fix | Delete
/**
[27] Fix | Delete
* @param bool $html Whether HTML support should be enabled. Disable it for XML documents
[28] Fix | Delete
*/
[29] Fix | Delete
public function __construct($html = \true)
[30] Fix | Delete
{
[31] Fix | Delete
$this->translator = new Translator();
[32] Fix | Delete
if ($html) {
[33] Fix | Delete
$this->translator->registerExtension(new HtmlExtension($this->translator));
[34] Fix | Delete
}
[35] Fix | Delete
$this->translator->registerParserShortcut(new EmptyStringParser())->registerParserShortcut(new ElementParser())->registerParserShortcut(new ClassParser())->registerParserShortcut(new HashParser());
[36] Fix | Delete
}
[37] Fix | Delete
/**
[38] Fix | Delete
* Translates a CSS expression to its XPath equivalent.
[39] Fix | Delete
*
[40] Fix | Delete
* Optionally, a prefix can be added to the resulting XPath
[41] Fix | Delete
* expression with the $prefix parameter.
[42] Fix | Delete
*
[43] Fix | Delete
* @param string $cssExpr The CSS expression
[44] Fix | Delete
* @param string $prefix An optional prefix for the XPath expression
[45] Fix | Delete
*
[46] Fix | Delete
* @return string
[47] Fix | Delete
*/
[48] Fix | Delete
public function toXPath($cssExpr, $prefix = 'descendant-or-self::')
[49] Fix | Delete
{
[50] Fix | Delete
return $this->translator->cssToXPath($cssExpr, $prefix);
[51] Fix | Delete
}
[52] Fix | Delete
}
[53] Fix | Delete
[54] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function