merged branch jakzal/domcrawler-missing-docblocks (PR #9025)

This PR was merged into the 2.2 branch.

Discussion
----------

[DomCrawler] Added missing docblocks and removed redundant type in a return annotation

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

d414213 [DomCrawler] Added missing docblocks and removed unneeded return annotation.
This commit is contained in:
Fabien Potencier 2013-09-13 15:28:25 +02:00
commit 454fbff3bd
1 changed files with 11 additions and 2 deletions

View File

@ -84,8 +84,6 @@ class Crawler extends \SplObjectStorage
* *
* @param string $content A string to parse as HTML/XML * @param string $content A string to parse as HTML/XML
* @param null|string $type The content type of the string * @param null|string $type The content type of the string
*
* @return null|void
*/ */
public function addContent($content, $type = null) public function addContent($content, $type = null)
{ {
@ -710,6 +708,11 @@ class Crawler extends \SplObjectStorage
return sprintf("concat(%s)", implode($parts, ', ')); return sprintf("concat(%s)", implode($parts, ', '));
} }
/**
* @param integer $position
*
* @return \DOMElement|null
*/
private function getNode($position) private function getNode($position)
{ {
foreach ($this as $i => $node) { foreach ($this as $i => $node) {
@ -723,6 +726,12 @@ class Crawler extends \SplObjectStorage
// @codeCoverageIgnoreEnd // @codeCoverageIgnoreEnd
} }
/**
* @param \DOMElement $node
* @param string $siblingDir
*
* @return array
*/
private function sibling($node, $siblingDir = 'nextSibling') private function sibling($node, $siblingDir = 'nextSibling')
{ {
$nodes = array(); $nodes = array();