Skip to content

fixed typos #16012

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Symfony/Component/CssSelector/CssSelector.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -57,7 +57,7 @@
*
* @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
{
Expand All @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand All @@ -29,7 +29,7 @@ public function testCssToXPath()

public function testCssToXPathXml()
{
$converter = new Converter(false);
$converter = new CssSelectorConverter(false);

$this->assertEquals('descendant-or-self::H1', $converter->toXPath('H1'));
}
Expand Down
10 changes: 5 additions & 5 deletions src/Symfony/Component/DomCrawler/Crawler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
*/
Expand Down Expand Up @@ -659,11 +659,11 @@ public function filterXPath($xpath)
*/
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));
Expand Down Expand Up @@ -1142,7 +1142,7 @@ private function findNamespacePrefixes($xpath)
}

/**
* Creates a crawler for some subnodes
* Creates a crawler for some subnodes.
*
* @param \DOMElement|\DOMElement[]|\DOMNodeList|null $nodes
*
Expand Down