Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Update PhpDoc comment #4518

Conversation

localheinz
Copy link
Member

Whilst looking at the code of Filter\Upload and Filter\UploadFile to see what they are about, PhpStorm complained.

@@ -213,7 +213,7 @@ public function isValid($value, $file = null)
*
* @param string $file
* @param string $errorType
* @return false
* @return bool
Copy link
Contributor

Choose a reason for hiding this comment

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

false is a valid phpDoc return type (see the phpDocumentor manual). bool would be misleading, as the method will never return true.

Copy link
Member Author

Choose a reason for hiding this comment

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

While bool is more generic, it is accurate enough, though.

Copy link
Member

Choose a reason for hiding this comment

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

It's not "accurate enough", though. It doesn't return either boolean, only false.

@ghost ghost assigned weierophinney May 23, 2013
weierophinney added a commit that referenced this pull request May 23, 2013
weierophinney added a commit that referenced this pull request May 23, 2013
weierophinney added a commit to zendframework/zend-validator that referenced this pull request May 15, 2015
…otfix/update-php-doc-comment

Update PhpDoc comment
weierophinney added a commit to zendframework/zend-validator that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-validator that referenced this pull request May 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants