zendframework/zf2 — pull request #4444 by weierophinney (2013-05-08 13:24:59+00:00)
Title: Issues found by hphp static analysis

I think I weeded out most of the false positives, but there may be a few still in there. For the TooManyArgument error it doesn't know about func_get_args(), so that is the most common false positive.

```
--------------------------------
File : library/Zend/Feed/Reader/Extension/CreativeCommons/Entry.php:56
Reason : BadConstructorCall
Snippet : new Zend\Feed\Reader\Extension\CreativeCommons\Feed($this->domDocument, $this->data['type'], $this->xpath)
Line : $cc = new Feed(
--------------------------------
File : library/Zend/Code/Scanner/Util.php:29
Reason : RequiredAfterOptionalParam
Snippet : $key = null
Line : public static function resolveImports(&$value, $key = null, stdClass $data)
--------------------------------
File : library/Zend/Mvc/View/Console/RouteNotFoundStrategy.php:165
Reason : TooManyArgument
Snippet : $this->getConsoleUsage($console, $scriptName, $mm, $router)
Line : $usage = $this->getConsoleUsage($console, $scriptName, $mm, $router);
--------------------------------
File : library/Zend/Mail/Storage/Folder/Maildir.php:196
Reason : TooManyArgument
Snippet : $this->_buildFolderTree($this->rootdir)
Line : $this->_buildFolderTree($this->rootdir);
--------------------------------
File : library/Zend/Mvc/View/Http/RouteNotFoundStrategy.php:196
Reason : TooManyArgument
Snippet : $this->injectNotFoundReason($model, $e)
Line : $this->injectNotFoundReason($model, $e);
--------------------------------
File : library/Zend/ServiceManager/Di/DiAbstractServiceFactory.php:43
Reason : TooManyArgument
Snippet : $this->get($requestedName, array(), true)
Line : return $this->get($requestedName, array(), true);
--------------------------------
File : library/Zend/ServiceManager/Di/DiAbstractServiceFactory.php:46
Reason : TooManyArgument
Snippet : $this->get($serviceName, array(), true)
Line : return $this->get($serviceName, array(), true);
--------------------------------
File : library/Zend/ServiceManager/Di/DiServiceFactory.php:84
Reason : TooManyArgument
Snippet : $this->get($this->name, $this->parameters, true)
Line : return $this->get($this->name, $this->parameters, true);
--------------------------------
File : library/Zend/Code/Generator/DocBlockGenerator.php:174
Reason : BadArgumentType
Snippet : parameter 3 of __construct() requires Object - exception, called with String
Line : throw new Exception\InvalidArgumentException(
--------------------------------
File : library/Zend/Validator/File/ExcludeMimeType.php:90
Reason : StatementHasNoEffect
Snippet : false;
Line : false;
--------------------------------
File : library/Zend/Cache/Storage/Adapter/RedisResourceManager.php:332
Reason : UseVoidReturn
Snippet : $this->normalizeLibOptionKey($key)
Line : $constValue = $this->normalizeLibOptionKey($key);
--------------------------------
File : library/Zend/Serializer/Adapter/PythonPickle.php:424
Reason : UseVoidReturn
Snippet : $this->write($k)
Line : $this->pickle .= $this->write($k) . $this->write($v) . self::OP_SETITEM;
--------------------------------
File : library/Zend/Serializer/Adapter/PythonPickle.php:424
Reason : UseVoidReturn
Snippet : $this->write($v)
Line : $this->pickle .= $this->write($k) . $this->write($v) . self::OP_SETITEM;
--------------------------------
File : library/Zend/Serializer/Adapter/PythonPickle.php:444
Reason : UseVoidReturn
Snippet : $this->write($v)
Line : $this->pickle .= $this->write($v) . self::OP_APPEND;
--------------------------------
File : library/Zend/Cache/Storage/Adapter/MemcachedResourceManager.php:285
Reason : UseVoidReturn
Snippet : $this->normalizeLibOptionKey($key)
Line : $constValue = $this->normalizeLibOptionKey($key);
--------------------------------
File : library/Zend/Mvc/Controller/AbstractRestfulController.php:316
Reason : UseVoidReturn
Snippet : $this->deleteList()
Line : $return = $this->deleteList();
--------------------------------
File : library/Zend/Mvc/Controller/AbstractRestfulController.php:354
Reason : UseVoidReturn
Snippet : $this->patch($id, $data)
Line : $return = $this->patch($id, $data);
--------------------------------
File : library/Zend/Mvc/Controller/AbstractRestfulController.php:363
Reason : UseVoidReturn
Snippet : $this->patchList($data)
Line : $return = $this->patchList($data);
--------------------------------
File : library/Zend/Mvc/Controller/AbstractRestfulController.php:387
Reason : UseVoidReturn
Snippet : $this->replaceList($data)
Line : $return = $this->replaceList($data);
```