Skip to content
Permalink
Browse files

Fix all phpDocs @throws FQN

  • Loading branch information...
Dominik Schmelz
Dominik Schmelz committed Apr 16, 2018
1 parent d52144c commit 86194c5d22698ab57cc7278049131b2a9542a648
Showing with 99 additions and 54 deletions.
  1. +1 −1 src/Cache/Cache.php
  2. +1 −0 src/Console/ConsoleIo.php
  3. +1 −0 src/Console/Shell.php
  4. +1 −0 src/Controller/Component.php
  5. +1 −0 src/Controller/Component/AuthComponent.php
  6. +1 −0 src/Controller/Component/CsrfComponent.php
  7. +3 −3 src/Controller/Controller.php
  8. +3 −0 src/Core/ObjectRegistry.php
  9. +1 −1 src/Core/Retry/CommandRetry.php
  10. +15 −10 src/Database/Connection.php
  11. +2 −1 src/Database/Query.php
  12. +2 −1 src/Database/Schema/Collection.php
  13. +1 −2 src/Datasource/ConnectionManager.php
  14. +1 −1 src/Datasource/FactoryLocator.php
  15. +3 −2 src/Error/BaseErrorHandler.php
  16. +2 −1 src/Error/Middleware/ErrorHandlerMiddleware.php
  17. +1 −0 src/Http/ActionDispatcher.php
  18. +1 −1 src/Http/Client/Auth/Oauth.php
  19. +2 −0 src/Http/Client/CookieCollection.php
  20. +3 −0 src/Http/Cookie/CookieCollection.php
  21. +1 −0 src/Http/Middleware/CsrfProtectionMiddleware.php
  22. +3 −3 src/Http/ServerRequest.php
  23. +2 −2 src/I18n/Formatter/IcuFormatter.php
  24. +1 −0 src/I18n/I18n.php
  25. +8 −0 src/I18n/functions.php
  26. +1 −0 src/Log/Log.php
  27. +2 −1 src/Mailer/Email.php
  28. +1 −2 src/ORM/Association/BelongsToMany.php
  29. +1 −1 src/ORM/Association/Loader/SelectLoader.php
  30. +1 −1 src/ORM/AssociationCollection.php
  31. +2 −0 src/ORM/Behavior.php
  32. +7 −3 src/ORM/Table.php
  33. +1 −0 src/Routing/Filter/ControllerFactoryFilter.php
  34. +1 −1 src/Routing/Router.php
  35. +1 −0 src/Shell/CompletionShell.php
  36. +3 −1 src/TestSuite/Fixture/FixtureManager.php
  37. +8 −8 src/TestSuite/IntegrationTestCase.php
  38. +1 −0 src/Utility/Security.php
  39. +1 −0 src/Validation/Validator.php
  40. +3 −3 src/View/Helper/BreadcrumbsHelper.php
  41. +1 −1 src/View/Helper/TimeHelper.php
  42. +1 −2 src/View/HelperRegistry.php
  43. +1 −0 src/View/View.php
  44. +1 −1 src/View/Widget/WidgetLocator.php
