Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Update PhpDoc comment #4518

Closed
wants to merge 2 commits into from

3 participants

@localheinz

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

library/Zend/Validator/File/Upload.php
@@ -213,7 +213,7 @@ public function isValid($value, $file = null)
*
* @param string $file
* @param string $errorType
- * @return false
+ * @return bool
@micheh
micheh added a note

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

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

@weierophinney Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@ghost Unknown referenced this pull request from a commit
@weierophinney weierophinney Merge branch 'hotfix/4518'
Close #4518
395987c
@weierophinney weierophinney referenced this pull request from a commit in zendframework/zend-validator
@weierophinney weierophinney Merge pull request zendframework/zf2#4518 from localheinz/hotfix/upda…
…te-php-doc-comment

Update PhpDoc comment
6d6acc0
@weierophinney weierophinney referenced this pull request from a commit in zendframework/zend-validator
@weierophinney weierophinney Merge branch 'hotfix/4518' 07613c3
@weierophinney weierophinney referenced this pull request from a commit in zendframework/zend-validator
@weierophinney weierophinney Merge branch 'hotfix/4518' into develop 2ce1627
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 22, 2013
  1. @localheinz

    Update PhpDoc comment

    localheinz authored
  2. @localheinz

    Revert change

    localheinz authored
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 0 deletions.
  1. +1 −0  library/Zend/Validator/File/UploadFile.php
View
1  library/Zend/Validator/File/UploadFile.php
@@ -52,6 +52,7 @@ class UploadFile extends AbstractValidator
*
* @param string $value File to check for upload errors
* @return bool
+ * @throws Exception\InvalidArgumentException
*/
public function isValid($value)
{
Something went wrong with that request. Please try again.