From db76685a51d140be041f22e5ec2b1a9bd9901331 Mon Sep 17 00:00:00 2001 From: Chris Martin Date: Thu, 30 Aug 2012 12:30:52 -0400 Subject: [PATCH 001/154] Create a default Input (InputFilter) for form elements without one --- library/Zend/Form/Form.php | 16 ++++++++++------ tests/ZendTest/Form/FormTest.php | 8 ++++++++ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/library/Zend/Form/Form.php b/library/Zend/Form/Form.php index 3ae915b7a26..4092cb70b72 100644 --- a/library/Zend/Form/Form.php +++ b/library/Zend/Form/Form.php @@ -622,15 +622,19 @@ public function attachInputFilterDefaults(InputFilterInterface $inputFilter, Fie $formFactory = $this->getFormFactory(); $inputFactory = $formFactory->getInputFilterFactory(); foreach ($fieldset->getElements() as $element) { + $name = $element->getName(); + if (!$element instanceof InputProviderInterface) { - // only interested in the element if it provides input information - continue; + if ($inputFilter->has($name)) { + continue; + } + // Create a new empty default input for this element + $spec = array('name' => $name, 'required' => false); + } else { + // Create an input based on the specification returned from the element + $spec = $element->getInputSpecification(); } - $name = $element->getName(); - - // Create an input based on the specification returned from the element - $spec = $element->getInputSpecification(); $input = $inputFactory->createInput($spec); $inputFilter->add($input, $name); } diff --git a/tests/ZendTest/Form/FormTest.php b/tests/ZendTest/Form/FormTest.php index 34f1d1f8104..5bfb6bbef02 100644 --- a/tests/ZendTest/Form/FormTest.php +++ b/tests/ZendTest/Form/FormTest.php @@ -159,6 +159,14 @@ public function testCanComposeAnInputFilter() $this->assertSame($filter, $this->form->getInputFilter()); } + public function testDefaultNonRequiredInputFilterIsSet() + { + $this->form->add(new Element('foo')); + $inputFilter = $this->form->getInputFilter(); + $fooInput = $inputFilter->get('foo'); + $this->assertFalse($fooInput->isRequired()); + } + public function testCallingIsValidRaisesExceptionIfNoDataSet() { $this->setExpectedException('Zend\Form\Exception\DomainException'); From 414907c904a4ee8b7771bf9ce65fd94cdc39ae8f Mon Sep 17 00:00:00 2001 From: Michel Hunziker Date: Thu, 30 Aug 2012 22:02:23 +0200 Subject: [PATCH 002/154] Update phpDoc to match php code --- library/Zend/Barcode/Object/Code128.php | 1 + library/Zend/Barcode/Object/Error.php | 1 + library/Zend/Barcode/Renderer/Image.php | 4 ++-- library/Zend/Cache/Storage/Adapter/Apc.php | 2 +- library/Zend/Cache/Storage/Adapter/Dba.php | 2 +- library/Zend/Cache/Storage/ExceptionEvent.php | 8 +++---- .../Reflection/DocBlock/Tag/PropertyTag.php | 2 +- .../Zend/Db/Adapter/ParameterContainer.php | 3 ++- .../Adapter/StatementContainerInterface.php | 1 + .../Zend/Db/Sql/Platform/AbstractPlatform.php | 3 ++- .../Zend/Db/Sql/PreparableSqlInterface.php | 2 +- library/Zend/Dom/Query.php | 3 ++- library/Zend/EventManager/EventManager.php | 2 +- library/Zend/Feed/Reader/AbstractFeed.php | 2 +- library/Zend/Feed/Reader/Entry/Rss.php | 2 +- .../Extension/CreativeCommons/Entry.php | 1 + .../Reader/Extension/CreativeCommons/Feed.php | 1 + .../Reader/Extension/DublinCore/Entry.php | 2 +- .../Feed/Reader/Extension/Thread/Entry.php | 1 - .../Zend/Feed/Reader/Feed/AbstractFeed.php | 2 +- library/Zend/Feed/Writer/AbstractFeed.php | 13 +++++----- library/Zend/Feed/Writer/Entry.php | 24 +++++++++---------- .../Feed/Writer/Extension/ITunes/Feed.php | 2 +- .../Feed/Writer/Renderer/Feed/AtomSource.php | 2 +- .../Zend/Feed/Writer/Renderer/Feed/Rss.php | 4 ++-- library/Zend/File/Transfer/Adapter/Http.php | 3 +-- library/Zend/Filter/Callback.php | 6 +++-- library/Zend/Filter/Compress/Bz2.php | 3 ++- library/Zend/Filter/Inflector.php | 2 +- library/Zend/Filter/Null.php | 2 +- library/Zend/Filter/RealPath.php | 3 ++- library/Zend/Filter/StringToLower.php | 2 +- library/Zend/Filter/StringToUpper.php | 2 +- library/Zend/Filter/StringTrim.php | 2 +- library/Zend/Filter/Word/DashToUnderscore.php | 2 -- .../Filter/Word/UnderscoreToSeparator.php | 2 +- library/Zend/Http/Client/Cookies.php | 2 +- library/Zend/Http/Cookies.php | 2 +- library/Zend/Http/Header/AbstractAccept.php | 2 +- library/Zend/Http/Header/Accept.php | 2 +- library/Zend/Json/Encoder.php | 2 +- library/Zend/Json/Server/Server.php | 1 + library/Zend/Json/Server/Smd.php | 2 +- library/Zend/Log/Logger.php | 3 ++- .../Feature/BootstrapListenerInterface.php | 1 + .../ModuleManager/Listener/ConfigListener.php | 7 ++++-- library/Zend/Serializer/Serializer.php | 4 ++-- library/Zend/Server/Method/Prototype.php | 2 +- .../Server/Reflection/AbstractFunction.php | 2 +- library/Zend/Server/Server.php | 2 +- .../Di/DiServiceInitializer.php | 2 ++ library/Zend/Soap/Wsdl.php | 2 +- .../ComplexTypeStrategyInterface.php | 6 +++-- .../Wsdl/ComplexTypeStrategy/Composite.php | 1 - library/Zend/Stdlib/CallbackHandler.php | 3 +-- library/Zend/Text/Table/Table.php | 1 - library/Zend/Uri/Mailto.php | 4 ++-- library/Zend/Validator/Uri.php | 2 +- library/Zend/View/Helper/Cycle.php | 1 - library/Zend/View/Helper/HeadStyle.php | 1 - library/Zend/View/Helper/HtmlList.php | 1 + .../Container/AbstractContainer.php | 1 + library/Zend/View/Model/ModelInterface.php | 10 ++++---- library/Zend/View/Model/ViewModel.php | 3 ++- library/Zend/View/Renderer/FeedRenderer.php | 5 ++-- library/Zend/View/Renderer/JsonRenderer.php | 5 ++-- library/Zend/XmlRpc/Client/ServerProxy.php | 2 +- library/Zend/XmlRpc/Value/Base64.php | 2 +- 68 files changed, 113 insertions(+), 92 deletions(-) diff --git a/library/Zend/Barcode/Object/Code128.php b/library/Zend/Barcode/Object/Code128.php index c50f751562a..e1e51d48464 100644 --- a/library/Zend/Barcode/Object/Code128.php +++ b/library/Zend/Barcode/Object/Code128.php @@ -195,6 +195,7 @@ protected static function _isDigit($string, $pos, $length = 2) /** * Convert string to barcode string + * @param string $string * @return array */ protected function convertToBarcodeChars($string) diff --git a/library/Zend/Barcode/Object/Error.php b/library/Zend/Barcode/Object/Error.php index 18aa46e3089..91c6192c7fc 100644 --- a/library/Zend/Barcode/Object/Error.php +++ b/library/Zend/Barcode/Object/Error.php @@ -30,6 +30,7 @@ public function validateText($value) /** * Height is forced + * @param bool $recalculate * @return integer */ public function getHeight($recalculate = false) diff --git a/library/Zend/Barcode/Renderer/Image.php b/library/Zend/Barcode/Renderer/Image.php index f3930ffb1ee..ed1608faa07 100644 --- a/library/Zend/Barcode/Renderer/Image.php +++ b/library/Zend/Barcode/Renderer/Image.php @@ -135,9 +135,9 @@ public function getWidth() /** * Set an image resource to draw the barcode inside * - * @param resource $value + * @param resource $image * @return Image - * @throw Exception + * @throws Exception\InvalidArgumentException */ public function setResource($image) { diff --git a/library/Zend/Cache/Storage/Adapter/Apc.php b/library/Zend/Cache/Storage/Adapter/Apc.php index 3785ecb4adc..c5cee10e022 100644 --- a/library/Zend/Cache/Storage/Adapter/Apc.php +++ b/library/Zend/Cache/Storage/Adapter/Apc.php @@ -166,7 +166,7 @@ public function flush() /** * Remove items by given namespace * - * @param string $prefix + * @param string $namespace * @return boolean */ public function clearByNamespace($namespace) diff --git a/library/Zend/Cache/Storage/Adapter/Dba.php b/library/Zend/Cache/Storage/Adapter/Dba.php index a85ac19a8f5..902498eb130 100644 --- a/library/Zend/Cache/Storage/Adapter/Dba.php +++ b/library/Zend/Cache/Storage/Adapter/Dba.php @@ -209,7 +209,7 @@ public function flush() /** * Remove items by given namespace * - * @param string $prefix + * @param string $namespace * @return boolean */ public function clearByNamespace($namespace) diff --git a/library/Zend/Cache/Storage/ExceptionEvent.php b/library/Zend/Cache/Storage/ExceptionEvent.php index d9ac2942d30..f2eaf99f9fc 100644 --- a/library/Zend/Cache/Storage/ExceptionEvent.php +++ b/library/Zend/Cache/Storage/ExceptionEvent.php @@ -39,11 +39,11 @@ class ExceptionEvent extends PostEvent * * Accept a target and its parameters. * - * @param string $name - * @param Adapter $storage + * @param string $name + * @param StorageInterface $storage * @param ArrayObject $params - * @param mixed $result - * @param Exception $exception + * @param mixed $result + * @param Exception $exception */ public function __construct($name, StorageInterface $storage, ArrayObject $params, & $result, Exception $exception) { diff --git a/library/Zend/Code/Reflection/DocBlock/Tag/PropertyTag.php b/library/Zend/Code/Reflection/DocBlock/Tag/PropertyTag.php index 026b7a4b893..d65b51996b2 100644 --- a/library/Zend/Code/Reflection/DocBlock/Tag/PropertyTag.php +++ b/library/Zend/Code/Reflection/DocBlock/Tag/PropertyTag.php @@ -42,7 +42,7 @@ public function getName() /** * Initializer * - * @param string $tagDocBlockLine + * @param string $tagDocblockLine */ public function initialize($tagDocblockLine) { diff --git a/library/Zend/Db/Adapter/ParameterContainer.php b/library/Zend/Db/Adapter/ParameterContainer.php index 773aba62973..ac3b1fa9830 100644 --- a/library/Zend/Db/Adapter/ParameterContainer.php +++ b/library/Zend/Db/Adapter/ParameterContainer.php @@ -285,7 +285,8 @@ public function rewind() } /** - * @param array $array + * @param array|ParameterContainer $parameters + * @throws Exception\InvalidArgumentException * @return ParameterContainer */ public function merge($parameters) diff --git a/library/Zend/Db/Adapter/StatementContainerInterface.php b/library/Zend/Db/Adapter/StatementContainerInterface.php index 29423d0481f..275a6d461bf 100644 --- a/library/Zend/Db/Adapter/StatementContainerInterface.php +++ b/library/Zend/Db/Adapter/StatementContainerInterface.php @@ -32,6 +32,7 @@ public function getSql(); /** * @abstract + * @param ParameterContainer $parameterContainer * @return mixed */ public function setParameterContainer(ParameterContainer $parameterContainer); diff --git a/library/Zend/Db/Sql/Platform/AbstractPlatform.php b/library/Zend/Db/Sql/Platform/AbstractPlatform.php index 79f9daf2ecd..5bc0c430f18 100644 --- a/library/Zend/Db/Sql/Platform/AbstractPlatform.php +++ b/library/Zend/Db/Sql/Platform/AbstractPlatform.php @@ -56,7 +56,8 @@ public function getDecorators() /** * @param Adapter $adapter - * @param StatementContainerInterface $statement + * @param StatementContainerInterface $statementContainer + * @throws Exception\RuntimeException * @return void */ public function prepareStatement(Adapter $adapter, StatementContainerInterface $statementContainer) diff --git a/library/Zend/Db/Sql/PreparableSqlInterface.php b/library/Zend/Db/Sql/PreparableSqlInterface.php index 892f776f60c..14641db5755 100644 --- a/library/Zend/Db/Sql/PreparableSqlInterface.php +++ b/library/Zend/Db/Sql/PreparableSqlInterface.php @@ -23,7 +23,7 @@ interface PreparableSqlInterface /** * @param Adapter $adapter - * @param StatementContainerInterface + * @param StatementContainerInterface $statementContainer * @return void */ public function prepareStatement(Adapter $adapter, StatementContainerInterface $statementContainer); diff --git a/library/Zend/Dom/Query.php b/library/Zend/Dom/Query.php index 207313070af..76f1b07b921 100644 --- a/library/Zend/Dom/Query.php +++ b/library/Zend/Dom/Query.php @@ -67,7 +67,8 @@ class Query /** * Constructor * - * @param null|string $document + * @param null|string $document + * @param null|string $encoding */ public function __construct($document = null, $encoding = null) { diff --git a/library/Zend/EventManager/EventManager.php b/library/Zend/EventManager/EventManager.php index e2a2f35aedd..dce7e5b7435 100644 --- a/library/Zend/EventManager/EventManager.php +++ b/library/Zend/EventManager/EventManager.php @@ -79,7 +79,7 @@ public function setEventClass($class) /** * Set shared event manager * - * @param SharedEventManagerInterface $connections + * @param SharedEventManagerInterface $sharedEventManager * @return EventManager */ public function setSharedManager(SharedEventManagerInterface $sharedEventManager) diff --git a/library/Zend/Feed/Reader/AbstractFeed.php b/library/Zend/Feed/Reader/AbstractFeed.php index 167e2b7c62e..3417a257c0e 100644 --- a/library/Zend/Feed/Reader/AbstractFeed.php +++ b/library/Zend/Feed/Reader/AbstractFeed.php @@ -72,7 +72,7 @@ abstract class AbstractFeed implements Feed\FeedInterface /** * Constructor * - * @param DomDocument The DOM object for the feed's XML + * @param DomDocument $domDocument The DOM object for the feed's XML * @param string $type Feed type */ public function __construct(DOMDocument $domDocument, $type = null) diff --git a/library/Zend/Feed/Reader/Entry/Rss.php b/library/Zend/Feed/Reader/Entry/Rss.php index 586a5f6aa2f..93080caddb9 100644 --- a/library/Zend/Feed/Reader/Entry/Rss.php +++ b/library/Zend/Feed/Reader/Entry/Rss.php @@ -71,7 +71,7 @@ public function __construct(DOMElement $entry, $entryKey, $type = null) /** * Get an author entry * - * @param DOMElement $element + * @param int $index * @return string */ public function getAuthor($index = 0) diff --git a/library/Zend/Feed/Reader/Extension/CreativeCommons/Entry.php b/library/Zend/Feed/Reader/Extension/CreativeCommons/Entry.php index 551d5f90e90..77c529a326c 100644 --- a/library/Zend/Feed/Reader/Extension/CreativeCommons/Entry.php +++ b/library/Zend/Feed/Reader/Extension/CreativeCommons/Entry.php @@ -22,6 +22,7 @@ class Entry extends Extension\AbstractEntry /** * Get the entry license * + * @param int $index * @return string|null */ public function getLicense($index = 0) diff --git a/library/Zend/Feed/Reader/Extension/CreativeCommons/Feed.php b/library/Zend/Feed/Reader/Extension/CreativeCommons/Feed.php index dc443fa218b..2129c13c484 100644 --- a/library/Zend/Feed/Reader/Extension/CreativeCommons/Feed.php +++ b/library/Zend/Feed/Reader/Extension/CreativeCommons/Feed.php @@ -22,6 +22,7 @@ class Feed extends Extension\AbstractFeed /** * Get the entry license * + * @param int $index * @return string|null */ public function getLicense($index = 0) diff --git a/library/Zend/Feed/Reader/Extension/DublinCore/Entry.php b/library/Zend/Feed/Reader/Extension/DublinCore/Entry.php index beb04c42d6f..f446c25d12b 100644 --- a/library/Zend/Feed/Reader/Extension/DublinCore/Entry.php +++ b/library/Zend/Feed/Reader/Extension/DublinCore/Entry.php @@ -25,7 +25,7 @@ class Entry extends Extension\AbstractEntry /** * Get an author entry * - * @param DOMElement $element + * @param int $index * @return string */ public function getAuthor($index = 0) diff --git a/library/Zend/Feed/Reader/Extension/Thread/Entry.php b/library/Zend/Feed/Reader/Extension/Thread/Entry.php index 604154fdb01..81012b464e1 100644 --- a/library/Zend/Feed/Reader/Extension/Thread/Entry.php +++ b/library/Zend/Feed/Reader/Extension/Thread/Entry.php @@ -44,7 +44,6 @@ public function getCommentCount() * Get the entry data specified by name * * @param string $name - * @param string $type * @return mixed|null */ protected function getData($name) diff --git a/library/Zend/Feed/Reader/Feed/AbstractFeed.php b/library/Zend/Feed/Reader/Feed/AbstractFeed.php index 73b42f002c0..a7701b92dce 100644 --- a/library/Zend/Feed/Reader/Feed/AbstractFeed.php +++ b/library/Zend/Feed/Reader/Feed/AbstractFeed.php @@ -73,7 +73,7 @@ abstract class AbstractFeed implements FeedInterface /** * Constructor * - * @param DOMDocument The DOM object for the feed's XML + * @param DOMDocument $domDocument The DOM object for the feed's XML * @param string $type Feed type */ public function __construct(DOMDocument $domDocument, $type = null) diff --git a/library/Zend/Feed/Writer/AbstractFeed.php b/library/Zend/Feed/Writer/AbstractFeed.php index faea8933638..a6ea27f4a60 100644 --- a/library/Zend/Feed/Writer/AbstractFeed.php +++ b/library/Zend/Feed/Writer/AbstractFeed.php @@ -109,7 +109,7 @@ public function addAuthors(array $authors) /** * Set the copyright entry * - * @return string|null + * @param string $copyright * @throws Exception\InvalidArgumentException */ public function setCopyright($copyright) @@ -180,7 +180,7 @@ public function setLastBuildDate($date = null) /** * Set the feed description * - * @return string|null + * @param string $description * @throws Exception\InvalidArgumentException */ public function setDescription($description) @@ -310,7 +310,7 @@ public function setImage(array $data) /** * Set the feed language * - * @return string|null + * @param string $language * @throws Exception\InvalidArgumentException */ public function setLanguage($language) @@ -338,7 +338,8 @@ public function setLink($link) /** * Set a link to an XML feed for any feed type/version * - * @return string|null + * @param string $link + * @param string $type * @throws Exception\InvalidArgumentException */ public function setFeedLink($link, $type) @@ -355,7 +356,7 @@ public function setFeedLink($link, $type) /** * Set the feed title * - * @return string|null + * @param string $title * @throws Exception\InvalidArgumentException */ public function setTitle($title) @@ -428,7 +429,7 @@ public function addHubs(array $urls) /** * Add a feed category * - * @param string $category + * @param array $category * @throws Exception\InvalidArgumentException */ public function addCategory(array $category) diff --git a/library/Zend/Feed/Writer/Entry.php b/library/Zend/Feed/Writer/Entry.php index 11925d7c218..985cda19a42 100644 --- a/library/Zend/Feed/Writer/Entry.php +++ b/library/Zend/Feed/Writer/Entry.php @@ -112,7 +112,7 @@ public function addAuthors(array $authors) /** * Set the feed character encoding * - * @return string|null + * @param string $encoding * @throws Exception\InvalidArgumentException */ public function setEncoding($encoding) @@ -139,7 +139,7 @@ public function getEncoding() /** * Set the copyright entry * - * @return string|null + * @param string $copyright * @throws Exception\InvalidArgumentException */ public function setCopyright($copyright) @@ -153,7 +153,7 @@ public function setCopyright($copyright) /** * Set the entry's content * - * @return string|null + * @param string $content * @throws Exception\InvalidArgumentException */ public function setContent($content) @@ -203,7 +203,7 @@ public function setDateModified($date = null) /** * Set the feed description * - * @return string|null + * @param string $description * @throws Exception\InvalidArgumentException */ public function setDescription($description) @@ -217,7 +217,7 @@ public function setDescription($description) /** * Set the feed ID * - * @return string|null + * @param string $id * @throws Exception\InvalidArgumentException */ public function setId($id) @@ -231,7 +231,7 @@ public function setId($id) /** * Set a link to the HTML source of this entry * - * @return string|null + * @param string $link * @throws Exception\InvalidArgumentException */ public function setLink($link) @@ -245,7 +245,7 @@ public function setLink($link) /** * Set the number of comments associated with this entry * - * @return string|null + * @param int $count * @throws Exception\InvalidArgumentException */ public function setCommentCount($count) @@ -259,7 +259,7 @@ public function setCommentCount($count) /** * Set a link to a HTML page containing comments associated with this entry * - * @return string|null + * @param string $link * @throws Exception\InvalidArgumentException */ public function setCommentLink($link) @@ -273,7 +273,7 @@ public function setCommentLink($link) /** * Set a link to an XML feed for any comments associated with this entry * - * @return string|null + * @param array $link * @throws Exception\InvalidArgumentException */ public function setCommentFeedLink(array $link) @@ -296,7 +296,7 @@ public function setCommentFeedLink(array $link) * Each link is an array with keys "uri" and "type", where type is one of: * "atom", "rss" or "rdf". * - * @return string|null + * @param array $links */ public function setCommentFeedLinks(array $links) { @@ -308,7 +308,7 @@ public function setCommentFeedLinks(array $links) /** * Set the feed title * - * @return string|null + * @param string $title * @throws Exception\InvalidArgumentException */ public function setTitle($title) @@ -493,7 +493,7 @@ public function getCommentFeedLinks() /** * Add a entry category * - * @param string $category + * @param array $category * @throws Exception\InvalidArgumentException */ public function addCategory(array $category) diff --git a/library/Zend/Feed/Writer/Extension/ITunes/Feed.php b/library/Zend/Feed/Writer/Extension/ITunes/Feed.php index 33a3684b6c2..25d1d7bfece 100644 --- a/library/Zend/Feed/Writer/Extension/ITunes/Feed.php +++ b/library/Zend/Feed/Writer/Extension/ITunes/Feed.php @@ -264,7 +264,7 @@ public function addItunesOwners(array $values) /** * Add feed owner * - * @param string $value + * @param array $value * @return Feed * @throws Writer\Exception\InvalidArgumentException */ diff --git a/library/Zend/Feed/Writer/Renderer/Feed/AtomSource.php b/library/Zend/Feed/Writer/Renderer/Feed/AtomSource.php index b71fa1e7d07..34d519ce055 100644 --- a/library/Zend/Feed/Writer/Renderer/Feed/AtomSource.php +++ b/library/Zend/Feed/Writer/Renderer/Feed/AtomSource.php @@ -25,7 +25,7 @@ class AtomSource extends AbstractAtom implements Renderer\RendererInterface /** * Constructor * - * @param Zend_Feed_Writer_Feed_Source $container + * @param Writer\Source $container */ public function __construct (Writer\Source $container) { diff --git a/library/Zend/Feed/Writer/Renderer/Feed/Rss.php b/library/Zend/Feed/Writer/Renderer/Feed/Rss.php index aa4563972bf..549e568b211 100644 --- a/library/Zend/Feed/Writer/Renderer/Feed/Rss.php +++ b/library/Zend/Feed/Writer/Renderer/Feed/Rss.php @@ -27,7 +27,7 @@ class Rss extends Renderer\AbstractRenderer implements Renderer\RendererInterfac /** * Constructor * - * @param Zend_Feed_Writer_Feed $container + * @param Writer\Feed $container */ public function __construct (Writer\Feed $container) { @@ -37,7 +37,7 @@ public function __construct (Writer\Feed $container) /** * Render RSS feed * - * @return Zend_Feed_Writer_Renderer_Feed_Rss + * @return self */ public function render() { diff --git a/library/Zend/File/Transfer/Adapter/Http.php b/library/Zend/File/Transfer/Adapter/Http.php index b922f4782dd..6cc6bcc65c1 100644 --- a/library/Zend/File/Transfer/Adapter/Http.php +++ b/library/Zend/File/Transfer/Adapter/Http.php @@ -71,9 +71,8 @@ public function removeValidator($name) } /** - * Remove an individual validator + * Clear the validators * - * @param string $name * @return AbstractAdapter */ public function clearValidators() diff --git a/library/Zend/Filter/Callback.php b/library/Zend/Filter/Callback.php index 650850ea4e5..644523ad521 100644 --- a/library/Zend/Filter/Callback.php +++ b/library/Zend/Filter/Callback.php @@ -27,7 +27,8 @@ class Callback extends AbstractFilter ); /** - * @param array|Traversable $options + * @param callable|array|Traversable $callbackOrOptions + * @param array $callbackParams */ public function __construct($callbackOrOptions, $callbackParams = array()) { @@ -43,7 +44,8 @@ public function __construct($callbackOrOptions, $callbackParams = array()) * Sets a new callback for this filter * * @param callable $callback - * @return Callback + * @throws Exception\InvalidArgumentException + * @return self */ public function setCallback($callback) { diff --git a/library/Zend/Filter/Compress/Bz2.php b/library/Zend/Filter/Compress/Bz2.php index a53b6a32eb8..fa63801ad86 100644 --- a/library/Zend/Filter/Compress/Bz2.php +++ b/library/Zend/Filter/Compress/Bz2.php @@ -60,7 +60,8 @@ public function getBlocksize() /** * Sets a new blocksize * - * @param integer $level + * @param integer $blocksize + * @throws Exception\InvalidArgumentException * @return Bz2 */ public function setBlocksize($blocksize) diff --git a/library/Zend/Filter/Inflector.php b/library/Zend/Filter/Inflector.php index 1f6829c543a..bf39b7b991b 100644 --- a/library/Zend/Filter/Inflector.php +++ b/library/Zend/Filter/Inflector.php @@ -151,7 +151,7 @@ public function setOptions($options) * Set Whether or not the inflector should throw an exception when a replacement * identifier is still found within an inflected target. * - * @param bool $throwTargetExceptions + * @param bool $throwTargetExceptionsOn * @return Inflector */ public function setThrowTargetExceptionsOn($throwTargetExceptionsOn) diff --git a/library/Zend/Filter/Null.php b/library/Zend/Filter/Null.php index b9e6e6a07d8..31728e6a0a4 100644 --- a/library/Zend/Filter/Null.php +++ b/library/Zend/Filter/Null.php @@ -50,7 +50,7 @@ class Null extends AbstractFilter /** * Constructor * - * @param string|array|Traversable $options OPTIONAL + * @param string|array|Traversable $typeOrOptions OPTIONAL */ public function __construct($typeOrOptions = null) { diff --git a/library/Zend/Filter/RealPath.php b/library/Zend/Filter/RealPath.php index 4dc78bd98dc..e00693d586c 100644 --- a/library/Zend/Filter/RealPath.php +++ b/library/Zend/Filter/RealPath.php @@ -10,6 +10,7 @@ namespace Zend\Filter; +use Traversable; use Zend\Stdlib\ErrorHandler; /** @@ -28,7 +29,7 @@ class RealPath extends AbstractFilter /** * Class constructor * - * @param boolean|\Traversable $options Options to set + * @param boolean|Traversable $existsOrOptions Options to set */ public function __construct($existsOrOptions = true) { diff --git a/library/Zend/Filter/StringToLower.php b/library/Zend/Filter/StringToLower.php index 32d2feb2b27..ec98e2e9c6d 100644 --- a/library/Zend/Filter/StringToLower.php +++ b/library/Zend/Filter/StringToLower.php @@ -28,7 +28,7 @@ class StringToLower extends AbstractUnicode /** * Constructor * - * @param string|array|Traversable $options OPTIONAL + * @param string|array|Traversable $encodingOrOptions OPTIONAL */ public function __construct($encodingOrOptions = null) { diff --git a/library/Zend/Filter/StringToUpper.php b/library/Zend/Filter/StringToUpper.php index e830be58eda..7471ecb0817 100644 --- a/library/Zend/Filter/StringToUpper.php +++ b/library/Zend/Filter/StringToUpper.php @@ -28,7 +28,7 @@ class StringToUpper extends AbstractUnicode /** * Constructor * - * @param string|array|Traversable $options OPTIONAL + * @param string|array|Traversable $encodingOrOptions OPTIONAL */ public function __construct($encodingOrOptions = null) { diff --git a/library/Zend/Filter/StringTrim.php b/library/Zend/Filter/StringTrim.php index 0dbfb7bbf3d..10be795ef47 100644 --- a/library/Zend/Filter/StringTrim.php +++ b/library/Zend/Filter/StringTrim.php @@ -29,7 +29,7 @@ class StringTrim extends AbstractFilter /** * Sets filter options * - * @param string|array|Traversable $options + * @param string|array|Traversable $charlistOrOptions */ public function __construct($charlistOrOptions = null) { diff --git a/library/Zend/Filter/Word/DashToUnderscore.php b/library/Zend/Filter/Word/DashToUnderscore.php index f41f604dd7e..c98c375e277 100644 --- a/library/Zend/Filter/Word/DashToUnderscore.php +++ b/library/Zend/Filter/Word/DashToUnderscore.php @@ -18,8 +18,6 @@ class DashToUnderscore extends SeparatorToSeparator { /** * Constructor - * - * @param string $separator Space by default */ public function __construct() { diff --git a/library/Zend/Filter/Word/UnderscoreToSeparator.php b/library/Zend/Filter/Word/UnderscoreToSeparator.php index 645d17a31e3..52590994dac 100644 --- a/library/Zend/Filter/Word/UnderscoreToSeparator.php +++ b/library/Zend/Filter/Word/UnderscoreToSeparator.php @@ -19,7 +19,7 @@ class UnderscoreToSeparator extends SeparatorToSeparator /** * Constructor * - * @param string $separator Space by default + * @param string $replacementSeparator Space by default */ public function __construct($replacementSeparator = ' ') { diff --git a/library/Zend/Http/Client/Cookies.php b/library/Zend/Http/Client/Cookies.php index cc1cb1dfe55..6fe95ab30b9 100644 --- a/library/Zend/Http/Client/Cookies.php +++ b/library/Zend/Http/Client/Cookies.php @@ -302,7 +302,7 @@ protected function _matchDomain($domain) /** * Return a subset of a domain-matching cookies that also match a specified path * - * @param array $dom_array + * @param array $domains * @param string $path * @return array */ diff --git a/library/Zend/Http/Cookies.php b/library/Zend/Http/Cookies.php index 5af04e5a67f..f29ca50d436 100644 --- a/library/Zend/Http/Cookies.php +++ b/library/Zend/Http/Cookies.php @@ -279,7 +279,7 @@ protected function _matchDomain($domain) /** * Return a subset of a domain-matching cookies that also match a specified path * - * @param array $dom_array + * @param array $domains * @param string $path * @return array */ diff --git a/library/Zend/Http/Header/AbstractAccept.php b/library/Zend/Http/Header/AbstractAccept.php index cb572317549..c227df5ad1d 100644 --- a/library/Zend/Http/Header/AbstractAccept.php +++ b/library/Zend/Http/Header/AbstractAccept.php @@ -275,7 +275,7 @@ protected function addType($type, $priority = 1, array $params = array()) /** * Does the header have the requested type? * - * @param string $type + * @param array|string $matchAgainst * @return bool */ protected function hasType($matchAgainst) diff --git a/library/Zend/Http/Header/Accept.php b/library/Zend/Http/Header/Accept.php index e11b62e3343..ba6a93a481d 100644 --- a/library/Zend/Http/Header/Accept.php +++ b/library/Zend/Http/Header/Accept.php @@ -48,7 +48,7 @@ public function toString() * * @param string $type * @param int|float $priority - * @param int $level + * @param array $params * @return Accept */ public function addMediaType($type, $priority = 1, array $params = array()) diff --git a/library/Zend/Json/Encoder.php b/library/Zend/Json/Encoder.php index 10b4ed81c5f..9dc7b26e375 100644 --- a/library/Zend/Json/Encoder.php +++ b/library/Zend/Json/Encoder.php @@ -247,7 +247,7 @@ protected function _encodeDatum(&$value) /** * JSON encode a string value by escaping characters as necessary * - * @param $value string + * @param string $string * @return string */ protected function _encodeString(&$string) diff --git a/library/Zend/Json/Server/Server.php b/library/Zend/Json/Server/Server.php index ec4516e0fc6..061bf9c2a79 100644 --- a/library/Zend/Json/Server/Server.php +++ b/library/Zend/Json/Server/Server.php @@ -158,6 +158,7 @@ public function fault($fault = null, $code = 404, $data = null) * Handle request * * @param Request $request + * @throws Exception\InvalidArgumentException * @return null|Response */ public function handle($request = false) diff --git a/library/Zend/Json/Server/Smd.php b/library/Zend/Json/Server/Smd.php index f1b9981bf19..7fdba11e219 100644 --- a/library/Zend/Json/Server/Smd.php +++ b/library/Zend/Json/Server/Smd.php @@ -211,7 +211,7 @@ public function getTarget() /** * Set service ID * - * @param string $Id + * @param string $id * @return Smd */ public function setId($id) diff --git a/library/Zend/Log/Logger.php b/library/Zend/Log/Logger.php index e6b54814050..c39bb981c5e 100644 --- a/library/Zend/Log/Logger.php +++ b/library/Zend/Log/Logger.php @@ -157,8 +157,9 @@ public function writerPlugin($name, array $options = null) /** * Add a writer to a logger * - * @param string|Writer $writer + * @param string|Writer\WriterInterface $writer * @param int $priority + * @param array|null $options * @return Logger * @throws Exception\InvalidArgumentException */ diff --git a/library/Zend/ModuleManager/Feature/BootstrapListenerInterface.php b/library/Zend/ModuleManager/Feature/BootstrapListenerInterface.php index 2330413f1ad..fe47010d49c 100644 --- a/library/Zend/ModuleManager/Feature/BootstrapListenerInterface.php +++ b/library/Zend/ModuleManager/Feature/BootstrapListenerInterface.php @@ -24,6 +24,7 @@ interface BootstrapListenerInterface /** * Listen to the bootstrap event * + * @param EventInterface $e * @return array */ public function onBootstrap(EventInterface $e); diff --git a/library/Zend/ModuleManager/Listener/ConfigListener.php b/library/Zend/ModuleManager/Listener/ConfigListener.php index 632c7cad855..ae5113d50ef 100644 --- a/library/Zend/ModuleManager/Listener/ConfigListener.php +++ b/library/Zend/ModuleManager/Listener/ConfigListener.php @@ -264,7 +264,7 @@ public function addConfigStaticPaths($staticPaths) /** * Add a static path of config files to merge after loading modules * - * @param string $globPath + * @param string $staticPath * @return ConfigListener */ public function addConfigStaticPath($staticPath) @@ -276,7 +276,9 @@ public function addConfigStaticPath($staticPath) /** * Add an array of paths of config files to merge after loading modules * - * @param mixed $paths + * @param Traversable|array $paths + * @param string $type + * @throws Exception\InvalidArgumentException * @return ConfigListener */ protected function addConfigPaths($paths, $type) @@ -304,6 +306,7 @@ protected function addConfigPaths($paths, $type) * * @param string $path * @param string $type + * @throws Exception\InvalidArgumentException * @return ConfigListener */ protected function addConfigPath($path, $type) diff --git a/library/Zend/Serializer/Serializer.php b/library/Zend/Serializer/Serializer.php index 823f349958c..af49627296c 100644 --- a/library/Zend/Serializer/Serializer.php +++ b/library/Zend/Serializer/Serializer.php @@ -87,7 +87,7 @@ public static function resetAdapterPluginManager() * Change the default adapter. * * @param string|Adapter $adapter - * @param array|\Traversable|null $options + * @param array|\Traversable|null $adapterOptions */ public static function setDefaultAdapter($adapter, $adapterOptions = null) { @@ -148,4 +148,4 @@ public static function unserialize($serialized, $adapter = null, $adapterOptions return $adapter->unserialize($serialized); } -} \ No newline at end of file +} diff --git a/library/Zend/Server/Method/Prototype.php b/library/Zend/Server/Method/Prototype.php index a632a28ec4b..00a1e017276 100644 --- a/library/Zend/Server/Method/Prototype.php +++ b/library/Zend/Server/Method/Prototype.php @@ -93,7 +93,7 @@ public function addParameter($parameter) /** * Add parameters * - * @param array $parameter + * @param array $parameters * @return \Zend\Server\Method\Prototype */ public function addParameters(array $parameters) diff --git a/library/Zend/Server/Reflection/AbstractFunction.php b/library/Zend/Server/Reflection/AbstractFunction.php index b474a883ed9..be877ca525c 100644 --- a/library/Zend/Server/Reflection/AbstractFunction.php +++ b/library/Zend/Server/Reflection/AbstractFunction.php @@ -166,7 +166,7 @@ protected function _buildTree() * * @param array $return Array of return types * @param string $returnDesc Return value description - * @param array $params Array of arguments (each an array of types) + * @param array $paramTypes Array of arguments (each an array of types) * @param array $paramDesc Array of parameter descriptions * @return array */ diff --git a/library/Zend/Server/Server.php b/library/Zend/Server/Server.php index a25886ecf8e..f25a05ca224 100644 --- a/library/Zend/Server/Server.php +++ b/library/Zend/Server/Server.php @@ -90,7 +90,7 @@ public function getFunctions(); * * Used for persistence; loads a construct as returned by {@link getFunctions()}. * - * @param array $array + * @param array $definition * @return void */ public function loadFunctions($definition); diff --git a/library/Zend/ServiceManager/Di/DiServiceInitializer.php b/library/Zend/ServiceManager/Di/DiServiceInitializer.php index 3480703c1d7..255493742d1 100644 --- a/library/Zend/ServiceManager/Di/DiServiceInitializer.php +++ b/library/Zend/ServiceManager/Di/DiServiceInitializer.php @@ -47,6 +47,8 @@ public function __construct(Di $di, ServiceLocatorInterface $serviceLocator, DiI /** * @param $instance + * @param ServiceLocatorInterface $serviceLocator + * @throws \Exception */ public function initialize($instance, ServiceLocatorInterface $serviceLocator) { diff --git a/library/Zend/Soap/Wsdl.php b/library/Zend/Soap/Wsdl.php index 2c93674f417..59d9aa7b2b5 100644 --- a/library/Zend/Soap/Wsdl.php +++ b/library/Zend/Soap/Wsdl.php @@ -265,7 +265,7 @@ public function addPortOperation($portType, $name, $input = false, $output = fal * Add a {@link http://www.w3.org/TR/wsdl#_bindings binding} element to WSDL * * @param string $name Name of the Binding - * @param string $type name of the portType to bind + * @param string $portType name of the portType to bind * @return object The new binding's XML_Tree_Node for use with {@link function addBindingOperation} and {@link function addDocumentation} */ public function addBinding($name, $portType) diff --git a/library/Zend/Soap/Wsdl/ComplexTypeStrategy/ComplexTypeStrategyInterface.php b/library/Zend/Soap/Wsdl/ComplexTypeStrategy/ComplexTypeStrategyInterface.php index 91cd069a520..1b6c1880817 100644 --- a/library/Zend/Soap/Wsdl/ComplexTypeStrategy/ComplexTypeStrategyInterface.php +++ b/library/Zend/Soap/Wsdl/ComplexTypeStrategy/ComplexTypeStrategyInterface.php @@ -10,6 +10,8 @@ namespace Zend\Soap\Wsdl\ComplexTypeStrategy; +use Zend\Soap\Wsdl; + /** * Interface strategies that generate an XSD-Schema for complex data types in WSDL files. * @@ -22,9 +24,9 @@ interface ComplexTypeStrategyInterface /** * Method accepts the current WSDL context file. * - * @param $context + * @param Wsdl $context */ - public function setContext(\Zend\Soap\Wsdl $context); + public function setContext(Wsdl $context); /** * Create a complex type based on a strategy diff --git a/library/Zend/Soap/Wsdl/ComplexTypeStrategy/Composite.php b/library/Zend/Soap/Wsdl/ComplexTypeStrategy/Composite.php index cd473f5af8a..5f4db6dbf22 100644 --- a/library/Zend/Soap/Wsdl/ComplexTypeStrategy/Composite.php +++ b/library/Zend/Soap/Wsdl/ComplexTypeStrategy/Composite.php @@ -79,7 +79,6 @@ public function connectTypeToStrategy($type, $strategy) * Return default strategy of this composite * * @throws Exception\InvalidArgumentException - * @param string $type * @return ComplexTypeStrategy */ public function getDefaultStrategy() diff --git a/library/Zend/Stdlib/CallbackHandler.php b/library/Zend/Stdlib/CallbackHandler.php index bf9c47e89e4..fe4309bb500 100644 --- a/library/Zend/Stdlib/CallbackHandler.php +++ b/library/Zend/Stdlib/CallbackHandler.php @@ -52,9 +52,8 @@ class CallbackHandler /** * Constructor * - * @param string $event Event to which slot is subscribed * @param string|array|object|callable $callback PHP callback - * @param array $options Options used by the callback handler (e.g., priority) + * @param array $metadata Callback metadata */ public function __construct($callback, array $metadata = array()) { diff --git a/library/Zend/Text/Table/Table.php b/library/Zend/Text/Table/Table.php index c99657b0c8b..c0a14545536 100644 --- a/library/Zend/Text/Table/Table.php +++ b/library/Zend/Text/Table/Table.php @@ -107,7 +107,6 @@ class Table /** * Create a basic table object * - * @param array $columns Widths List of all column widths * @param array|Traversable $options Configuration options * @throws Exception\UnexpectedValueException When no columns widths were set */ diff --git a/library/Zend/Uri/Mailto.php b/library/Zend/Uri/Mailto.php index 5ae8bc818b1..f6f0d3126cc 100644 --- a/library/Zend/Uri/Mailto.php +++ b/library/Zend/Uri/Mailto.php @@ -86,7 +86,7 @@ public function getEmail() /** * Set validator to use when validating email address * - * @param Validator $validator + * @param ValidatorInterface $validator * @return Mailto */ public function setValidator(ValidatorInterface $validator) @@ -101,7 +101,7 @@ public function setValidator(ValidatorInterface $validator) * If none is currently set, an EmailValidator instance with default options * will be used. * - * @return Validator + * @return ValidatorInterface */ public function getValidator() { diff --git a/library/Zend/Validator/Uri.php b/library/Zend/Validator/Uri.php index 136cc5d6913..e6ba247bda0 100644 --- a/library/Zend/Validator/Uri.php +++ b/library/Zend/Validator/Uri.php @@ -129,7 +129,7 @@ public function getAllowAbsolute() /** * Sets the allowAbsolute option * - * @param boolean $allowWhiteSpace + * @param boolean $allowAbsolute * @return Uri */ public function setAllowAbsolute($allowAbsolute) diff --git a/library/Zend/View/Helper/Cycle.php b/library/Zend/View/Helper/Cycle.php index 1df8efcb141..375dc3923ba 100644 --- a/library/Zend/View/Helper/Cycle.php +++ b/library/Zend/View/Helper/Cycle.php @@ -99,7 +99,6 @@ public function setName($name = self::DEFAULT_NAME) /** * Gets actual name of cycle * - * @param $name * @return string */ public function getName() diff --git a/library/Zend/View/Helper/HeadStyle.php b/library/Zend/View/Helper/HeadStyle.php index 61812342491..cbd8fbbf482 100644 --- a/library/Zend/View/Helper/HeadStyle.php +++ b/library/Zend/View/Helper/HeadStyle.php @@ -162,7 +162,6 @@ public function __call($method, $args) * Determine if a value is a valid style tag * * @param mixed $value - * @param string $method * @return boolean */ protected function isValid($value) diff --git a/library/Zend/View/Helper/HtmlList.php b/library/Zend/View/Helper/HtmlList.php index 3b0cba3422b..b71e17de835 100644 --- a/library/Zend/View/Helper/HtmlList.php +++ b/library/Zend/View/Helper/HtmlList.php @@ -25,6 +25,7 @@ class HtmlList extends AbstractHtmlElement * @param array $items Array with the elements of the list * @param boolean $ordered Specifies ordered/unordered list; default unordered * @param array $attribs Attributes for the ol/ul tag. + * @param boolean $escape Escape the items. * @return string The list XHTML. */ public function __invoke(array $items, $ordered = false, $attribs = false, $escape = true) diff --git a/library/Zend/View/Helper/Placeholder/Container/AbstractContainer.php b/library/Zend/View/Helper/Placeholder/Container/AbstractContainer.php index bb4f190f851..878d92bd95b 100644 --- a/library/Zend/View/Helper/Placeholder/Container/AbstractContainer.php +++ b/library/Zend/View/Helper/Placeholder/Container/AbstractContainer.php @@ -337,6 +337,7 @@ public function nextIndex() /** * Render the placeholder * + * @param null|int|string $indent * @return string */ public function toString($indent = null) diff --git a/library/Zend/View/Model/ModelInterface.php b/library/Zend/View/Model/ModelInterface.php index 99548c636c3..fe359e0de8b 100644 --- a/library/Zend/View/Model/ModelInterface.php +++ b/library/Zend/View/Model/ModelInterface.php @@ -10,8 +10,10 @@ namespace Zend\View\Model; +use ArrayAccess; use Countable; use IteratorAggregate; +use Traversable; /** * Interface describing a view model. @@ -39,7 +41,7 @@ public function setOption($name, $value); /** * Set renderer options/hints en masse * - * @param array|\Traversable $name + * @param array|Traversable $options * @return ModelInterface */ public function setOptions($options); @@ -47,7 +49,7 @@ public function setOptions($options); /** * Get renderer options/hints * - * @return array|\Traversable + * @return array|Traversable */ public function getOptions(); @@ -72,7 +74,7 @@ public function setVariable($name, $value); /** * Set view variables en masse * - * @param array|\ArrayAccess $variables + * @param array|ArrayAccess $variables * @return ModelInterface */ public function setVariables($variables); @@ -80,7 +82,7 @@ public function setVariables($variables); /** * Get view variables * - * @return array|\ArrayAccess + * @return array|ArrayAccess */ public function getVariables(); diff --git a/library/Zend/View/Model/ViewModel.php b/library/Zend/View/Model/ViewModel.php index 2b8029e53bf..7f7b9ff7536 100644 --- a/library/Zend/View/Model/ViewModel.php +++ b/library/Zend/View/Model/ViewModel.php @@ -245,8 +245,9 @@ public function setVariable($name, $value) * * Can be an array or a Traversable + ArrayAccess object. * - * @param array|ArrayAccess&Traversable $variables + * @param array|ArrayAccess|Traversable $variables * @param bool $overwrite Whether or not to overwrite the internal container with $variables + * @throws Exception\InvalidArgumentException * @return ViewModel */ public function setVariables($variables, $overwrite = false) diff --git a/library/Zend/View/Renderer/FeedRenderer.php b/library/Zend/View/Renderer/FeedRenderer.php index f4f36256246..b763a8be1b4 100644 --- a/library/Zend/View/Renderer/FeedRenderer.php +++ b/library/Zend/View/Renderer/FeedRenderer.php @@ -64,8 +64,9 @@ public function setResolver(Resolver $resolver) * Renders values as JSON * * @todo Determine what use case exists for accepting only $nameOrModel - * @param string|Model $name The script/resource process, or a view model - * @param null|array|\ArrayAccess Values to use during rendering + * @param string|Model $nameOrModel The script/resource process, or a view model + * @param null|array|\ArrayAccess $values Values to use during rendering + * @throws Exception\InvalidArgumentException * @return string The script output. */ public function render($nameOrModel, $values = null) diff --git a/library/Zend/View/Renderer/JsonRenderer.php b/library/Zend/View/Renderer/JsonRenderer.php index 97a91f548b5..012e12863c4 100644 --- a/library/Zend/View/Renderer/JsonRenderer.php +++ b/library/Zend/View/Renderer/JsonRenderer.php @@ -124,8 +124,9 @@ public function mergeUnnamedChildren() * Renders values as JSON * * @todo Determine what use case exists for accepting both $nameOrModel and $values - * @param string|Model $name The script/resource process, or a view model - * @param null|array|\ArrayAccess Values to use during rendering + * @param string|Model $nameOrModel The script/resource process, or a view model + * @param null|array|\ArrayAccess $values Values to use during rendering + * @throws Exception\DomainException * @return string The script output. */ public function render($nameOrModel, $values = null) diff --git a/library/Zend/XmlRpc/Client/ServerProxy.php b/library/Zend/XmlRpc/Client/ServerProxy.php index eedec51165b..6e0fca66e24 100644 --- a/library/Zend/XmlRpc/Client/ServerProxy.php +++ b/library/Zend/XmlRpc/Client/ServerProxy.php @@ -72,7 +72,7 @@ public function __get($namespace) /** * Call a method in this namespace. * - * @param string $methodN + * @param string $method * @param array $args * @return mixed */ diff --git a/library/Zend/XmlRpc/Value/Base64.php b/library/Zend/XmlRpc/Value/Base64.php index 35a077e79cc..fed0a55c627 100644 --- a/library/Zend/XmlRpc/Value/Base64.php +++ b/library/Zend/XmlRpc/Value/Base64.php @@ -23,7 +23,7 @@ class Base64 extends AbstractScalar * We keep this value in base64 encoding * * @param string $value - * @param bool $already_encoded If set, it means that the given string is already base64 encoded + * @param bool $alreadyEncoded If set, it means that the given string is already base64 encoded */ public function __construct($value, $alreadyEncoded = false) { From c0410fc6181f3bcdec88ecda61895a1b5e50b608 Mon Sep 17 00:00:00 2001 From: Juha Suni Date: Fri, 31 Aug 2012 10:04:13 +0300 Subject: [PATCH 003/154] Fix for ZF2-512 --- library/Zend/Filter/FilterChain.php | 14 ++++++++++++++ library/Zend/Validator/ValidatorChain.php | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/library/Zend/Filter/FilterChain.php b/library/Zend/Filter/FilterChain.php index 1246f7375b1..e7a9ad7d38e 100644 --- a/library/Zend/Filter/FilterChain.php +++ b/library/Zend/Filter/FilterChain.php @@ -224,4 +224,18 @@ public function filter($value) return $valueFiltered; } + + /** + * Prepare filter chain for serialization + * + * FilterPluginManager cannot be serialized, as it contains Traits. For + * this reason property 'plugins' is excluded and thus serialized + * filter chain is not necessarily equal to current chain. + * + * @return array + */ + public function __sleep() + { + return array('filters'); + } } diff --git a/library/Zend/Validator/ValidatorChain.php b/library/Zend/Validator/ValidatorChain.php index d6ca6cbcb29..e377bdf45ff 100644 --- a/library/Zend/Validator/ValidatorChain.php +++ b/library/Zend/Validator/ValidatorChain.php @@ -230,4 +230,18 @@ public function __invoke($value) { return $this->isValid($value); } + + /** + * Prepare validator chain for serialization + * + * ValidatorPluginManager cannot be serialized, as it contains Traits. For + * this reason property 'plugins' is excluded and thus serialized + * filter chain is not necessarily equal to current chain. + * + * @return array + */ + public function __sleep() + { + return array('validators', 'messages'); + } } From ebdafc2478d21ae3ffbc3cc1eb3260dbb0157e71 Mon Sep 17 00:00:00 2001 From: Michel Hunziker Date: Fri, 31 Aug 2012 10:57:14 +0200 Subject: [PATCH 004/154] More phpDoc updates to match php code --- library/Zend/Captcha/AbstractWord.php | 1 + library/Zend/Captcha/ReCaptcha.php | 1 + library/Zend/Escaper/Escaper.php | 5 +++++ .../Feed/Reader/Extension/AbstractFeed.php | 1 + .../Zend/Feed/Reader/Extension/Atom/Entry.php | 3 +++ library/Zend/Feed/Reader/Reader.php | 11 +++++++---- .../File/Transfer/Adapter/AbstractAdapter.php | 5 +++-- library/Zend/File/Transfer/Adapter/Http.php | 5 +++-- library/Zend/Filter/Encrypt/Openssl.php | 2 +- .../Zend/Form/View/Helper/AbstractHelper.php | 2 +- .../Zend/Form/View/Helper/FormCollection.php | 9 +++++---- library/Zend/Http/Client.php | 19 +++++++++++++++---- library/Zend/Http/Header/SetCookie.php | 5 +++++ library/Zend/I18n/Validator/Alnum.php | 2 +- library/Zend/Json/Decoder.php | 3 ++- library/Zend/Json/Encoder.php | 13 +++++++------ library/Zend/Json/Server/Server.php | 3 ++- .../Zend/Ldap/Collection/DefaultIterator.php | 1 - library/Zend/Loader/ModuleAutoloader.php | 9 ++++++--- library/Zend/Log/Writer/AbstractWriter.php | 7 ++++--- library/Zend/Log/Writer/Db.php | 3 +-- library/Zend/Log/Writer/Mail.php | 2 +- library/Zend/Log/Writer/MongoDB.php | 1 + library/Zend/Mail/Header/MessageId.php | 1 + library/Zend/Mime/Message.php | 4 ++++ library/Zend/Mime/Part.php | 5 ++++- .../Listener/ServiceListener.php | 4 ++++ .../Zend/Mvc/Controller/Plugin/Redirect.php | 1 + library/Zend/Mvc/Controller/Plugin/Url.php | 1 + library/Zend/Mvc/Controller/PluginManager.php | 4 ++-- .../Zend/ServiceManager/ServiceManager.php | 18 ++++++++++++------ library/Zend/Stdlib/Hydrator/Reflection.php | 3 ++- library/Zend/View/Renderer/PhpRenderer.php | 8 +++++--- 33 files changed, 112 insertions(+), 50 deletions(-) diff --git a/library/Zend/Captcha/AbstractWord.php b/library/Zend/Captcha/AbstractWord.php index 0d6f9dbe720..936ccd30050 100644 --- a/library/Zend/Captcha/AbstractWord.php +++ b/library/Zend/Captcha/AbstractWord.php @@ -359,6 +359,7 @@ protected function generateRandomId() * * @see Zend\Validator\ValidatorInterface::isValid() * @param mixed $value + * @param mixed $context * @return bool */ public function isValid($value, $context = null) diff --git a/library/Zend/Captcha/ReCaptcha.php b/library/Zend/Captcha/ReCaptcha.php index fca5d49ce4b..cc61a34bdd1 100644 --- a/library/Zend/Captcha/ReCaptcha.php +++ b/library/Zend/Captcha/ReCaptcha.php @@ -198,6 +198,7 @@ public function generate() * * @see \Zend\Validator\ValidatorInterface::isValid() * @param mixed $value + * @param mixed $context * @return boolean */ public function isValid($value, $context = null) diff --git a/library/Zend/Escaper/Escaper.php b/library/Zend/Escaper/Escaper.php index 399e4fd3be7..9191b2221b9 100644 --- a/library/Zend/Escaper/Escaper.php +++ b/library/Zend/Escaper/Escaper.php @@ -98,6 +98,7 @@ class Escaper * is set for htmlspecialchars() calls. * * @param string $encoding + * @throws Exception\InvalidArgumentException */ public function __construct($encoding = null) { @@ -315,6 +316,7 @@ protected function cssMatcher($matches) * class' constructor. * * @param string $string + * @throws Exception\RuntimeException * @return string */ protected function toUtf8($string) @@ -365,6 +367,9 @@ protected function isUtf8($string) * and exception where neither is available. * * @param string $string + * @param string $to + * @param array|string $from + * @throws Exception\RuntimeException * @return string */ protected function convertEncoding($string, $to, $from) diff --git a/library/Zend/Feed/Reader/Extension/AbstractFeed.php b/library/Zend/Feed/Reader/Extension/AbstractFeed.php index 3770fc83a54..557e114e88a 100644 --- a/library/Zend/Feed/Reader/Extension/AbstractFeed.php +++ b/library/Zend/Feed/Reader/Extension/AbstractFeed.php @@ -166,6 +166,7 @@ public function getXpathPrefix() /** * Set the XPath prefix * + * @param string $prefix * @return void */ public function setXpathPrefix($prefix) diff --git a/library/Zend/Feed/Reader/Extension/Atom/Entry.php b/library/Zend/Feed/Reader/Extension/Atom/Entry.php index 5e0dbd2c4d7..312262032ba 100644 --- a/library/Zend/Feed/Reader/Extension/Atom/Entry.php +++ b/library/Zend/Feed/Reader/Extension/Atom/Entry.php @@ -453,6 +453,7 @@ public function getCommentLink() /** * Returns a URI pointing to a feed of all comments for this entry * + * @param string $type * @return string */ public function getCommentFeedLink($type = 'atom') @@ -612,6 +613,8 @@ protected function registerNamespaces() /** * Detect the presence of any Atom namespaces in use + * + * @return string */ protected function getAtomType() { diff --git a/library/Zend/Feed/Reader/Reader.php b/library/Zend/Feed/Reader/Reader.php index 2edc6851d70..70a6f61a006 100644 --- a/library/Zend/Feed/Reader/Reader.php +++ b/library/Zend/Feed/Reader/Reader.php @@ -183,13 +183,13 @@ public static function useHttpConditionalGet($bool = true) } /** - * Import a feed by providing a URL + * Import a feed by providing a URI * - * @param string $url The URL to the feed + * @param string $uri The URI to the feed * @param string $etag OPTIONAL Last received ETag for this resource * @param string $lastModified OPTIONAL Last-Modified value for this resource * @return Reader - * @throws Exception\ExceptionInterface + * @throws Exception\RuntimeException */ public static function import($uri, $etag = null, $lastModified = null) { @@ -264,6 +264,7 @@ public static function import($uri, $etag = null, $lastModified = null) * * @param string $string * @return Feed\FeedInterface + * @throws Exception\InvalidArgumentException * @throws Exception\RuntimeException */ public static function importString($string) @@ -372,8 +373,10 @@ public static function findFeedLinks($uri) * Detect the feed type of the provided feed * * @param Feed\AbstractFeed|DOMDocument|string $feed + * @param bool $specOnly * @return string - * @throws Exception\ExceptionInterface + * @throws Exception\InvalidArgumentException + * @throws Exception\RuntimeException */ public static function detectType($feed, $specOnly = false) { diff --git a/library/Zend/File/Transfer/Adapter/AbstractAdapter.php b/library/Zend/File/Transfer/Adapter/AbstractAdapter.php index 1961b9e0d66..39a5ddc4e0d 100644 --- a/library/Zend/File/Transfer/Adapter/AbstractAdapter.php +++ b/library/Zend/File/Transfer/Adapter/AbstractAdapter.php @@ -885,8 +885,8 @@ public function clearFilters() /** * Retrieves the filename of transferred files. * - * @param string $fileelement (Optional) Element to return the filename for - * @param boolean $path (Optional) Should the path also be returned ? + * @param string $file (Optional) Element to return the filename for + * @param boolean $path (Optional) Should the path also be returned ? * @return string|array */ public function getFileName($file = null, $path = true) @@ -967,6 +967,7 @@ public function setDestination($destination, $files = null) * Retrieve destination directory value * * @param null|string|array $files + * @throws Exception\InvalidArgumentException * @return null|string|array */ public function getDestination($files = null) diff --git a/library/Zend/File/Transfer/Adapter/Http.php b/library/Zend/File/Transfer/Adapter/Http.php index 6cc6bcc65c1..67befc1cc34 100644 --- a/library/Zend/File/Transfer/Adapter/Http.php +++ b/library/Zend/File/Transfer/Adapter/Http.php @@ -205,7 +205,7 @@ public function receive($files = null) /** * Checks if the file was already sent * - * @param string|array $file Files to check + * @param string|array $files Files to check * @return boolean * @throws Exception\BadMethodCallException Not implemented */ @@ -261,7 +261,7 @@ public function isFiltered($files = null) /** * Has a file been uploaded ? * - * @param array|string|null $file + * @param array|string|null $files * @return boolean */ public function isUploaded($files = null) @@ -286,6 +286,7 @@ public function isUploaded($files = null) * @param string|array $id The upload to get the progress for * @return array|null * @throws Exception\PhpEnvironmentException whether APC nor UploadProgress extension installed + * @throws Exception\RuntimeException */ public static function getProgress($id = null) { diff --git a/library/Zend/Filter/Encrypt/Openssl.php b/library/Zend/Filter/Encrypt/Openssl.php index f915e27518e..778636e9fc1 100644 --- a/library/Zend/Filter/Encrypt/Openssl.php +++ b/library/Zend/Filter/Encrypt/Openssl.php @@ -242,7 +242,7 @@ public function getEnvelopeKey() /** * Sets envelope keys * - * @param string|array $options Envelope keys + * @param string|array $key Envelope keys * @return \Zend\Filter\Encrypt\Openssl */ public function setEnvelopeKey($key) diff --git a/library/Zend/Form/View/Helper/AbstractHelper.php b/library/Zend/Form/View/Helper/AbstractHelper.php index ae912528bd1..9c4ca9bb4f4 100644 --- a/library/Zend/Form/View/Helper/AbstractHelper.php +++ b/library/Zend/Form/View/Helper/AbstractHelper.php @@ -169,7 +169,7 @@ public function getDoctype() /** * Set value for character encoding * - * @param string encoding + * @param string $encoding * @return AbstractHelper */ public function setEncoding($encoding) diff --git a/library/Zend/Form/View/Helper/FormCollection.php b/library/Zend/Form/View/Helper/FormCollection.php index 09aa818463b..60f5ce0800d 100644 --- a/library/Zend/Form/View/Helper/FormCollection.php +++ b/library/Zend/Form/View/Helper/FormCollection.php @@ -174,9 +174,10 @@ public function setDefaultElementHelper($defaultSubHelper) } /** - * Retrieve the FormRow helper + * Retrieve the element helper. * - * @return FormRow + * @throws RuntimeException + * @return AbstractHelper */ protected function getElementHelper() { @@ -197,9 +198,9 @@ protected function getElementHelper() } /** - * Sets the row helper that should be used by this collection. + * Sets the element helper that should be used by this collection. * - * @param FormRow $rowHelper The row helper to use. + * @param AbstractHelper $elementHelper The element helper to use. * @return FormCollection */ public function setElementHelper(AbstractHelper $elementHelper) diff --git a/library/Zend/Http/Client.php b/library/Zend/Http/Client.php index 1881aa089dc..97a746a8946 100644 --- a/library/Zend/Http/Client.php +++ b/library/Zend/Http/Client.php @@ -449,13 +449,14 @@ protected function getCookieId($cookie) * * @param array|ArrayIterator|Header\SetCookie|string $cookie * @param string $value - * @param string $version - * @param string $maxAge - * @param string $domain * @param string $expire * @param string $path + * @param string $domain * @param boolean $secure * @param boolean $httponly + * @param string $maxAge + * @param string $version + * @throws Exception\InvalidArgumentException * @return Client */ public function addCookie($cookie, $value = null, $expire = null, $path = null, $domain = null, $secure = false, $httponly = true, $maxAge = null, $version = null) @@ -483,6 +484,7 @@ public function addCookie($cookie, $value = null, $expire = null, $path = null, * Set an array of cookies * * @param array $cookies + * @throws Exception\InvalidArgumentException * @return Client */ public function setCookies($cookies) @@ -510,6 +512,7 @@ public function clearCookies() * Set the headers (for the request) * * @param Headers|array $headers + * @throws Exception\InvalidArgumentException * @return Client */ public function setHeaders($headers) @@ -585,6 +588,7 @@ public function getStream() /** * Create temporary stream * + * @throws Exception\RuntimeException * @return resource */ protected function openTempStream() @@ -619,6 +623,7 @@ protected function openTempStream() * @param string $user * @param string $password * @param string $type + * @throws Exception\InvalidArgumentException * @return Client */ public function setAuth($user, $password, $type = self::AUTH_BASIC) @@ -648,6 +653,8 @@ public function setAuth($user, $password, $type = self::AUTH_BASIC) * @param string $password * @param string $type * @param array $digest + * @param null|string $entityBody + * @throws Exception\InvalidArgumentException * @return string|boolean */ protected function calcAuthDigest($user, $password, $type = self::AUTH_BASIC, $digest = array(), $entityBody = null) @@ -737,6 +744,7 @@ public function dispatch(Stdlib\RequestInterface $request, Stdlib\ResponseInterf * @param Request $request * @return Response * @throws Exception\RuntimeException + * @throws Client\Exception\RuntimeException */ public function send(Request $request = null) { @@ -970,8 +978,8 @@ public function removeFileUpload($filename) /** * Prepare Cookies * - * @param string $uri * @param string $domain + * @param string $path * @param boolean $secure * @return Header\Cookie|boolean */ @@ -1002,6 +1010,9 @@ protected function prepareCookies($domain, $path, $secure) /** * Prepare the request headers * + * @param resource|string $body + * @param Http $uri + * @throws Exception\RuntimeException * @return array */ protected function prepareHeaders($body, $uri) diff --git a/library/Zend/Http/Header/SetCookie.php b/library/Zend/Http/Header/SetCookie.php index 4c55022b92d..31404aac0ca 100644 --- a/library/Zend/Http/Header/SetCookie.php +++ b/library/Zend/Http/Header/SetCookie.php @@ -270,6 +270,7 @@ public function getFieldValue() /** * @param string $name + * @throws Exception\InvalidArgumentException * @return SetCookie */ public function setName($name) @@ -310,6 +311,7 @@ public function getValue() * Set version * * @param integer $version + * @throws Exception\InvalidArgumentException */ public function setVersion($version) { @@ -333,6 +335,7 @@ public function getVersion() * Set Max-Age * * @param integer $maxAge + * @throws Exception\InvalidArgumentException */ public function setMaxAge($maxAge) { @@ -354,6 +357,7 @@ public function getMaxAge() /** * @param int $expires + * @throws Exception\InvalidArgumentException * @return SetCookie */ public function setExpires($expires) @@ -370,6 +374,7 @@ public function setExpires($expires) } /** + * @param bool $inSeconds * @return int */ public function getExpires($inSeconds = false) diff --git a/library/Zend/I18n/Validator/Alnum.php b/library/Zend/I18n/Validator/Alnum.php index deb8bcb7c26..ad1dc3d1e1f 100644 --- a/library/Zend/I18n/Validator/Alnum.php +++ b/library/Zend/I18n/Validator/Alnum.php @@ -53,7 +53,7 @@ class Alnum extends AbstractValidator /** * Sets default option values for this instance * - * @param array|\Traversable $options + * @param bool $allowWhiteSpace */ public function __construct($allowWhiteSpace = false) { diff --git a/library/Zend/Json/Decoder.php b/library/Zend/Json/Decoder.php index 7241e7e9221..b0c05b11273 100644 --- a/library/Zend/Json/Decoder.php +++ b/library/Zend/Json/Decoder.php @@ -85,6 +85,7 @@ class Decoder * @param int $decodeType How objects should be decoded -- see * {@link Zend_Json::TYPE_ARRAY} and {@link Zend_Json::TYPE_OBJECT} for * valid values + * @throws InvalidArgumentException * @return void */ protected function __construct($source, $decodeType) @@ -447,7 +448,7 @@ protected function _getNextToken() * * @link http://solarphp.com/ * @link http://svn.solarphp.com/core/trunk/Solar/Json.php - * @param string $value + * @param string $chrs * @return string */ public static function decodeUnicodeString($chrs) diff --git a/library/Zend/Json/Encoder.php b/library/Zend/Json/Encoder.php index 9dc7b26e375..a9dcdd9cac3 100644 --- a/library/Zend/Json/Encoder.php +++ b/library/Zend/Json/Encoder.php @@ -12,6 +12,7 @@ use Iterator; use IteratorAggregate; +use ReflectionClass; use Zend\Json\Exception\InvalidArgumentException; use Zend\Json\Exception\RecursionException; @@ -272,10 +273,10 @@ protected function _encodeString(&$string) * Encode the constants associated with the ReflectionClass * parameter. The encoding format is based on the class2 format * - * @param $cls ReflectionClass + * @param ReflectionClass $cls * @return string Encoded constant block in class2 format */ - private static function _encodeConstants(\ReflectionClass $cls) + private static function _encodeConstants(ReflectionClass $cls) { $result = "constants : {"; $constants = $cls->getConstants(); @@ -297,11 +298,11 @@ private static function _encodeConstants(\ReflectionClass $cls) * Encode the public methods of the ReflectionClass in the * class2 format * - * @param $cls ReflectionClass + * @param ReflectionClass $cls * @return string Encoded method fragment * */ - private static function _encodeMethods(\ReflectionClass $cls) + private static function _encodeMethods(ReflectionClass $cls) { $methods = $cls->getMethods(); $result = 'methods:{'; @@ -361,11 +362,11 @@ private static function _encodeMethods(\ReflectionClass $cls) * Encode the public properties of the ReflectionClass in the class2 * format. * - * @param $cls ReflectionClass + * @param ReflectionClass $cls * @return string Encode properties list * */ - private static function _encodeVariables(\ReflectionClass $cls) + private static function _encodeVariables(ReflectionClass $cls) { $properties = $cls->getProperties(); $propValues = get_class_vars($cls->getName()); diff --git a/library/Zend/Json/Server/Server.php b/library/Zend/Json/Server/Server.php index 061bf9c2a79..24f97f7608d 100644 --- a/library/Zend/Json/Server/Server.php +++ b/library/Zend/Json/Server/Server.php @@ -145,7 +145,8 @@ public function setClass($class, $namespace = '', $argv = null) * * @param string $fault * @param int $code - * @return false + * @param mixed $data + * @return Error */ public function fault($fault = null, $code = 404, $data = null) { diff --git a/library/Zend/Ldap/Collection/DefaultIterator.php b/library/Zend/Ldap/Collection/DefaultIterator.php index 3d94aa6ada9..6dc7c47a1e8 100644 --- a/library/Zend/Ldap/Collection/DefaultIterator.php +++ b/library/Zend/Ldap/Collection/DefaultIterator.php @@ -278,7 +278,6 @@ public function key() * Implements Iterator * * @throws \Zend\Ldap\Exception\LdapException - * @return */ public function next() { diff --git a/library/Zend/Loader/ModuleAutoloader.php b/library/Zend/Loader/ModuleAutoloader.php index 5a37280fa34..b97b301ece7 100644 --- a/library/Zend/Loader/ModuleAutoloader.php +++ b/library/Zend/Loader/ModuleAutoloader.php @@ -262,7 +262,8 @@ public function unregister() * registerPaths * * @param array|Traversable $paths - * @return ModuleLoader + * @throws \InvalidArgumentException + * @return ModuleAutoloader */ public function registerPaths($paths) { @@ -289,8 +290,9 @@ public function registerPaths($paths) * registerPath * * @param string $path - * @param string $moduleName - * @return ModuleLoader + * @param bool|string $moduleName + * @throws \InvalidArgumentException + * @return ModuleAutoloader */ public function registerPath($path, $moduleName = false) { @@ -339,6 +341,7 @@ protected function pharFileToModuleName($pharPath) * Normalize a path for insertion in the stack * * @param string $path + * @param bool $trailingSlash Whether trailing slash should be included * @return string */ public static function normalizePath($path, $trailingSlash = true) diff --git a/library/Zend/Log/Writer/AbstractWriter.php b/library/Zend/Log/Writer/AbstractWriter.php index dd59f398d13..8a41cc5c0bd 100644 --- a/library/Zend/Log/Writer/AbstractWriter.php +++ b/library/Zend/Log/Writer/AbstractWriter.php @@ -31,7 +31,7 @@ abstract class AbstractWriter implements WriterInterface /** * Filter chain * - * @var array + * @var Filter\FilterInterface[] */ protected $filters = array(); @@ -46,6 +46,7 @@ abstract class AbstractWriter implements WriterInterface * Add a filter specific to this writer. * * @param int|string|Filter\FilterInterface $filter + * @param array|null $options * @return AbstractWriter * @throws Exception\InvalidArgumentException */ @@ -87,7 +88,7 @@ public function getFilterPluginManager() * Set filter plugin manager * * @param string|FilterPluginManager $plugins - * @return Logger + * @return self * @throws Exception\InvalidArgumentException */ public function setFilterPluginManager($plugins) @@ -112,7 +113,7 @@ public function setFilterPluginManager($plugins) * * @param string $name * @param array|null $options - * @return Writer + * @return Filter\FilterInterface */ public function filterPlugin($name, array $options = null) { diff --git a/library/Zend/Log/Writer/Db.php b/library/Zend/Log/Writer/Db.php index 0d35606e465..bc0c398791e 100644 --- a/library/Zend/Log/Writer/Db.php +++ b/library/Zend/Log/Writer/Db.php @@ -60,8 +60,7 @@ class Db extends AbstractWriter * @param string $tableName * @param array $columnMap * @param string $separator - * @return Db - * @throw Exception\InvalidArgumentException + * @throws Exception\InvalidArgumentException */ public function __construct($db, $tableName = null, array $columnMap = null, $separator = null) { diff --git a/library/Zend/Log/Writer/Mail.php b/library/Zend/Log/Writer/Mail.php index d34a74105a8..becc6184b1c 100644 --- a/library/Zend/Log/Writer/Mail.php +++ b/library/Zend/Log/Writer/Mail.php @@ -76,7 +76,7 @@ class Mail extends AbstractWriter * * @param MailMessage|array|Traversable $mail * @param Transport\TransportInterface $transport Optional - * @return Mail + * @throws Exception\InvalidArgumentException */ public function __construct($mail, Transport\TransportInterface $transport = null) { diff --git a/library/Zend/Log/Writer/MongoDB.php b/library/Zend/Log/Writer/MongoDB.php index f9cae3dc2e4..c6fbe40d729 100644 --- a/library/Zend/Log/Writer/MongoDB.php +++ b/library/Zend/Log/Writer/MongoDB.php @@ -50,6 +50,7 @@ class MongoDB extends AbstractWriter * @param string|MongoDB $database * @param string $collection * @param array $saveOptions + * @throws Exception\InvalidArgumentException */ public function __construct($mongo, $database, $collection, array $saveOptions = array()) { diff --git a/library/Zend/Mail/Header/MessageId.php b/library/Zend/Mail/Header/MessageId.php index 49d1751bac3..d8c8edcef79 100644 --- a/library/Zend/Mail/Header/MessageId.php +++ b/library/Zend/Mail/Header/MessageId.php @@ -69,6 +69,7 @@ public function toString() /** * Set the message id * + * @param string|null $id * @return MessageId */ public function setId($id = null) diff --git a/library/Zend/Mime/Message.php b/library/Zend/Mime/Message.php index adf525a038a..4f681e7a3fd 100644 --- a/library/Zend/Mime/Message.php +++ b/library/Zend/Mime/Message.php @@ -149,6 +149,7 @@ public function getPartHeadersArray($partnum) * Get the headers of a given part as a string * * @param int $partnum + * @param string $EOL * @return string */ public function getPartHeaders($partnum, $EOL = Mime::LINEEND) @@ -160,6 +161,7 @@ public function getPartHeaders($partnum, $EOL = Mime::LINEEND) * Get the (encoded) content of a given part as a string * * @param int $partnum + * @param string $EOL * @return string */ public function getPartContent($partnum, $EOL = Mime::LINEEND) @@ -174,6 +176,7 @@ public function getPartContent($partnum, $EOL = Mime::LINEEND) * * @param string $body * @param string $boundary + * @throws Exception\RuntimeException * @return array */ protected static function _disassembleMime($body, $boundary) @@ -215,6 +218,7 @@ protected static function _disassembleMime($body, $boundary) * @param string $message * @param string $boundary * @param string $EOL EOL string; defaults to {@link Zend_Mime::LINEEND} + * @throws Exception\RuntimeException * @return \Zend\Mime\Message */ public static function createFromMessage($message, $boundary, $EOL = Mime::LINEEND) diff --git a/library/Zend/Mime/Part.php b/library/Zend/Mime/Part.php index c77ef85d5e9..54bdad03a77 100644 --- a/library/Zend/Mime/Part.php +++ b/library/Zend/Mime/Part.php @@ -117,7 +117,8 @@ public function getEncodedStream() /** * Get the Content of the current Mime Part in the given encoding. * - * @return String + * @param string $EOL + * @return string */ public function getContent($EOL = Mime::LINEEND) { @@ -145,6 +146,7 @@ public function getRawContent() * Create and return the array of headers for this MIME part * * @access public + * @param string $EOL * @return array */ public function getHeadersArray($EOL = Mime::LINEEND) @@ -197,6 +199,7 @@ public function getHeadersArray($EOL = Mime::LINEEND) /** * Return the headers for this part as a string * + * @param string $EOL * @return String */ public function getHeaders($EOL = Mime::LINEEND) diff --git a/library/Zend/ModuleManager/Listener/ServiceListener.php b/library/Zend/ModuleManager/Listener/ServiceListener.php index d2529ddedeb..f346e17da9d 100644 --- a/library/Zend/ModuleManager/Listener/ServiceListener.php +++ b/library/Zend/ModuleManager/Listener/ServiceListener.php @@ -49,6 +49,7 @@ class ServiceListener implements ServiceListenerInterface /** * @param ServiceManager $serviceManager + * @param null|array $configuration */ public function __construct(ServiceManager $serviceManager, $configuration = null) { @@ -75,6 +76,7 @@ public function setDefaultServiceConfig($configuration) * @param string $key Configuration key * @param string $moduleInterface FQCN as string * @param string $method Method name + * @throws Exception\RuntimeException * @return ServiceListener */ public function addServiceManager($serviceManager, $key, $moduleInterface, $method) @@ -187,6 +189,7 @@ public function onLoadModule(ModuleEvent $e) * used to configure the service manager. * * @param ModuleEvent $e + * @throws Exception\RuntimeException * @return void */ public function onLoadModulesPost(ModuleEvent $e) @@ -235,6 +238,7 @@ public function onLoadModulesPost(ModuleEvent $e) * the internal service configuration. * * @param ServiceConfig|string $config Instance of ServiceConfig or class name + * @throws Exception\RuntimeException * @return array */ protected function serviceConfigToArray($config) diff --git a/library/Zend/Mvc/Controller/Plugin/Redirect.php b/library/Zend/Mvc/Controller/Plugin/Redirect.php index b77dd2c9b2a..9f4ca9ec809 100644 --- a/library/Zend/Mvc/Controller/Plugin/Redirect.php +++ b/library/Zend/Mvc/Controller/Plugin/Redirect.php @@ -34,6 +34,7 @@ class Redirect extends AbstractPlugin * @param string $route RouteInterface name * @param array $params Parameters to use in url generation, if any * @param array $options RouteInterface-specific options to use in url generation, if any + * @param bool $reuseMatchedParams Whether to reuse matched parameters * @return Response * @throws Exception\DomainException if composed controller does not implement InjectApplicationEventInterface, or * router cannot be found in controller event diff --git a/library/Zend/Mvc/Controller/Plugin/Url.php b/library/Zend/Mvc/Controller/Plugin/Url.php index 9757fd7af00..1cad69a463c 100644 --- a/library/Zend/Mvc/Controller/Plugin/Url.php +++ b/library/Zend/Mvc/Controller/Plugin/Url.php @@ -34,6 +34,7 @@ class Url extends AbstractPlugin * @return string * @throws Exception\DomainException if composed controller does not implement InjectApplicationEventInterface, or * router cannot be found in controller event + * @throws Exception\RuntimeException if no RouteMatch instance or no matched route name present */ public function fromRoute($route = null, array $params = array(), $options = array(), $reuseMatchedParams = false) { diff --git a/library/Zend/Mvc/Controller/PluginManager.php b/library/Zend/Mvc/Controller/PluginManager.php index be48e5aeb82..86a30f52105 100644 --- a/library/Zend/Mvc/Controller/PluginManager.php +++ b/library/Zend/Mvc/Controller/PluginManager.php @@ -80,8 +80,8 @@ public function __construct(ConfigInterface $configuration = null) * as the first controller, the reference to the controller inside the * plugin is lost. * - * @param string $cName - * @param array $params + * @param string $name + * @param bool $usePeeringServiceManagers * @return mixed */ public function get($name, $usePeeringServiceManagers = true) diff --git a/library/Zend/ServiceManager/ServiceManager.php b/library/Zend/ServiceManager/ServiceManager.php index fea0e16f41d..0d1bea254f2 100644 --- a/library/Zend/ServiceManager/ServiceManager.php +++ b/library/Zend/ServiceManager/ServiceManager.php @@ -10,6 +10,7 @@ namespace Zend\ServiceManager; +use Closure; use ReflectionClass; class ServiceManager implements ServiceLocatorInterface @@ -40,7 +41,7 @@ class ServiceManager implements ServiceLocatorInterface protected $invokableClasses = array(); /** - * @var string|callable|Closure|InstanceFactoryInterface[] + * @var string|callable|Closure|FactoryInterface[] */ protected $factories = array(); @@ -231,8 +232,9 @@ public function setInvokableClass($name, $invokableClass, $shared = true) /** * @param string $name * @param string|FactoryInterface|callable $factory - * @param bool $shared + * @param bool $shared * @return ServiceManager + * @throws Exception\InvalidArgumentException * @throws Exception\InvalidServiceNameException */ public function setFactory($name, $factory, $shared = true) @@ -299,6 +301,7 @@ public function addAbstractFactory($factory, $topOfStack = true) /** * @param callable|InitializerInterface $initializer + * @param bool $topOfStack * @return ServiceManager * @throws Exception\InvalidArgumentException */ @@ -375,8 +378,9 @@ public function setShared($name, $isShared) /** * Retrieve a registered instance * - * @param string $cName + * @param string $name * @param bool $usePeeringServiceManagers + * @throws Exception\ServiceNotFoundException * @return object|array */ public function get($name, $usePeeringServiceManagers = true) @@ -436,8 +440,8 @@ public function get($name, $usePeeringServiceManagers = true) /** * @param string|array $name * @return false|object + * @throws Exception\ServiceNotFoundException * @throws Exception\ServiceNotCreatedException - * @throws Exception\InvalidServiceNameException */ public function create($name) { @@ -488,6 +492,7 @@ public function create($name) * Determine if we can create an instance. * * @param string|array $name + * @param bool $checkAbstractFactories * @return bool */ public function canCreate($name, $checkAbstractFactories = true) @@ -666,6 +671,7 @@ protected function canonicalizeName($name) * @param string $cName * @param string $rName * @throws Exception\ServiceNotCreatedException + * @throws Exception\ServiceNotFoundException * @throws Exception\CircularDependencyFoundException * @return object */ @@ -730,7 +736,7 @@ public function getCanonicalNames() * Allows to override the canonical names lookup map with predefined * values. * - * @return array $canonicalNames + * @param array $canonicalNames * @return ServiceManager */ public function setCanonicalNames($canonicalNames) @@ -762,7 +768,7 @@ protected function retrieveFromPeeringManager($name) * @param string $canonicalName * @param string $requestedName * @return null|\stdClass - * @throws Exception\ServiceNotCreatedException If resolved class does not exist + * @throws Exception\ServiceNotFoundException If resolved class does not exist */ protected function createFromInvokable($canonicalName, $requestedName) { diff --git a/library/Zend/Stdlib/Hydrator/Reflection.php b/library/Zend/Stdlib/Hydrator/Reflection.php index be3d90d4705..55d0980508d 100644 --- a/library/Zend/Stdlib/Hydrator/Reflection.php +++ b/library/Zend/Stdlib/Hydrator/Reflection.php @@ -64,7 +64,8 @@ public function hydrate(array $data, $object) * class has not been loaded. * * @static - * @param string|object $object + * @param string|object $input + * @throws Exception\InvalidArgumentException * @return array */ protected static function getReflProperties($input) diff --git a/library/Zend/View/Renderer/PhpRenderer.php b/library/Zend/View/Renderer/PhpRenderer.php index f861f4db9a9..317dbf0c7ed 100644 --- a/library/Zend/View/Renderer/PhpRenderer.php +++ b/library/Zend/View/Renderer/PhpRenderer.php @@ -11,9 +11,11 @@ namespace Zend\View\Renderer; use ArrayAccess; +use Traversable; use Zend\Filter\FilterChain; use Zend\View\Exception; use Zend\View\HelperPluginManager; +use Zend\View\Helper\AbstractHelper; use Zend\View\Model\ModelInterface as Model; use Zend\View\Renderer\RendererInterface as Renderer; use Zend\View\Resolver\ResolverInterface as Resolver; @@ -324,9 +326,9 @@ public function getHelperPluginManager() /** * Get plugin instance * - * @param string $plugin Name of plugin to return + * @param string $name Name of plugin to return * @param null|array $options Options to pass to plugin constructor (if not already instantiated) - * @return Helper + * @return AbstractHelper */ public function plugin($name, array $options = null) { @@ -387,7 +389,7 @@ public function getFilterChain() * ViewModel. The ViewModel must have the * template as an option in order to be * valid. - * @param null|array|Traversable Values to use when rendering. If none + * @param null|array|Traversable $values Values to use when rendering. If none * provided, uses those in the composed * variables container. * @return string The script output. From 7f74a84a53ce809cad583b580500a569d10d1b45 Mon Sep 17 00:00:00 2001 From: Juha Suni Date: Fri, 31 Aug 2012 12:31:45 +0300 Subject: [PATCH 005/154] Improvement ZF2-513 --- library/Zend/InputFilter/Factory.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/library/Zend/InputFilter/Factory.php b/library/Zend/InputFilter/Factory.php index c5aea31ce30..ce500c0d3b6 100644 --- a/library/Zend/InputFilter/Factory.php +++ b/library/Zend/InputFilter/Factory.php @@ -226,7 +226,14 @@ public function createInputFilter($inputFilterSpecification) } foreach ($inputFilterSpecification as $key => $value) { - $input = $this->createInput($value); + + if(($value instanceof InputInterface) || ($value instanceof InputFilterInterface)){ + $input = $value; + } + else{ + $input = $this->createInput($value); + } + $inputFilter->add($input, $key); } From 20d4c9e1dbb7c99a809cfa574f384d518b41450a Mon Sep 17 00:00:00 2001 From: Michel Hunziker Date: Fri, 31 Aug 2012 17:30:38 +0200 Subject: [PATCH 006/154] Add missing @throws annotations --- .../Zend/Authentication/Adapter/Http/FileResolver.php | 2 +- library/Zend/Barcode/Renderer/Image.php | 11 ++++++++--- library/Zend/Barcode/Renderer/Svg.php | 5 +++-- library/Zend/Cache/Pattern/CallbackCache.php | 8 +++++--- library/Zend/Cache/Pattern/CaptureCache.php | 7 ++++++- library/Zend/Cache/Pattern/OutputCache.php | 4 ++-- library/Zend/Cache/PatternFactory.php | 2 +- library/Zend/Cache/Storage/Adapter/AdapterOptions.php | 1 + library/Zend/Cache/Storage/Adapter/Filesystem.php | 5 +++++ library/Zend/Cache/Storage/Adapter/MemoryOptions.php | 1 + library/Zend/Cache/Storage/Adapter/ZendServerDisk.php | 4 +++- library/Zend/Cache/Storage/Adapter/ZendServerShm.php | 2 +- library/Zend/Cache/Storage/Plugin/PluginOptions.php | 4 +++- library/Zend/Captcha/AbstractAdapter.php | 1 + library/Zend/Captcha/AbstractWord.php | 1 + library/Zend/Captcha/Image.php | 3 +++ .../Annotation/Parser/DoctrineAnnotationParser.php | 1 + .../Annotation/Parser/GenericAnnotationParser.php | 2 ++ library/Zend/Config/Processor/Token.php | 2 +- library/Zend/Config/Reader/Ini.php | 2 +- library/Zend/Config/Reader/Yaml.php | 2 +- library/Zend/Console/Prompt/Select.php | 2 ++ library/Zend/Crypt/PublicKey/Rsa/PublicKey.php | 6 ++++-- library/Zend/Db/Adapter/Adapter.php | 4 ++++ library/Zend/Db/Adapter/Driver/Mysqli/Result.php | 6 +++++- library/Zend/Db/Adapter/Driver/Pgsql/Pgsql.php | 1 + library/Zend/Db/Adapter/Driver/Sqlsrv/Statement.php | 3 ++- library/Zend/Db/ResultSet/HydratingResultSet.php | 1 + library/Zend/Db/ResultSet/ResultSet.php | 1 + library/Zend/Db/RowGateway/RowGateway.php | 1 + library/Zend/Db/Sql/Predicate/In.php | 1 + .../Db/TableGateway/Feature/GlobalAdapterFeature.php | 1 + library/Zend/Db/TableGateway/TableGateway.php | 1 + library/Zend/Feed/Writer/AbstractFeed.php | 1 + library/Zend/Feed/Writer/Extension/ITunes/Entry.php | 1 + library/Zend/Feed/Writer/FeedFactory.php | 2 ++ library/Zend/File/ClassFileLocator.php | 1 + library/Zend/File/Transfer/Adapter/Http.php | 1 + library/Zend/File/Transfer/Transfer.php | 1 + library/Zend/Filter/Boolean.php | 1 + library/Zend/Filter/Compress.php | 4 +++- library/Zend/Filter/Compress/Bz2.php | 1 + library/Zend/Filter/Compress/Gz.php | 2 ++ library/Zend/Filter/Compress/Rar.php | 1 + library/Zend/Filter/Compress/Tar.php | 1 + library/Zend/Filter/Compress/Zip.php | 2 ++ library/Zend/Filter/Encrypt.php | 1 + library/Zend/Filter/Encrypt/BlockCipher.php | 1 + library/Zend/Filter/FilterChain.php | 1 + library/Zend/Filter/Inflector.php | 1 + library/Zend/Form/Annotation/AnnotationBuilder.php | 1 + library/Zend/Form/Element/Captcha.php | 1 + .../Zend/Form/View/Helper/Captcha/AbstractWord.php | 6 ++++-- library/Zend/Form/View/Helper/Captcha/Dumb.php | 1 + library/Zend/Form/View/Helper/Captcha/Figlet.php | 1 + library/Zend/Form/View/Helper/Captcha/Image.php | 1 + library/Zend/Form/View/Helper/Captcha/ReCaptcha.php | 1 + library/Zend/Form/View/Helper/FormButton.php | 3 +++ library/Zend/Form/View/Helper/FormCheckbox.php | 3 ++- library/Zend/Form/View/Helper/FormElementErrors.php | 1 + library/Zend/Form/View/Helper/FormImage.php | 1 + library/Zend/Form/View/Helper/FormInput.php | 1 + library/Zend/Form/View/Helper/FormLabel.php | 3 +++ library/Zend/Form/View/Helper/FormMultiCheckbox.php | 5 ++++- library/Zend/Form/View/Helper/FormReset.php | 1 + library/Zend/Form/View/Helper/FormSelect.php | 2 ++ library/Zend/Form/View/Helper/FormSubmit.php | 1 + library/Zend/Form/View/Helper/FormTextarea.php | 1 + library/Zend/Http/Client/Adapter/Socket.php | 2 ++ library/Zend/Http/Client/Adapter/Test.php | 2 ++ library/Zend/Http/Header/AbstractAccept.php | 1 + library/Zend/I18n/Translator/Plural/Rule.php | 1 + library/Zend/I18n/Translator/Plural/Symbol.php | 2 ++ library/Zend/I18n/Translator/Translator.php | 1 + library/Zend/InputFilter/BaseInputFilter.php | 5 +++++ library/Zend/InputFilter/Factory.php | 4 ++++ library/Zend/Json/Server/Server.php | 2 ++ library/Zend/Loader/ClassMapAutoloader.php | 2 ++ library/Zend/Loader/PluginClassLoader.php | 1 + library/Zend/Loader/StandardAutoloader.php | 3 +++ library/Zend/Log/Filter/Validator.php | 1 + library/Zend/Log/Logger.php | 1 + library/Zend/Mail/Transport/Smtp.php | 1 + .../Zend/ModuleManager/Listener/ListenerOptions.php | 4 ++++ library/Zend/ModuleManager/ModuleEvent.php | 2 ++ library/Zend/ModuleManager/ModuleManager.php | 2 ++ library/Zend/Navigation/Page/AbstractPage.php | 5 +++++ library/Zend/Paginator/Adapter/DbSelect.php | 1 + library/Zend/ProgressBar/Adapter/Console.php | 1 + library/Zend/Server/Method/Definition.php | 3 +++ library/Zend/Server/Reflection/Prototype.php | 1 + library/Zend/Server/Reflection/ReflectionClass.php | 2 ++ .../Zend/Server/Reflection/ReflectionParameter.php | 3 +++ .../Zend/Server/Reflection/ReflectionReturnValue.php | 2 ++ library/Zend/ServiceManager/Di/DiServiceFactory.php | 2 +- library/Zend/Session/Container.php | 3 ++- library/Zend/Soap/Server.php | 3 +++ .../Wsdl/ComplexTypeStrategy/ArrayOfTypeComplex.php | 1 + .../Wsdl/ComplexTypeStrategy/DefaultComplexType.php | 1 + library/Zend/Stdlib/AbstractOptions.php | 3 +++ library/Zend/Stdlib/ArrayUtils.php | 1 + library/Zend/Stdlib/CallbackHandler.php | 1 + library/Zend/Stdlib/Message.php | 2 ++ library/Zend/Text/MultiByte.php | 1 + library/Zend/Uri/Uri.php | 1 + library/Zend/Validator/Uri.php | 2 ++ library/Zend/View/Helper/BasePath.php | 1 + library/Zend/View/Helper/Escaper/AbstractHelper.php | 3 ++- library/Zend/View/Helper/Layout.php | 1 + library/Zend/View/Helper/RenderChildModel.php | 1 + library/Zend/View/Renderer/FeedRenderer.php | 1 + library/Zend/View/Resolver/TemplateMapResolver.php | 5 ++++- library/Zend/View/Resolver/TemplatePathStack.php | 2 +- library/Zend/View/View.php | 2 ++ library/Zend/XmlRpc/Client/ServerIntrospection.php | 2 ++ library/Zend/XmlRpc/Server/System.php | 2 ++ library/Zend/XmlRpc/Value/DateTime.php | 1 + library/Zend/XmlRpc/Value/Integer.php | 1 + 118 files changed, 220 insertions(+), 33 deletions(-) diff --git a/library/Zend/Authentication/Adapter/Http/FileResolver.php b/library/Zend/Authentication/Adapter/Http/FileResolver.php index 9abaa5a0956..63b82b1e77c 100644 --- a/library/Zend/Authentication/Adapter/Http/FileResolver.php +++ b/library/Zend/Authentication/Adapter/Http/FileResolver.php @@ -45,7 +45,7 @@ public function __construct($path = '') * * @param string $path * @return FileResolver Provides a fluent interface - * @throws Exception\ExceptionInterface + * @throws Exception\InvalidArgumentException if path is not readable */ public function setFile($path) { diff --git a/library/Zend/Barcode/Renderer/Image.php b/library/Zend/Barcode/Renderer/Image.php index ed1608faa07..f1bbe317409 100644 --- a/library/Zend/Barcode/Renderer/Image.php +++ b/library/Zend/Barcode/Renderer/Image.php @@ -67,7 +67,9 @@ class Image extends AbstractRenderer /** * Constructor + * * @param array|\Traversable $options + * @throws RendererCreationException */ public function __construct($options = null) { @@ -80,9 +82,10 @@ public function __construct($options = null) /** * Set height of the result image + * * @param null|integer $value + * @throws Exception\OutOfRangeException * @return Image - * @throw Exception */ public function setHeight($value) { @@ -109,7 +112,8 @@ public function getHeight() * Set barcode width * * @param mixed $value - * @return void + * @throws Exception\OutOfRangeException + * @return self */ public function setWidth($value) { @@ -154,8 +158,8 @@ public function setResource($image) * Set the image type to produce (png, jpeg, gif) * * @param string $value + * @throws Exception\InvalidArgumentException * @return Image - * @throw Exception */ public function setImageType($value) { @@ -260,6 +264,7 @@ protected function checkSpecificParams() /** * Check barcode dimensions * + * @throws Exception\RuntimeException * @return void */ protected function checkDimensions() diff --git a/library/Zend/Barcode/Renderer/Svg.php b/library/Zend/Barcode/Renderer/Svg.php index b8ff72260aa..f035d1d1fee 100644 --- a/library/Zend/Barcode/Renderer/Svg.php +++ b/library/Zend/Barcode/Renderer/Svg.php @@ -49,8 +49,8 @@ class Svg extends AbstractRenderer /** * Set height of the result image * @param null|integer $value + * @throws Exception\OutOfRangeException * @return Svg - * @throw Exception */ public function setHeight($value) { @@ -77,7 +77,8 @@ public function getHeight() * Set barcode width * * @param mixed $value - * @return void + * @throws Exception\OutOfRangeException + * @return self */ public function setWidth($value) { diff --git a/library/Zend/Cache/Pattern/CallbackCache.php b/library/Zend/Cache/Pattern/CallbackCache.php index e5fe0b0fdb3..b77e641e7bd 100644 --- a/library/Zend/Cache/Pattern/CallbackCache.php +++ b/library/Zend/Cache/Pattern/CallbackCache.php @@ -44,7 +44,8 @@ public function setOptions(PatternOptions $options) * @param callable $callback A valid callback * @param array $args Callback arguments * @return mixed Result - * @throws Exception + * @throws Exception\RuntimeException if invalid cached data + * @throws \Exception */ public function call($callback, array $args = array()) { @@ -127,8 +128,9 @@ public function generateKey($callback, array $args = array()) * * @param callable $callback A valid callback * @param array $args Callback arguments + * @throws Exception\RuntimeException if callback not serializable + * @throws Exception\InvalidArgumentException if invalid callback * @return string - * @throws Exception */ protected function generateCallbackKey($callback, array $args) { @@ -173,8 +175,8 @@ protected function generateCallbackKey($callback, array $args) * Generate a unique key of the argument part. * * @param array $args + * @throws Exception\RuntimeException * @return string - * @throws Exception */ protected function generateArgumentsKey(array $args) { diff --git a/library/Zend/Cache/Pattern/CaptureCache.php b/library/Zend/Cache/Pattern/CaptureCache.php index b8b2fbce6b9..1d51337ccf2 100644 --- a/library/Zend/Cache/Pattern/CaptureCache.php +++ b/library/Zend/Cache/Pattern/CaptureCache.php @@ -49,7 +49,7 @@ public function start($pageId = null) * * @param string $content * @param null|string $pageId - * @throws Exception\RuntimeException + * @throws Exception\LogicException */ public function set($content, $pageId = null) { @@ -74,6 +74,7 @@ public function set($content, $pageId = null) * * @param null|string $pageId * @return bool|string + * @throws Exception\LogicException * @throws Exception\RuntimeException */ public function get($pageId = null) @@ -108,6 +109,7 @@ public function get($pageId = null) * Checks if a cache with given id exists * * @param null|string $pageId + * @throws Exception\LogicException * @return boolean */ public function has($pageId = null) @@ -132,6 +134,7 @@ public function has($pageId = null) * Remove from cache * * @param null|string $pageId + * @throws Exception\LogicException * @throws Exception\RuntimeException * @return boolean */ @@ -169,6 +172,7 @@ public function remove($pageId = null) * Clear cached pages matching glob pattern * * @param string $pattern + * @throws Exception\LogicException */ public function clearByGlob($pattern = '**') { @@ -191,6 +195,7 @@ public function clearByGlob($pattern = '**') /** * Determine the page to save from the request * + * @throws Exception\RuntimeException * @return string */ protected function detectPageId() diff --git a/library/Zend/Cache/Pattern/OutputCache.php b/library/Zend/Cache/Pattern/OutputCache.php index a55f09cf4e0..f9aac0a778e 100644 --- a/library/Zend/Cache/Pattern/OutputCache.php +++ b/library/Zend/Cache/Pattern/OutputCache.php @@ -50,8 +50,8 @@ public function setOptions(PatternOptions $options) * else start buffering output until end() is called or the script ends. * * @param string $key Key + * @throws Exception\MissingKeyException if key is missing * @return boolean - * @throws Exception */ public function start($key) { @@ -76,8 +76,8 @@ public function start($key) * Stops buffering output, write buffered data to cache using the given key on start() * and displays the buffer. * + * @throws Exception\RuntimeException if output cache not started or buffering not active * @return boolean TRUE on success, FALSE on failure writing to cache - * @throws Exception */ public function end() { diff --git a/library/Zend/Cache/PatternFactory.php b/library/Zend/Cache/PatternFactory.php index b39efc9fe5d..5a9de1bc924 100644 --- a/library/Zend/Cache/PatternFactory.php +++ b/library/Zend/Cache/PatternFactory.php @@ -32,7 +32,7 @@ class PatternFactory * @param string|Pattern\PatternInterface $patternName * @param array|Traversable|Pattern\PatternOptions $options * @return Pattern\PatternInterface - * @throws Exception\RuntimeException + * @throws Exception\InvalidArgumentException */ public static function factory($patternName, $options = array()) { diff --git a/library/Zend/Cache/Storage/Adapter/AdapterOptions.php b/library/Zend/Cache/Storage/Adapter/AdapterOptions.php index 70adb9d5b1e..f5c0896b413 100644 --- a/library/Zend/Cache/Storage/Adapter/AdapterOptions.php +++ b/library/Zend/Cache/Storage/Adapter/AdapterOptions.php @@ -86,6 +86,7 @@ public function setAdapter(StorageInterface $adapter = null) * Set key pattern * * @param null|string $keyPattern + * @throws Exception\InvalidArgumentException * @return AdapterOptions */ public function setKeyPattern($keyPattern) diff --git a/library/Zend/Cache/Storage/Adapter/Filesystem.php b/library/Zend/Cache/Storage/Adapter/Filesystem.php index 505cf84a108..a87257a9a9d 100644 --- a/library/Zend/Cache/Storage/Adapter/Filesystem.php +++ b/library/Zend/Cache/Storage/Adapter/Filesystem.php @@ -103,6 +103,7 @@ public function getOptions() /** * Flush the whole storage * + * @throws Exception\RuntimeException * @return boolean */ public function flush() @@ -179,6 +180,7 @@ public function clearExpired() * Remove items by given namespace * * @param string $namespace + * @throws Exception\RuntimeException * @return boolean */ public function clearByNamespace($namespace) @@ -212,6 +214,7 @@ public function clearByNamespace($namespace) * Remove items matching given prefix * * @param string $prefix + * @throws Exception\RuntimeException * @return boolean */ public function clearByPrefix($prefix) @@ -383,6 +386,7 @@ public function optimize() /** * Get total space in bytes * + * @throws Exception\RuntimeException * @return int|float */ public function getTotalSpace() @@ -419,6 +423,7 @@ public function getTotalSpace() /** * Get available space in bytes * + * @throws Exception\RuntimeException * @return int|float */ public function getAvailableSpace() diff --git a/library/Zend/Cache/Storage/Adapter/MemoryOptions.php b/library/Zend/Cache/Storage/Adapter/MemoryOptions.php index ce871fc12ad..21bb4cc9f94 100644 --- a/library/Zend/Cache/Storage/Adapter/MemoryOptions.php +++ b/library/Zend/Cache/Storage/Adapter/MemoryOptions.php @@ -80,6 +80,7 @@ public function getMemoryLimit() * Normalized a given value of memory limit into the number of bytes * * @param string|int $value + * @throws Exception\InvalidArgumentException * @return int */ protected function normalizeMemoryLimit($value) diff --git a/library/Zend/Cache/Storage/Adapter/ZendServerDisk.php b/library/Zend/Cache/Storage/Adapter/ZendServerDisk.php index e9fe81baa65..82c09feb5d8 100644 --- a/library/Zend/Cache/Storage/Adapter/ZendServerDisk.php +++ b/library/Zend/Cache/Storage/Adapter/ZendServerDisk.php @@ -41,7 +41,7 @@ class ZendServerDisk extends AbstractZendServer implements * Constructor * * @param null|array|\Traversable|AdapterOptions $options - * @throws Exception\ExceptionInterface + * @throws Exception\ExtensionNotLoadedException */ public function __construct($options = array()) { @@ -84,6 +84,7 @@ public function clearByNamespace($namespace) /** * Get total space in bytes * + * @throws Exception\RuntimeException * @return int|float */ public function getTotalSpace() @@ -106,6 +107,7 @@ public function getTotalSpace() /** * Get available space in bytes * + * @throws Exception\RuntimeException * @return int|float */ public function getAvailableSpace() diff --git a/library/Zend/Cache/Storage/Adapter/ZendServerShm.php b/library/Zend/Cache/Storage/Adapter/ZendServerShm.php index 63759e08529..d20b6c99555 100644 --- a/library/Zend/Cache/Storage/Adapter/ZendServerShm.php +++ b/library/Zend/Cache/Storage/Adapter/ZendServerShm.php @@ -31,7 +31,7 @@ class ZendServerShm extends AbstractZendServer implements * Constructor * * @param null|array|\Traversable|AdapterOptions $options - * @throws Exception\ExceptionInterface + * @throws Exception\ExtensionNotLoadedException */ public function __construct($options = array()) { diff --git a/library/Zend/Cache/Storage/Plugin/PluginOptions.php b/library/Zend/Cache/Storage/Plugin/PluginOptions.php index 9ca1b41dcaa..5bf20b74ba5 100644 --- a/library/Zend/Cache/Storage/Plugin/PluginOptions.php +++ b/library/Zend/Cache/Storage/Plugin/PluginOptions.php @@ -105,7 +105,8 @@ public function getClearingFactor() * Used by: * - ExceptionHandler * - * @param callable ExceptionCallback + * @param callable $exceptionCallback + * @throws Exception\InvalidArgumentException * @return PluginOptions */ public function setExceptionCallback($exceptionCallback) @@ -187,6 +188,7 @@ public function getOptimizingFactor() * - Serializer * * @param string|SerializerAdapter $serializer + * @throws Exception\InvalidArgumentException * @return Serializer */ public function setSerializer($serializer) diff --git a/library/Zend/Captcha/AbstractAdapter.php b/library/Zend/Captcha/AbstractAdapter.php index a259d71f7c3..015db98d90f 100644 --- a/library/Zend/Captcha/AbstractAdapter.php +++ b/library/Zend/Captcha/AbstractAdapter.php @@ -101,6 +101,7 @@ public function setOption($key, $value) * Set object state from options array * * @param array|Traversable $options + * @throws Exception\InvalidArgumentException * @return AbstractAdapter */ public function setOptions($options = array()) diff --git a/library/Zend/Captcha/AbstractWord.php b/library/Zend/Captcha/AbstractWord.php index 936ccd30050..e9d561893be 100644 --- a/library/Zend/Captcha/AbstractWord.php +++ b/library/Zend/Captcha/AbstractWord.php @@ -242,6 +242,7 @@ public function setUseNumbers($useNumbers) /** * Get session object * + * @throws Exception\InvalidArgumentException * @return Container */ public function getSession() diff --git a/library/Zend/Captcha/Image.php b/library/Zend/Captcha/Image.php index f75de0935be..94a4fc44d89 100644 --- a/library/Zend/Captcha/Image.php +++ b/library/Zend/Captcha/Image.php @@ -123,6 +123,7 @@ class Image extends AbstractWord * Constructor * * @param array|\Traversable $options + * @throws Exception\ExtensionNotLoadedException */ public function __construct($options = null) { @@ -474,6 +475,8 @@ public function generate() * * @param string $id Captcha ID * @param string $word Captcha word + * @throws Exception\NoFontProvidedException if no font was set + * @throws Exception\ImageNotLoadableException if start image cannot be loaded */ protected function generateImage($id, $word) { diff --git a/library/Zend/Code/Annotation/Parser/DoctrineAnnotationParser.php b/library/Zend/Code/Annotation/Parser/DoctrineAnnotationParser.php index e5656b73a27..9d62da10102 100644 --- a/library/Zend/Code/Annotation/Parser/DoctrineAnnotationParser.php +++ b/library/Zend/Code/Annotation/Parser/DoctrineAnnotationParser.php @@ -134,6 +134,7 @@ public function registerAnnotation($annotation) * * @param array|Traversable $annotations Array or traversable object of * annotation class names + * @throws Exception\InvalidArgumentException * @return DoctrineAnnotationParser */ public function registerAnnotations($annotations) diff --git a/library/Zend/Code/Annotation/Parser/GenericAnnotationParser.php b/library/Zend/Code/Annotation/Parser/GenericAnnotationParser.php index 9152a583b1e..b4aac6b0d4b 100644 --- a/library/Zend/Code/Annotation/Parser/GenericAnnotationParser.php +++ b/library/Zend/Code/Annotation/Parser/GenericAnnotationParser.php @@ -117,6 +117,7 @@ public function registerAnnotation($annotation) * Register many annotations at once * * @param array|Traversable $annotations + * @throws Exception\InvalidArgumentException * @return GenericAnnotationParser */ public function registerAnnotations($annotations) @@ -159,6 +160,7 @@ public function hasAnnotation($class) * * @param string $alias * @param string $class May be either a registered annotation name or another alias + * @throws Exception\InvalidArgumentException * @return GenericAnnotationParser */ public function setAlias($alias, $class) diff --git a/library/Zend/Config/Processor/Token.php b/library/Zend/Config/Processor/Token.php index 0ba34a76a92..af6204c4043 100644 --- a/library/Zend/Config/Processor/Token.php +++ b/library/Zend/Config/Processor/Token.php @@ -200,7 +200,7 @@ protected function buildMap() * * @param Config $config * @return Config - * @throws InvalidArgumentException + * @throws Exception\InvalidArgumentException */ public function process(Config $config) { diff --git a/library/Zend/Config/Reader/Ini.php b/library/Zend/Config/Reader/Ini.php index fa431f691aa..3ef6bd449ea 100644 --- a/library/Zend/Config/Reader/Ini.php +++ b/library/Zend/Config/Reader/Ini.php @@ -63,7 +63,7 @@ public function getNestSeparator() * @see ReaderInterface::fromFile() * @param string $filename * @return array - * @throws Exception\InvalidArgumentException + * @throws Exception\RuntimeException */ public function fromFile($filename) { diff --git a/library/Zend/Config/Reader/Yaml.php b/library/Zend/Config/Reader/Yaml.php index c33ef295e4f..bf34303d0f8 100644 --- a/library/Zend/Config/Reader/Yaml.php +++ b/library/Zend/Config/Reader/Yaml.php @@ -56,7 +56,7 @@ public function __construct($yamlDecoder = null) * * @param string|callable $yamlDecoder the decoder to set * @return Yaml - * @throws Exception\InvalidArgumentException + * @throws Exception\RuntimeException */ public function setYamlDecoder($yamlDecoder) { diff --git a/library/Zend/Console/Prompt/Select.php b/library/Zend/Console/Prompt/Select.php index 3fff3b5a6eb..efa46158a0c 100644 --- a/library/Zend/Console/Prompt/Select.php +++ b/library/Zend/Console/Prompt/Select.php @@ -41,6 +41,7 @@ class Select extends Char * @param array $options Allowed options * @param bool $allowEmpty Allow empty (no) selection? * @param bool $echo True to display selected option? + * @throws Exception\BadMethodCallException if no options available */ public function __construct( $promptText = 'Please select one option', @@ -121,6 +122,7 @@ public function show() * Set allowed options * * @param array|\Traversable $options + * @throws Exception\BadMethodCallException */ public function setOptions($options) { diff --git a/library/Zend/Crypt/PublicKey/Rsa/PublicKey.php b/library/Zend/Crypt/PublicKey/Rsa/PublicKey.php index a220446902e..dae01d3dee6 100644 --- a/library/Zend/Crypt/PublicKey/Rsa/PublicKey.php +++ b/library/Zend/Crypt/PublicKey/Rsa/PublicKey.php @@ -74,8 +74,9 @@ public function __construct($pemStringOrCertificate) * Encrypt using this key * * @param string $data - * @return string + * @throws Exception\InvalidArgumentException * @throws Exception\RuntimeException + * @return string */ public function encrypt($data) { @@ -99,8 +100,9 @@ public function encrypt($data) * Decrypt using this key * * @param string $data - * @return string + * @throws Exception\InvalidArgumentException * @throws Exception\RuntimeException + * @return string */ public function decrypt($data) { diff --git a/library/Zend/Db/Adapter/Adapter.php b/library/Zend/Db/Adapter/Adapter.php index 4c61ccb403f..919403425ac 100644 --- a/library/Zend/Db/Adapter/Adapter.php +++ b/library/Zend/Db/Adapter/Adapter.php @@ -64,6 +64,7 @@ class Adapter * @param Driver\DriverInterface|array $driver * @param Platform\PlatformInterface $platform * @param ResultSet\ResultSetInterface $queryResultPrototype + * @throws Exception\InvalidArgumentException */ public function __construct($driver, Platform\PlatformInterface $platform = null, ResultSet\ResultSetInterface $queryResultPrototype = null) { @@ -126,6 +127,7 @@ public function getCurrentSchema() * * @param string $sql * @param string|array $parametersOrQueryMode + * @throws Exception\InvalidArgumentException * @return Driver\StatementInterface|ResultSet\ResultSet */ public function query($sql, $parametersOrQueryMode = self::QUERY_MODE_PREPARE) @@ -199,6 +201,7 @@ public function getHelpers(/* $functions */) /** * @param $name + * @throws Exception\InvalidArgumentException * @return Driver\DriverInterface|Platform\PlatformInterface */ public function __get($name) @@ -218,6 +221,7 @@ public function __get($name) * @param array $parameters * @return Driver\DriverInterface * @throws \InvalidArgumentException + * @throws Exception\InvalidArgumentException */ protected function createDriverFromParameters(array $parameters) { diff --git a/library/Zend/Db/Adapter/Driver/Mysqli/Result.php b/library/Zend/Db/Adapter/Driver/Mysqli/Result.php index c99d60db3b2..ab81db1f442 100644 --- a/library/Zend/Db/Adapter/Driver/Mysqli/Result.php +++ b/library/Zend/Db/Adapter/Driver/Mysqli/Result.php @@ -72,9 +72,11 @@ class Result implements \Iterator, ResultInterface /** * Initialize + * * @param mixed $resource * @param mixed $generatedValue * @param bool|null $isBuffered + * @throws Exception\InvalidArgumentException * @return Result */ public function initialize($resource, $generatedValue, $isBuffered = null) @@ -178,7 +180,7 @@ public function current() * get data out. These values have to be references: * @see http://php.net/manual/en/mysqli-stmt.bind-result.php * - * @throws \RuntimeException + * @throws Exception\RuntimeException * @return bool */ protected function loadDataFromMysqliStatement() @@ -296,6 +298,8 @@ public function valid() /** * Count + * + * @throws Exception\RuntimeException * @return integer */ public function count() diff --git a/library/Zend/Db/Adapter/Driver/Pgsql/Pgsql.php b/library/Zend/Db/Adapter/Driver/Pgsql/Pgsql.php index 7b74746be9a..6ac21c5c12d 100644 --- a/library/Zend/Db/Adapter/Driver/Pgsql/Pgsql.php +++ b/library/Zend/Db/Adapter/Driver/Pgsql/Pgsql.php @@ -105,6 +105,7 @@ public function getDatabasePlatformName($nameFormat = self::NAME_FORMAT_CAMELCAS } /** + * @throws Exception\RuntimeException * @return bool */ public function checkEnvironment() diff --git a/library/Zend/Db/Adapter/Driver/Sqlsrv/Statement.php b/library/Zend/Db/Adapter/Driver/Sqlsrv/Statement.php index a813f2890a9..ec1d184a63e 100644 --- a/library/Zend/Db/Adapter/Driver/Sqlsrv/Statement.php +++ b/library/Zend/Db/Adapter/Driver/Sqlsrv/Statement.php @@ -82,7 +82,8 @@ public function setDriver(Sqlsrv $driver) * b) "SQL Server Statement" when a prepared statement has been already produced * (there will need to already be a bound param set if it applies to this query) * - * @param resource + * @param resource $resource + * @throws Exception\InvalidArgumentException * @return Statement */ public function initialize($resource) diff --git a/library/Zend/Db/ResultSet/HydratingResultSet.php b/library/Zend/Db/ResultSet/HydratingResultSet.php index f2edd52d4f0..785fd7ce3cb 100644 --- a/library/Zend/Db/ResultSet/HydratingResultSet.php +++ b/library/Zend/Db/ResultSet/HydratingResultSet.php @@ -47,6 +47,7 @@ public function __construct(HydratorInterface $hydrator = null, $objectPrototype * Set the row object prototype * * @param object $objectPrototype + * @throws Exception\InvalidArgumentException * @return ResultSet */ public function setObjectPrototype($objectPrototype) diff --git a/library/Zend/Db/ResultSet/ResultSet.php b/library/Zend/Db/ResultSet/ResultSet.php index 23718f9e7c5..7aa065ec114 100644 --- a/library/Zend/Db/ResultSet/ResultSet.php +++ b/library/Zend/Db/ResultSet/ResultSet.php @@ -62,6 +62,7 @@ public function __construct($returnType = self::TYPE_ARRAYOBJECT, $arrayObjectPr * Set the row object prototype * * @param ArrayObject $arrayObjectPrototype + * @throws Exception\InvalidArgumentException * @return ResultSet */ public function setArrayObjectPrototype($arrayObjectPrototype) diff --git a/library/Zend/Db/RowGateway/RowGateway.php b/library/Zend/Db/RowGateway/RowGateway.php index b4c6c340e22..5133c5791a3 100644 --- a/library/Zend/Db/RowGateway/RowGateway.php +++ b/library/Zend/Db/RowGateway/RowGateway.php @@ -27,6 +27,7 @@ class RowGateway extends AbstractRowGateway * @param string $primaryKeyColumn * @param string|\Zend\Db\Sql\TableIdentifier $table * @param Adapter|Sql $adapterOrSql + * @throws Exception\InvalidArgumentException */ public function __construct($primaryKeyColumn, $table, $adapterOrSql = null) { diff --git a/library/Zend/Db/Sql/Predicate/In.php b/library/Zend/Db/Sql/Predicate/In.php index 81cf78d809b..523b850a8cd 100644 --- a/library/Zend/Db/Sql/Predicate/In.php +++ b/library/Zend/Db/Sql/Predicate/In.php @@ -65,6 +65,7 @@ public function getIdentifier() * Set set of values for IN comparison * * @param array $valueSet + * @throws Exception\InvalidArgumentException * @return In */ public function setValueSet($valueSet) diff --git a/library/Zend/Db/TableGateway/Feature/GlobalAdapterFeature.php b/library/Zend/Db/TableGateway/Feature/GlobalAdapterFeature.php index b9b3ca14624..8a0a81798ac 100644 --- a/library/Zend/Db/TableGateway/Feature/GlobalAdapterFeature.php +++ b/library/Zend/Db/TableGateway/Feature/GlobalAdapterFeature.php @@ -44,6 +44,7 @@ public static function setStaticAdapter(Adapter $adapter) /** * Get static adapter * + * @throws Exception\RuntimeException * @return Adapter */ public static function getStaticAdapter() diff --git a/library/Zend/Db/TableGateway/TableGateway.php b/library/Zend/Db/TableGateway/TableGateway.php index 0716ee1596f..469c33eaab9 100644 --- a/library/Zend/Db/TableGateway/TableGateway.php +++ b/library/Zend/Db/TableGateway/TableGateway.php @@ -32,6 +32,7 @@ class TableGateway extends AbstractTableGateway * @param Feature\AbstractFeature|Feature\FeatureSet|Feature\AbstractFeature[] $features * @param ResultSetInterface $resultSetPrototype * @param Sql $sql + * @throws Exception\InvalidArgumentException */ public function __construct($table, Adapter $adapter, $features = null, ResultSetInterface $resultSetPrototype = null, Sql $sql = null) { diff --git a/library/Zend/Feed/Writer/AbstractFeed.php b/library/Zend/Feed/Writer/AbstractFeed.php index a6ea27f4a60..b93e72753b9 100644 --- a/library/Zend/Feed/Writer/AbstractFeed.php +++ b/library/Zend/Feed/Writer/AbstractFeed.php @@ -770,6 +770,7 @@ public function __call($method, $args) /** * Load extensions from Zend_Feed_Writer * + * @throws Exception\RuntimeException * @return void */ protected function _loadExtensions() diff --git a/library/Zend/Feed/Writer/Extension/ITunes/Entry.php b/library/Zend/Feed/Writer/Extension/ITunes/Entry.php index ce6c400a7ef..24ed2209b28 100644 --- a/library/Zend/Feed/Writer/Extension/ITunes/Entry.php +++ b/library/Zend/Feed/Writer/Extension/ITunes/Entry.php @@ -209,6 +209,7 @@ public function setItunesSummary($value) * * @param string $method * @param array $params + * @throws Writer\Exception\BadMethodCallException * @return mixed */ public function __call($method, array $params) diff --git a/library/Zend/Feed/Writer/FeedFactory.php b/library/Zend/Feed/Writer/FeedFactory.php index 2abc8bc3c0b..899895e2905 100644 --- a/library/Zend/Feed/Writer/FeedFactory.php +++ b/library/Zend/Feed/Writer/FeedFactory.php @@ -23,6 +23,7 @@ abstract class FeedFactory * Create and return a Feed based on data provided. * * @param array|\Traversable $data + * @throws Exception\InvalidArgumentException * @return Feed */ public static function factory($data) @@ -88,6 +89,7 @@ protected static function convertKey($key) * * @param array|Traversable $entries * @param Feed $feed + * @throws Exception\InvalidArgumentException * @return void */ protected static function createEntries($entries, Feed $feed) diff --git a/library/Zend/File/ClassFileLocator.php b/library/Zend/File/ClassFileLocator.php index 5ad4b73b67b..17667000219 100644 --- a/library/Zend/File/ClassFileLocator.php +++ b/library/Zend/File/ClassFileLocator.php @@ -32,6 +32,7 @@ class ClassFileLocator extends FilterIterator * instance. * * @param string|DirectoryIterator $dirOrIterator + * @throws Exception\InvalidArgumentException */ public function __construct($dirOrIterator = '.') { diff --git a/library/Zend/File/Transfer/Adapter/Http.php b/library/Zend/File/Transfer/Adapter/Http.php index 67befc1cc34..d389cd92929 100644 --- a/library/Zend/File/Transfer/Adapter/Http.php +++ b/library/Zend/File/Transfer/Adapter/Http.php @@ -30,6 +30,7 @@ class Http extends AbstractAdapter * Constructor for Http File Transfers * * @param array $options OPTIONAL Options to set + * @throws Exception\PhpEnvironmentException if file uploads are not allowed */ public function __construct($options = array()) { diff --git a/library/Zend/File/Transfer/Transfer.php b/library/Zend/File/Transfer/Transfer.php index e75239c195d..89907c32e28 100644 --- a/library/Zend/File/Transfer/Transfer.php +++ b/library/Zend/File/Transfer/Transfer.php @@ -91,6 +91,7 @@ public function getAdapter($direction = null) * * @param string $method Method to call * @param array $options Options for this method + * @throws Exception\BadMethodCallException if unknown method * @return mixed */ public function __call($method, array $options) diff --git a/library/Zend/Filter/Boolean.php b/library/Zend/Filter/Boolean.php index 0462b9c6629..9b61ca1a03c 100644 --- a/library/Zend/Filter/Boolean.php +++ b/library/Zend/Filter/Boolean.php @@ -162,6 +162,7 @@ public function getCasting() /** * @param array|Traversable $translations + * @throws Exception\InvalidArgumentException * @return Boolean */ public function setTranslations($translations) diff --git a/library/Zend/Filter/Compress.php b/library/Zend/Filter/Compress.php index 2de28e4bd06..3f7e4f1e2ac 100644 --- a/library/Zend/Filter/Compress.php +++ b/library/Zend/Filter/Compress.php @@ -54,6 +54,7 @@ public function __construct($options = null) * Set filter setate * * @param array $options + * @throws Exception\InvalidArgumentException if options is not an array or Traversable * @return Compress */ public function setOptions($options) @@ -81,8 +82,9 @@ public function setOptions($options) /** * Returns the current adapter, instantiating it if necessary * - * @return string + * @throws Exception\RuntimeException * @throws Exception\InvalidArgumentException + * @return Compress\CompressionAlgorithmInterface */ public function getAdapter() { diff --git a/library/Zend/Filter/Compress/Bz2.php b/library/Zend/Filter/Compress/Bz2.php index fa63801ad86..4d98190013c 100644 --- a/library/Zend/Filter/Compress/Bz2.php +++ b/library/Zend/Filter/Compress/Bz2.php @@ -38,6 +38,7 @@ class Bz2 extends AbstractCompressionAlgorithm * Class constructor * * @param null|array|\Traversable $options (Optional) Options to set + * @throws Exception\ExtensionNotLoadedException if bz2 extension not loaded */ public function __construct($options = null) { diff --git a/library/Zend/Filter/Compress/Gz.php b/library/Zend/Filter/Compress/Gz.php index ea006852eb2..123cab56d09 100644 --- a/library/Zend/Filter/Compress/Gz.php +++ b/library/Zend/Filter/Compress/Gz.php @@ -40,6 +40,7 @@ class Gz extends AbstractCompressionAlgorithm * Class constructor * * @param null|array|\Traversable $options (Optional) Options to set + * @throws Exception\ExtensionNotLoadedException if zlib extension not loaded */ public function __construct($options = null) { @@ -63,6 +64,7 @@ public function getLevel() * Sets a new compression level * * @param integer $level + * @throws Exception\InvalidArgumentException * @return Gz */ public function setLevel($level) diff --git a/library/Zend/Filter/Compress/Rar.php b/library/Zend/Filter/Compress/Rar.php index 8de2d4b8501..a3f42d99834 100644 --- a/library/Zend/Filter/Compress/Rar.php +++ b/library/Zend/Filter/Compress/Rar.php @@ -42,6 +42,7 @@ class Rar extends AbstractCompressionAlgorithm * Class constructor * * @param array $options (Optional) Options to set + * @throws Exception\ExtensionNotLoadedException if rar extension not loaded */ public function __construct($options = null) { diff --git a/library/Zend/Filter/Compress/Tar.php b/library/Zend/Filter/Compress/Tar.php index d5701ea2009..baa704915c1 100644 --- a/library/Zend/Filter/Compress/Tar.php +++ b/library/Zend/Filter/Compress/Tar.php @@ -42,6 +42,7 @@ class Tar extends AbstractCompressionAlgorithm * Class constructor * * @param array $options (Optional) Options to set + * @throws Exception\ExtensionNotLoadedException if Archive_Tar component not available */ public function __construct($options = null) { diff --git a/library/Zend/Filter/Compress/Zip.php b/library/Zend/Filter/Compress/Zip.php index fe1bc2da590..3ea706ab854 100644 --- a/library/Zend/Filter/Compress/Zip.php +++ b/library/Zend/Filter/Compress/Zip.php @@ -40,6 +40,7 @@ class Zip extends AbstractCompressionAlgorithm * Class constructor * * @param null|array|\Traversable $options (Optional) Options to set + * @throws Exception\ExtensionNotLoadedException if zip extension not loaded */ public function __construct($options = null) { @@ -87,6 +88,7 @@ public function getTarget() * Sets the target to use * * @param string $target + * @throws Exception\InvalidArgumentException * @return Zip */ public function setTarget($target) diff --git a/library/Zend/Filter/Encrypt.php b/library/Zend/Filter/Encrypt.php index 6a0af26215b..48800ea1755 100644 --- a/library/Zend/Filter/Encrypt.php +++ b/library/Zend/Filter/Encrypt.php @@ -55,6 +55,7 @@ public function getAdapter() * * @param string|array $options (Optional) Encryption options * @return Encrypt + * @throws Exception\DomainException * @throws Exception\InvalidArgumentException */ public function setAdapter($options = null) diff --git a/library/Zend/Filter/Encrypt/BlockCipher.php b/library/Zend/Filter/Encrypt/BlockCipher.php index 8b10e7918b1..63993695443 100644 --- a/library/Zend/Filter/Encrypt/BlockCipher.php +++ b/library/Zend/Filter/Encrypt/BlockCipher.php @@ -214,6 +214,7 @@ public function setCompression($compression) * Encrypts $value with the defined settings * * @param string $value The content to encrypt + * @throws Exception\InvalidArgumentException * @return string The encrypted content */ public function encrypt($value) diff --git a/library/Zend/Filter/FilterChain.php b/library/Zend/Filter/FilterChain.php index e9a0ac1656b..506e7c89936 100644 --- a/library/Zend/Filter/FilterChain.php +++ b/library/Zend/Filter/FilterChain.php @@ -141,6 +141,7 @@ public function plugin($name, array $options = array()) * * @param callable|FilterInterface $callback A Filter implementation or valid PHP callback * @param int $priority Priority at which to enqueue filter; defaults to 1000 (higher executes earlier) + * @throws Exception\InvalidArgumentException * @return FilterChain */ public function attach($callback, $priority = self::DEFAULT_PRIORITY) diff --git a/library/Zend/Filter/Inflector.php b/library/Zend/Filter/Inflector.php index bf39b7b991b..0005de3fcb1 100644 --- a/library/Zend/Filter/Inflector.php +++ b/library/Zend/Filter/Inflector.php @@ -407,6 +407,7 @@ public function setStaticRuleReference($name, &$reference) * Inflect * * @param string|array $source + * @throws Exception\RuntimeException * @return string */ public function filter($source) diff --git a/library/Zend/Form/Annotation/AnnotationBuilder.php b/library/Zend/Form/Annotation/AnnotationBuilder.php index b88581df42f..849b603d432 100644 --- a/library/Zend/Form/Annotation/AnnotationBuilder.php +++ b/library/Zend/Form/Annotation/AnnotationBuilder.php @@ -180,6 +180,7 @@ public function getEventManager() * specifications for a form, its elements, and its input filter. * * @param string|object $entity Either an instance or a valid class name for an entity + * @throws Exception\InvalidArgumentException if $entity is not an object or class name * @return ArrayObject */ public function getFormSpecification($entity) diff --git a/library/Zend/Form/Element/Captcha.php b/library/Zend/Form/Element/Captcha.php index f8951dd2728..b22506cc3d1 100644 --- a/library/Zend/Form/Element/Captcha.php +++ b/library/Zend/Form/Element/Captcha.php @@ -50,6 +50,7 @@ public function setOptions($options) * Set captcha * * @param array|ZendCaptcha\AdapterInterface $captcha + * @throws Exception\InvalidArgumentException * @return Captcha */ public function setCaptcha($captcha) diff --git a/library/Zend/Form/View/Helper/Captcha/AbstractWord.php b/library/Zend/Form/View/Helper/Captcha/AbstractWord.php index 9f36be9f0dc..376cb672164 100644 --- a/library/Zend/Form/View/Helper/Captcha/AbstractWord.php +++ b/library/Zend/Form/View/Helper/Captcha/AbstractWord.php @@ -44,8 +44,9 @@ abstract class AbstractWord extends FormInput /** * Set value for captchaPosition * - * @param mixed captchaPosition - * @return $this + * @param mixed $captchaPosition + * @throws Exception\InvalidArgumentException + * @return self */ public function setCaptchaPosition($captchaPosition) { @@ -105,6 +106,7 @@ public function getSeparator() * More specific renderers will consume this and render it. * * @param ElementInterface $element + * @throws Exception\DomainException * @return string */ protected function renderCaptchaInputs(ElementInterface $element) diff --git a/library/Zend/Form/View/Helper/Captcha/Dumb.php b/library/Zend/Form/View/Helper/Captcha/Dumb.php index e1aa52a6e7d..ead7f6496da 100644 --- a/library/Zend/Form/View/Helper/Captcha/Dumb.php +++ b/library/Zend/Form/View/Helper/Captcha/Dumb.php @@ -25,6 +25,7 @@ class Dumb extends AbstractWord * Render the captcha * * @param ElementInterface $element + * @throws Exception\DomainException * @return string */ public function render(ElementInterface $element) diff --git a/library/Zend/Form/View/Helper/Captcha/Figlet.php b/library/Zend/Form/View/Helper/Captcha/Figlet.php index e9d7ecb22d0..8f2519da8c8 100644 --- a/library/Zend/Form/View/Helper/Captcha/Figlet.php +++ b/library/Zend/Form/View/Helper/Captcha/Figlet.php @@ -25,6 +25,7 @@ class Figlet extends AbstractWord * Render the captcha * * @param ElementInterface $element + * @throws Exception\DomainException * @return string */ public function render(ElementInterface $element) diff --git a/library/Zend/Form/View/Helper/Captcha/Image.php b/library/Zend/Form/View/Helper/Captcha/Image.php index 2913baa0227..1ccc5a1a379 100644 --- a/library/Zend/Form/View/Helper/Captcha/Image.php +++ b/library/Zend/Form/View/Helper/Captcha/Image.php @@ -25,6 +25,7 @@ class Image extends AbstractWord * Render the captcha * * @param ElementInterface $element + * @throws Exception\DomainException * @return string */ public function render(ElementInterface $element) diff --git a/library/Zend/Form/View/Helper/Captcha/ReCaptcha.php b/library/Zend/Form/View/Helper/Captcha/ReCaptcha.php index 9b99e03e525..f4c3f9ad911 100644 --- a/library/Zend/Form/View/Helper/Captcha/ReCaptcha.php +++ b/library/Zend/Form/View/Helper/Captcha/ReCaptcha.php @@ -27,6 +27,7 @@ class ReCaptcha extends FormInput * Render ReCaptcha form elements * * @param ElementInterface $element + * @throws Exception\DomainException * @return string */ public function render(ElementInterface $element) diff --git a/library/Zend/Form/View/Helper/FormButton.php b/library/Zend/Form/View/Helper/FormButton.php index 100a9136102..d9035cddaf3 100644 --- a/library/Zend/Form/View/Helper/FormButton.php +++ b/library/Zend/Form/View/Helper/FormButton.php @@ -54,6 +54,8 @@ class FormButton extends FormInput * Generate an opening button tag * * @param null|array|ElementInterface $attributesOrElement + * @throws Exception\InvalidArgumentException + * @throws Exception\DomainException * @return string */ public function openTag($attributesOrElement = null) @@ -111,6 +113,7 @@ public function closeTag() * * @param ElementInterface $element * @param null|string $buttonContent + * @throws Exception\DomainException * @return string */ public function render(ElementInterface $element, $buttonContent = null) diff --git a/library/Zend/Form/View/Helper/FormCheckbox.php b/library/Zend/Form/View/Helper/FormCheckbox.php index 89377bc9368..d00dec9f988 100644 --- a/library/Zend/Form/View/Helper/FormCheckbox.php +++ b/library/Zend/Form/View/Helper/FormCheckbox.php @@ -26,7 +26,8 @@ class FormCheckbox extends FormInput * Render a form element from the provided $element * * @param ElementInterface $element - * @throws \Zend\Form\Exception\DomainException + * @throws Exception\InvalidArgumentException + * @throws Exception\DomainException * @return string */ public function render(ElementInterface $element) diff --git a/library/Zend/Form/View/Helper/FormElementErrors.php b/library/Zend/Form/View/Helper/FormElementErrors.php index 18818fe316f..e4e265a1d9c 100644 --- a/library/Zend/Form/View/Helper/FormElementErrors.php +++ b/library/Zend/Form/View/Helper/FormElementErrors.php @@ -127,6 +127,7 @@ public function getAttributes() * * @param ElementInterface $element * @param array $attributes + * @throws Exception\DomainException * @return string */ public function render(ElementInterface $element, array $attributes = array()) diff --git a/library/Zend/Form/View/Helper/FormImage.php b/library/Zend/Form/View/Helper/FormImage.php index 9eb00d128ba..45da05faeb0 100644 --- a/library/Zend/Form/View/Helper/FormImage.php +++ b/library/Zend/Form/View/Helper/FormImage.php @@ -47,6 +47,7 @@ class FormImage extends FormInput * Render a form element from the provided $element * * @param ElementInterface $element + * @throws Exception\DomainException * @return string */ public function render(ElementInterface $element) diff --git a/library/Zend/Form/View/Helper/FormInput.php b/library/Zend/Form/View/Helper/FormInput.php index bbf0904bb36..edef72f4fd7 100644 --- a/library/Zend/Form/View/Helper/FormInput.php +++ b/library/Zend/Form/View/Helper/FormInput.php @@ -94,6 +94,7 @@ class FormInput extends AbstractHelper * Render a form element from the provided $element * * @param ElementInterface $element + * @throws Exception\DomainException * @return string */ public function render(ElementInterface $element) diff --git a/library/Zend/Form/View/Helper/FormLabel.php b/library/Zend/Form/View/Helper/FormLabel.php index efa21b18391..34c9b0d86b8 100644 --- a/library/Zend/Form/View/Helper/FormLabel.php +++ b/library/Zend/Form/View/Helper/FormLabel.php @@ -39,6 +39,8 @@ class FormLabel extends AbstractHelper * Generate an opening label tag * * @param null|array|ElementInterface $attributesOrElement + * @throws Exception\InvalidArgumentException + * @throws Exception\DomainException * @return string */ public function openTag($attributesOrElement = null) @@ -98,6 +100,7 @@ public function closeTag() * @param ElementInterface $element * @param null|string $labelContent * @param string $position + * @throws Exception\DomainException * @return string|FormLabel */ public function __invoke(ElementInterface $element = null, $labelContent = null, $position = null) diff --git a/library/Zend/Form/View/Helper/FormMultiCheckbox.php b/library/Zend/Form/View/Helper/FormMultiCheckbox.php index 25a5c44a70a..b85bea6a700 100644 --- a/library/Zend/Form/View/Helper/FormMultiCheckbox.php +++ b/library/Zend/Form/View/Helper/FormMultiCheckbox.php @@ -63,7 +63,8 @@ class FormMultiCheckbox extends FormInput /** * Set value for labelPosition * - * @param mixed labelPosition + * @param mixed $labelPosition + * @throws Exception\InvalidArgumentException * @return $this */ public function setLabelPosition($labelPosition) @@ -187,6 +188,8 @@ public function setUncheckedValue($value) * Render a form element from the provided $element * * @param ElementInterface $element + * @throws Exception\InvalidArgumentException + * @throws Exception\DomainException * @return string */ public function render(ElementInterface $element) diff --git a/library/Zend/Form/View/Helper/FormReset.php b/library/Zend/Form/View/Helper/FormReset.php index 9433f3c4994..1394dd85642 100644 --- a/library/Zend/Form/View/Helper/FormReset.php +++ b/library/Zend/Form/View/Helper/FormReset.php @@ -49,6 +49,7 @@ protected function getType(ElementInterface $element) * Render a form element from the provided $element * * @param ElementInterface $element + * @throws Exception\DomainException * @return string */ public function render(ElementInterface $element) diff --git a/library/Zend/Form/View/Helper/FormSelect.php b/library/Zend/Form/View/Helper/FormSelect.php index 15314649526..907d7cec188 100644 --- a/library/Zend/Form/View/Helper/FormSelect.php +++ b/library/Zend/Form/View/Helper/FormSelect.php @@ -57,6 +57,8 @@ class FormSelect extends AbstractHelper * Render a form element from the provided $element * * @param ElementInterface $element + * @throws Exception\DomainException * @return string */ public function render(ElementInterface $element) diff --git a/library/Zend/Form/View/Helper/FormTextarea.php b/library/Zend/Form/View/Helper/FormTextarea.php index 1381fabcfc3..30ebd5296bc 100644 --- a/library/Zend/Form/View/Helper/FormTextarea.php +++ b/library/Zend/Form/View/Helper/FormTextarea.php @@ -44,6 +44,7 @@ class FormTextarea extends AbstractHelper * Render a form