Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing @throws annotations #140

Merged
merged 2 commits into from
Nov 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions packages/zend-amf/library/Zend/Amf/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ public function isProduction()
/**
* @param namespace of all incoming sessions defaults to Zend_Amf
* @return Zend_Amf_Server
* @throws Zend_Session_Exception
*/
public function setSession($namespace = 'Zend_Amf')
{
Expand All @@ -235,7 +236,9 @@ public function isSession()
*
* @param string|object $object Object or class being accessed
* @param string $function Function or method being accessed
* @return unknown_type
* @return bool
* @throws Zend_Acl_Exception
* @throws Zend_Amf_Server_Exception
*/
protected function _checkAcl($object, $function)
{
Expand Down Expand Up @@ -296,9 +299,11 @@ protected function getLoader()
* the result
*
* @param string $method Is the method to execute
* @param mixed $param values for the method
* @param mixed $params values for the method
* @return mixed $response the result of executing the method
* @throws Zend_Acl_Exception
* @throws Zend_Amf_Server_Exception
* @throws Zend_Server_Reflection_Exception
*/
protected function _dispatch($method, $params = null, $source = null)
{
Expand Down Expand Up @@ -384,6 +389,8 @@ protected function _dispatch($method, $params = null, $source = null)
* @see Zend_Amf_Value_Messaging_CommandMessage
* @param Zend_Amf_Value_Messaging_CommandMessage $message
* @return Zend_Amf_Value_Messaging_AcknowledgeMessage
* @throws Zend_Amf_Server_Exception
* @throws Zend_Session_Exception
*/
protected function _loadCommandMessage(Zend_Amf_Value_Messaging_CommandMessage $message)
{
Expand Down Expand Up @@ -460,6 +467,8 @@ protected function _errorMessage($objectEncoding, $message, $description, $detai
* @param string $userid
* @param string $password
* @return boolean
* @throws Zend_Amf_Server_Exception
* @throws Zend_Session_Exception
*/
protected function _handleAuth( $userid, $password)
{
Expand Down Expand Up @@ -490,8 +499,8 @@ protected function _handleAuth( $userid, $password)
* @todo should implement and SPL observer pattern for custom AMF headers
* @todo DescribeService support
* @param Zend_Amf_Request $request
* @return Zend_Amf_Response
* @throws Zend_Amf_server_Exception|Exception
* @return void
* @throws Zend_Amf_Server_Exception
*/
protected function _handle(Zend_Amf_Request $request)
{
Expand Down Expand Up @@ -638,6 +647,7 @@ protected function _handle(Zend_Amf_Request $request)
*
* @param null|Zend_Amf_Request $request Optional
* @return Zend_Amf_Response
* @throws Zend_Amf_Server_Exception
*/
public function handle($request = null)
{
Expand Down Expand Up @@ -675,6 +685,7 @@ public function handle($request = null)
*
* @param string|Zend_Amf_Request $request
* @return Zend_Amf_Server
* @throws Zend_Amf_Server_Exception
*/
public function setRequest($request)
{
Expand All @@ -696,6 +707,7 @@ public function setRequest($request)
* Return currently registered request object
*
* @return null|Zend_Amf_Request
* @throws Zend_Amf_Server_Exception
*/
public function getRequest()
{
Expand All @@ -712,6 +724,7 @@ public function getRequest()
*
* @param string|Zend_Amf_Server_Response $response
* @return Zend_Amf_Server
* @throws Zend_Amf_Server_Exception
*/
public function setResponse($response)
{
Expand All @@ -733,6 +746,7 @@ public function setResponse($response)
* get a reference to the Zend_Amf_response instance
*
* @return Zend_Amf_Server_Response
* @throws Zend_Amf_Server_Exception
*/
public function getResponse()
{
Expand All @@ -757,6 +771,7 @@ public function getResponse()
* @param mixed $arg Optional arguments to pass to a method
* @return Zend_Amf_Server
* @throws Zend_Amf_Server_Exception on invalid input
* @throws Zend_Server_Reflection_Exception
*/
public function setClass($class, $namespace = '', $argv = null)
{
Expand Down Expand Up @@ -798,6 +813,7 @@ public function setClass($class, $namespace = '', $argv = null)
* @param string $namespace Optional namespace prefix
* @return Zend_Amf_Server
* @throws Zend_Amf_Server_Exception
* @throws Zend_Server_Reflection_Exception
*/
public function addFunction($function, $namespace = '')
{
Expand Down Expand Up @@ -830,6 +846,7 @@ public function addFunction($function, $namespace = '')
* TODO: add support for prefixes?
*
* @param string $dir
* @throws Zend_Loader_PluginLoader_Exception
*/
public function addDirectory($dir)
{
Expand All @@ -853,6 +870,7 @@ public function getDirectory()
* Zend_Server_Reflection_Function_Abstract pairs
*
* @return void
* @throws Zend_Amf_Server_Exception
*/
protected function _buildDispatchTable()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ public function init()
* @return Zend_Translate
* @throws Zend_Application_Resource_Exception if registry key was used
* already but is no instance of Zend_Translate
* @throws Zend_Exception
* @throws Zend_Log_Exception
* @throws Zend_Translate_Exception
*/
public function getTranslate()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class Zend_Cloud_QueueService_Adapter_ZendQueue
*
* @param array|Zend_Config $options
* @return void
* @throws Zend_Cloud_QueueService_Exception
*/
public function __construct ($options = array())
{
Expand Down Expand Up @@ -96,6 +97,7 @@ public function __construct ($options = array())
* @param string $name
* @param array $options
* @return string Queue ID (typically URL)
* @throws Zend_Cloud_QueueService_Exception
*/
public function createQueue($name, $options = null)
{
Expand All @@ -113,6 +115,7 @@ public function createQueue($name, $options = null)
* @param string $queueId
* @param array $options
* @return boolean true if successful, false otherwise
* @throws Zend_Cloud_QueueService_Exception
*/
public function deleteQueue($queueId, $options = null)
{
Expand All @@ -134,6 +137,7 @@ public function deleteQueue($queueId, $options = null)
*
* @param array $options
* @return array Queue IDs
* @throws Zend_Cloud_QueueService_Exception
*/
public function listQueues($options = null)
{
Expand All @@ -149,7 +153,8 @@ public function listQueues($options = null)
*
* @param string $queueId
* @param array $options
* @return array
* @return array|false
* @throws Zend_Cloud_QueueService_Exception
*/
public function fetchQueueMetadata($queueId, $options = null)
{
Expand All @@ -172,6 +177,7 @@ public function fetchQueueMetadata($queueId, $options = null)
* @param array $metadata
* @param array $options
* @return void
* @throws Zend_Cloud_QueueService_Exception
*/
public function storeQueueMetadata($queueId, $metadata, $options = null)
{
Expand All @@ -192,6 +198,7 @@ public function storeQueueMetadata($queueId, $metadata, $options = null)
* @param string $message
* @param array $options
* @return string Message ID
* @throws Zend_Cloud_QueueService_Exception
*/
public function sendMessage($queueId, $message, $options = null)
{
Expand All @@ -213,6 +220,7 @@ public function sendMessage($queueId, $message, $options = null)
* @param int $max
* @param array $options
* @return array
* @throws Zend_Cloud_QueueService_Exception
*/
public function receiveMessages($queueId, $max = 1, $options = null)
{
Expand Down Expand Up @@ -256,6 +264,7 @@ protected function _makeMessages($messages)
* @param Zend_Cloud_QueueService_Message $message Message ID or message
* @param array $options
* @return void
* @throws Zend_Cloud_QueueService_Exception
*/
public function deleteMessage($queueId, $message, $options = null)
{
Expand Down Expand Up @@ -283,6 +292,7 @@ public function deleteMessage($queueId, $message, $options = null)
* @param int $num How many messages
* @param array $options
* @return Zend_Cloud_QueueService_Message[]
* @throws Zend_Cloud_OperationNotAvailableException
*/
public function peekMessages($queueId, $num = 1, $options = null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class Zend_Controller_Plugin_Broker extends Zend_Controller_Plugin_Abstract
* @param Zend_Controller_Plugin_Abstract $plugin
* @param int $stackIndex
* @return Zend_Controller_Plugin_Broker
* @throws Zend_Controller_Exception
*/
public function registerPlugin(Zend_Controller_Plugin_Abstract $plugin, $stackIndex = null)
{
Expand Down Expand Up @@ -90,6 +91,7 @@ public function registerPlugin(Zend_Controller_Plugin_Abstract $plugin, $stackIn
*
* @param string|Zend_Controller_Plugin_Abstract $plugin Plugin object or class name
* @return Zend_Controller_Plugin_Broker
* @throws Zend_Controller_Exception
*/
public function unregisterPlugin($plugin)
{
Expand Down Expand Up @@ -229,6 +231,7 @@ public function getResponse()
*
* @param Zend_Controller_Request_Abstract $request
* @return void
* @throws Zend_Controller_Exception
*/
public function routeStartup(Zend_Controller_Request_Abstract $request)
{
Expand All @@ -252,6 +255,7 @@ public function routeStartup(Zend_Controller_Request_Abstract $request)
*
* @param Zend_Controller_Request_Abstract $request
* @return void
* @throws Zend_Controller_Exception
*/
public function routeShutdown(Zend_Controller_Request_Abstract $request)
{
Expand Down Expand Up @@ -279,6 +283,7 @@ public function routeShutdown(Zend_Controller_Request_Abstract $request)
*
* @param Zend_Controller_Request_Abstract $request
* @return void
* @throws Zend_Controller_Exception
*/
public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request)
{
Expand All @@ -301,6 +306,7 @@ public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request)
*
* @param Zend_Controller_Request_Abstract $request
* @return void
* @throws Zend_Controller_Exception
*/
public function preDispatch(Zend_Controller_Request_Abstract $request)
{
Expand All @@ -325,6 +331,7 @@ public function preDispatch(Zend_Controller_Request_Abstract $request)
*
* @param Zend_Controller_Request_Abstract $request
* @return void
* @throws Zend_Controller_Exception
*/
public function postDispatch(Zend_Controller_Request_Abstract $request)
{
Expand All @@ -347,6 +354,7 @@ public function postDispatch(Zend_Controller_Request_Abstract $request)
*
* @param Zend_Controller_Request_Abstract $request
* @return void
* @throws Zend_Controller_Exception
*/
public function dispatchLoopShutdown()
{
Expand Down
11 changes: 11 additions & 0 deletions packages/zend-db/library/Zend/Db/Adapter/Pdo/Ibm.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ public function _connect()
* Creates a PDO DSN for the adapter from $this->_config settings.
*
* @return string
* @throws Zend_Db_Adapter_Exception
*/
protected function _dsn()
{
Expand Down Expand Up @@ -189,6 +190,7 @@ protected function _checkRequiredOptions(array $config)
* @param string $sql The SQL statement with placeholders.
* @param array $bind An array of data to bind to the placeholders.
* @return PDOStatement
* @throws Zend_Db_Adapter_Exception
*/
public function prepare($sql)
{
Expand All @@ -203,6 +205,7 @@ public function prepare($sql)
* Returns a list of the tables in the database.
*
* @return array
* @throws Zend_Db_Adapter_Exception
*/
public function listTables()
{
Expand Down Expand Up @@ -238,6 +241,7 @@ public function listTables()
* @param string $tableName
* @param string $schemaName OPTIONAL
* @return array
* @throws Zend_Db_Adapter_Exception
*/
public function describeTable($tableName, $schemaName = null)
{
Expand All @@ -253,6 +257,7 @@ public function describeTable($tableName, $schemaName = null)
* @param mixed $table The table to insert data into.
* @param array $bind Column-value pairs.
* @return int The number of affected rows.
* @throws Zend_Db_Adapter_Exception
*/
public function insert($table, array $bind)
{
Expand All @@ -276,6 +281,7 @@ public function insert($table, array $bind)
* @param integer $count
* @param integer $offset OPTIONAL
* @return string
* @throws Zend_Db_Adapter_Exception
*/
public function limit($sql, $count, $offset = 0)
{
Expand All @@ -290,6 +296,7 @@ public function limit($sql, $count, $offset = 0)
* @param string $tableName OPTIONAL
* @param string $primaryKey OPTIONAL
* @return integer
* @throws Zend_Db_Adapter_Exception
*/
public function lastInsertId($tableName = null, $primaryKey = null)
{
Expand All @@ -314,6 +321,7 @@ public function lastInsertId($tableName = null, $primaryKey = null)
*
* @param string $sequenceName
* @return integer
* @throws Zend_Db_Adapter_Exception
*/
public function lastSequenceId($sequenceName)
{
Expand All @@ -327,6 +335,7 @@ public function lastSequenceId($sequenceName)
*
* @param string $sequenceName
* @return integer
* @throws Zend_Db_Adapter_Exception
*/
public function nextSequenceId($sequenceName)
{
Expand All @@ -338,6 +347,8 @@ public function nextSequenceId($sequenceName)
* Retrieve server version in PHP style
* Pdo_Idm doesn't support getAttribute(PDO::ATTR_SERVER_VERSION)
* @return string
* @throws Zend_Db_Adapter_Exception
* @throws Zend_Db_Statement_Exception
*/
public function getServerVersion()
{
Expand Down
1 change: 1 addition & 0 deletions packages/zend-dojo/library/Zend/Dojo/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,7 @@ public function count()
* @param array|object $item
* @param string|int|null $id
* @return array
* @throws Zend_Dojo_Exception
*/
protected function _normalizeItem($item, $id)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class Zend_Dojo_View_Helper_CustomDijit extends Zend_Dojo_View_Helper_DijitConta
* @param array $params
* @param array $attribs
* @return string|Zend_Dojo_View_Helper_CustomDijit
* @throws Zend_Dojo_View_Exception
*/
public function customDijit($id = null, $value = null, array $params = array(), array $attribs = array())
{
Expand Down Expand Up @@ -90,6 +91,7 @@ public function customDijit($id = null, $value = null, array $params = array(),
* @param array $params
* @param array $attribs
* @return void
* @throws Zend_Dojo_View_Exception
*/
public function captureStart($id, array $params = array(), array $attribs = array())
{
Expand Down
Loading