@@ -154,7 +154,7 @@ public static function registry(ObjectRegistry $registry = null)
*
* @param string $name Name of the config array that needs an engine instance built
* @return void
* @throws \InvalidArgumentException When a cache engine cannot be created.
* @throws \Exception
*/
protected static function _buildEngine($name)
{
@@ -512,6 +512,7 @@ public function setLoggers($enable)
* @param string $name The name of the helper to render
* @param array $settings Configuration data for the helper.
* @return \Cake\Console\Helper The created helper instance.
* @throws \Exception
*/
public function helper($name, array $settings = [])
{
@@ -603,6 +603,7 @@ public function getOptionParser()
*
* @param string $name The task to get.
* @return \Cake\Console\Shell Object of Task
* @throws \Exception
*/
public function __get($name)
{
@@ -162,6 +162,7 @@ public function initialize(array $config)
*
* @param string $name Name of component to get.
* @return mixed A Component object or null.
* @throws \Exception
*/
public function __get($name)
{
@@ -285,6 +285,7 @@ public function startup(Event $event)
*
* @param \Cake\Event\Event $event Event instance.
* @return \Cake\Http\Response|null
* @throws \ReflectionException
*/
public function authCheck(Event $event)
{
@@ -127,6 +127,7 @@ public function implementedEvents()
* @param \Cake\Http\ServerRequest $request The request object.
* @param \Cake\Http\Response $response The response object.
* @return array An array of the modified request, response.
* @throws \Exception
*/
protected function _setCookie(ServerRequest $request, Response $response)
{
@@ -323,6 +323,7 @@ public function components($components = null)
* @param string $name The name of the component to load.
* @param array $config The config for the component.
* @return \Cake\Controller\Component
* @throws \Exception
*/
public function loadComponent($name, array $config = [])
{
@@ -571,8 +572,7 @@ public function setResponse(Response $response)
* exists and isn't private.
*
* @return mixed The resulting response.
* @throws \LogicException When request is not set.
* @throws \Cake\Controller\Exception\MissingActionException When actions are not defined or inaccessible.
* @throws \ReflectionException
*/
public function invokeAction()
{
@@ -881,7 +881,7 @@ public function paginate($object = null, array $settings = [])
*
* @param string $action The action to check.
* @return bool Whether or not the method is accessible from a URL.
* @throws ReflectionException
* @throws \ReflectionException
*/
public function isAction($action)
{
@@ -256,6 +256,7 @@ public function __set($name, $object)
*
* @param string $name Name of a property to unset.
* @return void
* @throws \Exception
*/
public function __unset($name)
{
@@ -295,6 +296,7 @@ public function normalizeArray($objects)
* If the registry subclass has an event manager, the objects will be detached from events as well.
*
* @return $this
* @throws \Exception
*/
public function reset()
{
@@ -314,6 +316,7 @@ public function reset()
* @param string $objectName The name of the object to set in the registry.
* @param object $object instance to store in the registry
* @return $this
* @throws \Exception
*/
public function set($objectName, $object)
{
@@ -56,7 +56,7 @@ public function __construct(RetryStrategyInterface $strategy, $retries = 1)
*
* @param callable $action The callable action to execute with a retry strategy
* @return mixed The return value of the passed action callable
* @throws Exception
* @throws \Exception
*/
public function run(callable $action)
{
@@ -268,7 +268,7 @@ public function isConnected()
*
* @param string|\Cake\Database\Query $sql The SQL to convert into a prepared statement.
* @return \Cake\Database\StatementInterface
* @throws Exception
* @throws \Exception
*/
public function prepare($sql)
{
@@ -291,7 +291,7 @@ public function prepare($sql)
* @param array $params list or associative array of params to be interpolated in $query as values
* @param array $types list or associative array of types to be used for casting values in query
* @return \Cake\Database\StatementInterface executed statement
* @throws Exception
* @throws \Exception
*/
public function execute($query, array $params = [], array $types = [])
{
@@ -327,7 +327,7 @@ public function compileQuery(Query $query, ValueBinder $generator)
*
* @param \Cake\Database\Query $query The query to be executed
* @return \Cake\Database\StatementInterface executed statement
* @throws Exception
* @throws \Exception
*/
public function run(Query $query)
{
@@ -345,7 +345,7 @@ public function run(Query $query)
*
* @param string $sql The SQL query to execute.
* @return \Cake\Database\StatementInterface
* @throws Exception
* @throws \Exception
*/
public function query($sql)
{
@@ -425,7 +425,7 @@ public function schemaCollection(SchemaCollection $collection = null)
* @param array $data values to be inserted
* @param array $types list of associative array containing the types to be used for casting
* @return \Cake\Database\StatementInterface
* @throws Exception
* @throws \Exception
*/
public function insert($table, array $data, array $types = [])
{
@@ -447,7 +447,7 @@ public function insert($table, array $data, array $types = [])
* @param array $conditions conditions to be set for update statement
* @param array $types list of associative array containing the types to be used for casting
* @return \Cake\Database\StatementInterface
* @throws Exception
* @throws \Exception
*/
public function update($table, array $data, array $conditions = [], $types = [])
{
@@ -466,7 +466,7 @@ public function update($table, array $data, array $conditions = [], $types = [])
* @param array $conditions conditions to be set for delete statement
* @param array $types list of associative array containing the types to be used for casting
* @return \Cake\Database\StatementInterface
* @throws Exception
* @throws \Exception
*/
public function delete($table, $conditions = [], $types = [])
{
@@ -481,7 +481,7 @@ public function delete($table, $conditions = [], $types = [])
* Starts a new transaction.
*
* @return void
* @throws Exception
* @throws \Exception
*/
public function begin()
{
@@ -511,6 +511,7 @@ public function begin()
* Commits current transaction.
*
* @return bool true on success, false otherwise
* @throws \Exception
*/
public function commit()
{
@@ -548,6 +549,7 @@ public function commit()
* @param bool|null $toBeginning Whether or not the transaction should be rolled back to the
* beginning of it. Defaults to false if using savepoints, or true if not.
* @return bool
* @throws \Exception
*/
public function rollback($toBeginning = null)
{
@@ -652,6 +654,7 @@ public function useSavePoints($enable = null)
*
* @param string $name The save point name.
* @return void
* @throws \Exception
*/
public function createSavePoint($name)
{
@@ -663,6 +666,7 @@ public function createSavePoint($name)
*
* @param string $name The save point name.
* @return void
* @throws \Exception
*/
public function releaseSavePoint($name)
{
@@ -674,6 +678,7 @@ public function releaseSavePoint($name)
*
* @param string $name The save point name.
* @return void
* @throws \Exception
*/
public function rollbackSavepoint($name)
{
@@ -684,7 +689,7 @@ public function rollbackSavepoint($name)
* Run driver specific SQL to disable foreign key checks.
*
* @return void
* @throws Exception
* @throws \Exception
*/
public function disableForeignKeys()
{
@@ -697,7 +702,7 @@ public function disableForeignKeys()
* Run driver specific SQL to enable foreign key checks.
*
* @return void
* @throws Exception
* @throws \Exception
*/
public function enableForeignKeys()
{
@@ -213,6 +213,7 @@ public function connection($connection = null)
* around query execution.
*
* @return \Cake\Database\StatementInterface
* @throws \Exception
*/
public function execute()
{
@@ -1857,7 +1858,7 @@ public function getIterator()
*
* @param string $name name of the clause to be returned
* @return mixed
* @throws InvalidArgumentException When the named clause does not exist.
* @throws \InvalidArgumentException When the named clause does not exist.
*/
public function clause($name)
{
@@ -56,6 +56,7 @@ public function __construct(Connection $connection)
* Get the list of tables available in the current connection.
*
* @return array The list of tables in the connected database/schema.
* @throws \Exception
*/
public function listTables()
{
@@ -114,7 +115,7 @@ public function describe($name, array $options = [])
* @param array $config The config data.
* @param \Cake\Database\Schema\TableSchema $schema The table instance
* @return void
* @throws \Cake\Database\Exception on query failure.
* @throws \Exception
*/
protected function _reflect($stage, $name, $config, $schema)
{
@@ -184,8 +184,7 @@ public static function dropAlias($name)
* @param string $name The connection name.
* @param bool $useAliases Set to false to not use aliased connections.
* @return \Cake\Datasource\ConnectionInterface A connection object.
* @throws \Cake\Datasource\Exception\MissingDatasourceConfigException When config
* data is missing.
* @throws \Exception
*/
public static function get($name, $useAliases = true)
{
@@ -57,7 +57,7 @@ public static function drop($type)
* Get the factory for the specified repository type.
*
* @param string $type The repository type to get the factory for.
* @throws InvalidArgumentException If the specified repository type has no factory.
* @throws \InvalidArgumentException If the specified repository type has no factory.
* @return callable The factory for the repository type.
*/
public static function get($type)
@@ -122,6 +122,7 @@ public function register()
* @param int|null $line Line that triggered the error
* @param array|null $context Context
* @return bool True if error was handled
* @throws \Exception
*/
public function handleError($code, $description, $file = null, $line = null, $context = null)
{
@@ -162,7 +163,7 @@ public function handleError($code, $description, $file = null, $line = null, $co
*
* @param \Exception|\Error $exception The exception to handle
* @return void
* @throws Exception
* @throws \Exception
*/
public function wrapAndHandleException($exception)
{
@@ -211,7 +212,7 @@ protected function _stop($code)
* @param string $file File on which error occurred
* @param int $line Line that triggered the error
* @return bool
* @throws Exception
* @throws \Exception
*/
public function handleFatalError($code, $description, $file, $line)
{
@@ -91,6 +91,7 @@ public function __construct($exceptionRenderer = null, array $config = [])
* @param \Psr\Http\Message\ResponseInterface $response The response.
* @param callable $next Callback to invoke the next middleware.
* @return \Psr\Http\Message\ResponseInterface A response
* @throws \Exception
*/
public function __invoke($request, $response, $next)
{
@@ -110,7 +111,7 @@ public function __invoke($request, $response, $next)
* @param \Psr\Http\Message\ServerRequestInterface $request The request.
* @param \Psr\Http\Message\ResponseInterface $response The response.
* @return \Psr\Http\Message\ResponseInterface A response
* @throws Exception
* @throws \Exception
*/
public function handleException($exception, $request, $response)
{
@@ -69,6 +69,7 @@ public function __construct($factory = null, $eventManager = null, array $filter
* @param \Cake\Http\ServerRequest $request The request to dispatch.
* @param \Cake\Http\Response $response The response to dispatch.
* @return \Cake\Http\Response A modified/replaced response.
* @throws \ReflectionException
*/
public function dispatch(ServerRequest $request, Response $response)
{
@@ -164,7 +164,7 @@ protected function _hmacSha1($request, $credentials)
* @param array $credentials Authentication credentials.
* @return string
*
* @throws \RuntimeException
* @throws \Exception
*/
protected function _rsaSha1($request, $credentials)
{
@@ -46,6 +46,7 @@ public function __construct(array $cookies = [])
* @param Response $response The response to read cookies from
* @param string $url The request URL used for default host/path values.
* @return void
* @throws \Exception
*/
public function store(Response $response, $url)
{
@@ -70,6 +71,7 @@ public function store(Response $response, $url)
*
* @param string $url The URL to find cookies for.
* @return array
* @throws \Exception
*/
public function get($url)
{
@@ -57,6 +57,7 @@ public function __construct(array $cookies = [])
*
* @param array $header The array of set-cookie header values.
* @return static
* @throws \Exception
*/
public static function createFromHeader(array $header)
{
@@ -211,6 +212,7 @@ public function getIterator()
* @param array $extraCookies Associative array of additional cookies to add into the request. This
* is useful when you have cookie data from outside the collection you want to send.
* @return \Psr\Http\Message\RequestInterface An updated request.
* @throws \Exception
*/
public function addToRequest(RequestInterface $request, array $extraCookies = [])
{
@@ -288,6 +290,7 @@ protected function findMatchingCookies($scheme, $host, $path)
* @param \Psr\Http\Message\ResponseInterface $response Response to extract cookies from.
* @param \Psr\Http\Message\RequestInterface $request Request to get cookie context from.
* @return static
* @throws \Exception
*/
public function addFromResponse(ResponseInterface $response, RequestInterface $request)
{
@@ -130,6 +130,7 @@ protected function _validateAndUnsetTokenField(ServerRequest $request)
* Create a new token to be used for CSRF protection
*
* @return string
* @throws \Exception
*/
protected function _createToken()
{
Oops, something went wrong.

0 comments on commit 86194c5

Please sign in to comment.
You can’t perform that action at this time.