minor #16012 fixed typos (fabpot)
This PR was squashed before being merged into the 2.8 branch (closes #16012).
Discussion
----------
fixed typos
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Commits
-------
3d117ff
fixed typos
This commit is contained in:
commit
bccbf7745c
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\CssSelector;
|
||||
|
||||
@trigger_error('The '.__NAMESPACE__.'\CssSelector class is deprecated since version 2.8 and will be removed in 3.0. Use directly the \Symfony\Component\CssSelector\Converter class instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__NAMESPACE__.'\CssSelector class is deprecated since version 2.8 and will be removed in 3.0. Use directly the \Symfony\Component\CssSelector\CssSelectorConverter class instead.', E_USER_DEPRECATED);
|
||||
|
||||
/**
|
||||
* CssSelector is the main entry point of the component and can convert CSS
|
||||
@ -57,7 +57,7 @@ namespace Symfony\Component\CssSelector;
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @deprecated as of 2.8, will be removed in 3.0. Use the \Symfony\Component\CssSelector\Converter class instead.
|
||||
* @deprecated as of 2.8, will be removed in 3.0. Use the \Symfony\Component\CssSelector\CssSelectorConverter class instead.
|
||||
*/
|
||||
class CssSelector
|
||||
{
|
||||
@ -75,7 +75,7 @@ class CssSelector
|
||||
*/
|
||||
public static function toXPath($cssExpr, $prefix = 'descendant-or-self::')
|
||||
{
|
||||
$converter = new Converter(self::$html);
|
||||
$converter = new CssSelectorConverter(self::$html);
|
||||
|
||||
return $converter->toXPath($cssExpr, $prefix);
|
||||
}
|
||||
|
@ -11,13 +11,13 @@
|
||||
|
||||
namespace Symfony\Component\CssSelector\Tests;
|
||||
|
||||
use Symfony\Component\CssSelector\Converter;
|
||||
use Symfony\Component\CssSelector\CssSelectorConverter;
|
||||
|
||||
class ConverterTest extends \PHPUnit_Framework_TestCase
|
||||
class CssSelectorConverterTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testCssToXPath()
|
||||
{
|
||||
$converter = new Converter();
|
||||
$converter = new CssSelectorConverter();
|
||||
|
||||
$this->assertEquals('descendant-or-self::*', $converter->toXPath(''));
|
||||
$this->assertEquals('descendant-or-self::h1', $converter->toXPath('h1'));
|
||||
@ -29,7 +29,7 @@ class ConverterTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testCssToXPathXml()
|
||||
{
|
||||
$converter = new Converter(false);
|
||||
$converter = new CssSelectorConverter(false);
|
||||
|
||||
$this->assertEquals('descendant-or-self::H1', $converter->toXPath('H1'));
|
||||
}
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\DomCrawler;
|
||||
|
||||
use Symfony\Component\CssSelector\Converter;
|
||||
use Symfony\Component\CssSelector\CssSelectorConverter;
|
||||
|
||||
/**
|
||||
* Crawler eases navigation of a list of \DOMElement objects.
|
||||
@ -41,7 +41,7 @@ class Crawler extends \SplObjectStorage
|
||||
private $baseHref;
|
||||
|
||||
/**
|
||||
* Whether the Crawler contains HTML or XML content (used when converting CSS to XPath)
|
||||
* Whether the Crawler contains HTML or XML content (used when converting CSS to XPath).
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
@ -659,11 +659,11 @@ class Crawler extends \SplObjectStorage
|
||||
*/
|
||||
public function filter($selector)
|
||||
{
|
||||
if (!class_exists('Symfony\\Component\\CssSelector\\Converter')) {
|
||||
if (!class_exists('Symfony\\Component\\CssSelector\\CssSelectorConverter')) {
|
||||
throw new \RuntimeException('Unable to filter with a CSS selector as the Symfony CssSelector 2.8+ is not installed (you can use filterXPath instead).');
|
||||
}
|
||||
|
||||
$converter = new Converter($this->isHtml);
|
||||
$converter = new CssSelectorConverter($this->isHtml);
|
||||
|
||||
// The CssSelector already prefixes the selector with descendant-or-self::
|
||||
return $this->filterRelativeXPath($converter->toXPath($selector));
|
||||
@ -1142,7 +1142,7 @@ class Crawler extends \SplObjectStorage
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a crawler for some subnodes
|
||||
* Creates a crawler for some subnodes.
|
||||
*
|
||||
* @param \DOMElement|\DOMElement[]|\DOMNodeList|null $nodes
|
||||
*
|
||||
|
Reference in New Issue
Block a user