Skip to content

Commit bccbf77

Browse files
committed
minor symfony#16012 fixed typos (fabpot)
This PR was squashed before being merged into the 2.8 branch (closes symfony#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
2 parents bb4a511 + 3d117ff commit bccbf77

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

src/Symfony/Component/CssSelector/CssSelector.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Component\CssSelector;
1313

14-
@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);
14+
@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);
1515

1616
/**
1717
* CssSelector is the main entry point of the component and can convert CSS
@@ -57,7 +57,7 @@
5757
*
5858
* @author Fabien Potencier <[email protected]>
5959
*
60-
* @deprecated as of 2.8, will be removed in 3.0. Use the \Symfony\Component\CssSelector\Converter class instead.
60+
* @deprecated as of 2.8, will be removed in 3.0. Use the \Symfony\Component\CssSelector\CssSelectorConverter class instead.
6161
*/
6262
class CssSelector
6363
{
@@ -75,7 +75,7 @@ class CssSelector
7575
*/
7676
public static function toXPath($cssExpr, $prefix = 'descendant-or-self::')
7777
{
78-
$converter = new Converter(self::$html);
78+
$converter = new CssSelectorConverter(self::$html);
7979

8080
return $converter->toXPath($cssExpr, $prefix);
8181
}

src/Symfony/Component/CssSelector/Tests/ConverterTest.php renamed to src/Symfony/Component/CssSelector/Tests/CssSelectorConverterTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111

1212
namespace Symfony\Component\CssSelector\Tests;
1313

14-
use Symfony\Component\CssSelector\Converter;
14+
use Symfony\Component\CssSelector\CssSelectorConverter;
1515

16-
class ConverterTest extends \PHPUnit_Framework_TestCase
16+
class CssSelectorConverterTest extends \PHPUnit_Framework_TestCase
1717
{
1818
public function testCssToXPath()
1919
{
20-
$converter = new Converter();
20+
$converter = new CssSelectorConverter();
2121

2222
$this->assertEquals('descendant-or-self::*', $converter->toXPath(''));
2323
$this->assertEquals('descendant-or-self::h1', $converter->toXPath('h1'));
@@ -29,7 +29,7 @@ public function testCssToXPath()
2929

3030
public function testCssToXPathXml()
3131
{
32-
$converter = new Converter(false);
32+
$converter = new CssSelectorConverter(false);
3333

3434
$this->assertEquals('descendant-or-self::H1', $converter->toXPath('H1'));
3535
}

src/Symfony/Component/DomCrawler/Crawler.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Component\DomCrawler;
1313

14-
use Symfony\Component\CssSelector\Converter;
14+
use Symfony\Component\CssSelector\CssSelectorConverter;
1515

1616
/**
1717
* Crawler eases navigation of a list of \DOMElement objects.
@@ -41,7 +41,7 @@ class Crawler extends \SplObjectStorage
4141
private $baseHref;
4242

4343
/**
44-
* Whether the Crawler contains HTML or XML content (used when converting CSS to XPath)
44+
* Whether the Crawler contains HTML or XML content (used when converting CSS to XPath).
4545
*
4646
* @var bool
4747
*/
@@ -659,11 +659,11 @@ public function filterXPath($xpath)
659659
*/
660660
public function filter($selector)
661661
{
662-
if (!class_exists('Symfony\\Component\\CssSelector\\Converter')) {
662+
if (!class_exists('Symfony\\Component\\CssSelector\\CssSelectorConverter')) {
663663
throw new \RuntimeException('Unable to filter with a CSS selector as the Symfony CssSelector 2.8+ is not installed (you can use filterXPath instead).');
664664
}
665665

666-
$converter = new Converter($this->isHtml);
666+
$converter = new CssSelectorConverter($this->isHtml);
667667

668668
// The CssSelector already prefixes the selector with descendant-or-self::
669669
return $this->filterRelativeXPath($converter->toXPath($selector));
@@ -1142,7 +1142,7 @@ private function findNamespacePrefixes($xpath)
11421142
}
11431143

11441144
/**
1145-
* Creates a crawler for some subnodes
1145+
* Creates a crawler for some subnodes.
11461146
*
11471147
* @param \DOMElement|\DOMElement[]|\DOMNodeList|null $nodes
11481148
*

0 commit comments

Comments
 (0)