8000 [DomCrawler] fix missing null in phpdoc by Simperfit · Pull Request #32345 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[DomCrawler] fix missing null in phpdoc #32345

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
Closed
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
[DomCrawler] fix missing null in phpdoc
  • Loading branch information
Simperfit committed Jul 3, 2019
commit ff313e1449807aac347d07bc7283a6eec30bc328
14 changes: 7 additions & 7 deletions src/Symfony/Component/DomCrawler/Crawler.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ class Crawler implements \Countable, \IteratorAggregate
private $isHtml = true;

/**
* @param mixed $node A Node to use as the base for the crawling
* @param string $uri The current URI
* @param string $baseHref The base href value
* @param mixed|null $node A Node to use as the base for the crawling
* @param string|null $uri The current URI
* @param string|null $baseHref The base href value
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unsure what our CS rules are about that, but these changes feel a bit redundant… mixed can be literally anything, including null. And the other two parameters already default to null. 😕

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can be null in the sense that it's optional, so I don't see why we should change the phpdocs. Let's try to limit the changes to phpdocs to the bare minimum. We are spending too much time on that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it also allows passing null explicitly (being optional does not mean you always accept null)

*/
public function __construct($node = null, $uri = null, $baseHref = null)
{
Expand Down Expand Up @@ -374,8 +374,8 @@ public function each(\Closure $closure)
/**
* Slices the list of nodes by $offset and $length.
*
* @param int $offset
* @param int $length
* @param int $offset
* @param int|null $length
*
* @return self
*/
Expand Down Expand Up @@ -836,8 +836,8 @@ public function images()
/**
* Returns a Form object for the first node in the list.
*
* @param array $values An array of values for the form fields
* @param string $method The method for the form
* @param array|null $values An array of values for the form fields
* @param string|null $method The method for the form
*
* @return Form A Form instance
*
Expand Down
0