From ef8cedff9a5e543bcffe9bae0742819db037266e Mon Sep 17 00:00:00 2001 From: Jose Lorenzo Rodriguez Date: Sat, 30 Aug 2014 11:12:55 +0200 Subject: [PATCH] Core\Error -> Core\Exception --- src/Auth/BaseAuthorize.php | 4 ++-- src/Auth/ControllerAuthorize.php | 4 ++-- src/Cache/Cache.php | 10 +++++----- src/Cache/CacheRegistry.php | 6 +++--- src/Cache/Engine/FileEngine.php | 6 +++--- src/Cache/Engine/MemcachedEngine.php | 10 +++++----- src/Console/Error/ConsoleException.php | 2 +- src/Console/Error/MissingShellException.php | 2 +- src/Console/Error/MissingShellMethodException.php | 2 +- src/Console/Error/MissingTaskException.php | 2 +- src/Console/ShellDispatcher.php | 4 ++-- src/Controller/Component/AuthComponent.php | 6 +++--- .../Component/RequestHandlerComponent.php | 4 ++-- src/Controller/Controller.php | 4 ++-- src/Controller/Error/MissingActionException.php | 2 +- src/Controller/Error/MissingComponentException.php | 2 +- .../Error/MissingControllerException.php | 2 +- src/Controller/Error/PrivateActionException.php | 2 +- src/Core/Configure.php | 4 ++-- src/Core/Configure/Engine/IniConfig.php | 4 ++-- src/Core/Configure/Engine/PhpConfig.php | 4 ++-- src/Core/{Error => Exception}/Exception.php | 2 +- .../MissingPluginException.php | 4 ++-- src/Core/InstanceConfigTrait.php | 8 ++++---- src/Core/ObjectRegistry.php | 2 +- src/Core/Plugin.php | 14 +++++++------- src/Core/StaticConfigTrait.php | 4 ++-- src/Database/Error/MissingConnectionException.php | 2 +- src/Database/Error/MissingDriverException.php | 4 ++-- src/Database/Error/MissingExtensionException.php | 4 ++-- src/Database/Exception.php | 2 +- src/Database/Type/BinaryType.php | 4 ++-- src/Database/Type/FloatType.php | 2 +- src/Database/Type/IntegerType.php | 2 +- src/Datasource/ConnectionManager.php | 2 +- .../Error/MissingDatasourceConfigException.php | 2 +- .../Error/MissingDatasourceException.php | 2 +- src/Error/Debugger.php | 4 ++-- src/Error/ExceptionRenderer.php | 6 +++--- src/Error/FatalErrorException.php | 2 +- src/Error/HttpException.php | 2 +- src/Log/Engine/ConsoleLog.php | 4 ++-- src/Log/Log.php | 6 +++--- src/Log/LogEngineRegistry.php | 6 +++--- src/Model/Error/MissingModelException.php | 2 +- src/Model/ModelAwareTrait.php | 4 ++-- src/Network/Email/Email.php | 8 ++++---- src/Network/Error/SocketException.php | 2 +- src/Network/Http/Adapter/Stream.php | 6 +++--- src/Network/Http/Auth/Oauth.php | 6 +++--- src/Network/Http/Client.php | 6 +++--- src/Network/Http/Request.php | 4 ++-- src/Network/Request.php | 4 ++-- src/Network/Response.php | 8 ++++---- src/ORM/Behavior.php | 4 ++-- src/ORM/BehaviorRegistry.php | 8 ++++---- src/ORM/Error/MissingBehaviorException.php | 2 +- src/ORM/Error/MissingEntityException.php | 2 +- src/ORM/Error/MissingTableClassException.php | 2 +- src/ORM/Table.php | 6 +++--- src/Routing/Dispatcher.php | 4 ++-- src/Routing/DispatcherFilter.php | 4 ++-- .../Error/MissingDispatcherFilterException.php | 2 +- src/Routing/Error/MissingRouteException.php | 2 +- src/Routing/Filter/LocaleSelectorFilter.php | 2 +- src/Routing/RouteBuilder.php | 6 +++--- src/Routing/Router.php | 4 ++-- src/Shell/Task/TestTask.php | 4 ++-- src/TestSuite/Fixture/FixtureManager.php | 4 ++-- src/TestSuite/Fixture/TestFixture.php | 6 +++--- src/Utility/Error/XmlException.php | 2 +- src/Utility/Number.php | 4 ++-- src/Utility/Security.php | 10 +++++----- src/Validation/Validation.php | 4 ++-- src/View/Error/MissingCellException.php | 2 +- src/View/Error/MissingCellViewException.php | 2 +- src/View/Error/MissingElementException.php | 2 +- src/View/Error/MissingHelperException.php | 2 +- src/View/Error/MissingLayoutException.php | 2 +- src/View/Error/MissingViewException.php | 2 +- src/View/Helper/FormHelper.php | 4 ++-- src/View/Helper/NumberHelper.php | 4 ++-- src/View/Helper/TextHelper.php | 4 ++-- src/View/View.php | 10 +++++----- src/View/ViewBlock.php | 4 ++-- tests/TestCase/Auth/ControllerAuthorizeTest.php | 2 +- tests/TestCase/Cache/CacheTest.php | 14 +++++++------- .../TestCase/Cache/Engine/MemcachedEngineTest.php | 10 +++++----- tests/TestCase/Console/ConsoleErrorHandlerTest.php | 2 +- .../Controller/Component/AuthComponentTest.php | 4 ++-- .../Component/RequestHandlerComponentTest.php | 2 +- .../Core/Configure/Engine/IniConfigTest.php | 6 +++--- .../Core/Configure/Engine/PhpConfigTest.php | 8 ++++---- tests/TestCase/Core/ConfigureTest.php | 2 +- tests/TestCase/Core/PluginTest.php | 6 +++--- tests/TestCase/Database/Type/BinaryTypeTest.php | 2 +- .../TestCase/Datasource/ConnectionManagerTest.php | 6 +++--- tests/TestCase/Error/DebuggerTest.php | 2 +- tests/TestCase/Error/ExceptionRendererTest.php | 4 ++-- tests/TestCase/Log/LogTest.php | 10 +++++----- tests/TestCase/Network/Email/EmailTest.php | 10 +++++----- tests/TestCase/Network/Http/Auth/OauthTest.php | 2 +- tests/TestCase/Network/Http/ClientTest.php | 4 ++-- tests/TestCase/Network/Http/RequestTest.php | 2 +- tests/TestCase/Network/RequestTest.php | 2 +- tests/TestCase/Network/ResponseTest.php | 4 ++-- tests/TestCase/ORM/BehaviorRegistryTest.php | 12 ++++++------ tests/TestCase/ORM/BehaviorTest.php | 4 ++-- tests/TestCase/ORM/TableTest.php | 6 +++--- tests/TestCase/Routing/DispatcherFilterTest.php | 2 +- tests/TestCase/Routing/RouteBuilderTest.php | 4 ++-- tests/TestCase/Routing/RouterTest.php | 2 +- tests/TestCase/Utility/NumberTest.php | 2 +- tests/TestCase/Utility/SecurityTest.php | 10 +++++----- tests/TestCase/Utility/XmlTest.php | 2 +- tests/TestCase/Validation/ValidationTest.php | 2 +- tests/TestCase/View/Helper/FormHelperTest.php | 2 +- tests/TestCase/View/StringTemplateTest.php | 2 +- tests/TestCase/View/ViewTest.php | 8 ++++---- 119 files changed, 254 insertions(+), 254 deletions(-) rename src/Core/{Error => Exception}/Exception.php (98%) rename src/Core/{Error => Exception}/MissingPluginException.php (91%) diff --git a/src/Auth/BaseAuthorize.php b/src/Auth/BaseAuthorize.php index 62605e216dc..f6d2494b0df 100644 --- a/src/Auth/BaseAuthorize.php +++ b/src/Auth/BaseAuthorize.php @@ -16,7 +16,7 @@ use Cake\Controller\ComponentRegistry; use Cake\Controller\Controller; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Core\InstanceConfigTrait; use Cake\Network\Request; use Cake\Utility\Inflector; @@ -94,7 +94,7 @@ abstract public function authorize($user, Request $request); * * @param Controller $controller null to get, a controller to set. * @return mixed - * @throws \Cake\Core\Error\Exception + * @throws \Cake\Core\Exception\Exception */ public function controller(Controller $controller = null) { if ($controller) { diff --git a/src/Auth/ControllerAuthorize.php b/src/Auth/ControllerAuthorize.php index 86d7673ba4b..73ef925fa33 100644 --- a/src/Auth/ControllerAuthorize.php +++ b/src/Auth/ControllerAuthorize.php @@ -15,7 +15,7 @@ namespace Cake\Auth; use Cake\Controller\Controller; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Network\Request; /** @@ -43,7 +43,7 @@ class ControllerAuthorize extends BaseAuthorize { * * @param Controller $controller null to get, a controller to set. * @return mixed - * @throws \Cake\Core\Error\Exception + * @throws \Cake\Core\Exception\Exception */ public function controller(Controller $controller = null) { if ($controller) { diff --git a/src/Cache/Cache.php b/src/Cache/Cache.php index 5b3234967e4..1c3de5aad4b 100644 --- a/src/Cache/Cache.php +++ b/src/Cache/Cache.php @@ -15,7 +15,7 @@ namespace Cake\Cache; use Cake\Cache\Engine\NullEngine; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Core\StaticConfigTrait; /** @@ -61,7 +61,7 @@ * @param string $name Name of the configuration * @param array $config Optional associative array of settings passed to the engine * @return array [engine, settings] on success, false on failure - * @throws \Cake\Core\Error\Exception + * @throws \Cake\Core\Exception\Exception */ class Cache { @@ -100,7 +100,7 @@ class Cache { * * @param string $name Name of the config array that needs an engine instance built * @return void - * @throws \Cake\Core\Error\Exception When a cache engine cannot be created. + * @throws \Cake\Core\Exception\Exception When a cache engine cannot be created. */ protected static function _buildEngine($name) { if (empty(static::$_registry)) { @@ -213,7 +213,7 @@ public static function write($key, $value, $config = 'default') { * @param array $data An array of data to be stored in the cache * @param string $config Optional string configuration name to write to. Defaults to 'default' * @return array of bools for each key provided, indicating true for success or false for fail - * @throws Cake\Core\Error\Exception + * @throws Cake\Core\Exception\Exception */ public static function writeMany($data, $config = 'default') { $engine = static::engine($config); @@ -394,7 +394,7 @@ public static function clearGroup($group, $config = 'default') { * * @param string $group group name or null to retrieve all group mappings * @return array map of group and all configuration that has the same group - * @throws \Cake\Core\Error\Exception + * @throws \Cake\Core\Exception\Exception */ public static function groupConfigs($group = null) { if ($group === null) { diff --git a/src/Cache/CacheRegistry.php b/src/Cache/CacheRegistry.php index d396c41604b..4b3f3fbd812 100644 --- a/src/Cache/CacheRegistry.php +++ b/src/Cache/CacheRegistry.php @@ -15,7 +15,7 @@ namespace Cake\Cache; use Cake\Core\App; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Core\ObjectRegistry; /** @@ -48,7 +48,7 @@ protected function _resolveClassName($class) { * @param string $class The classname that is missing. * @param string $plugin The plugin the cache is missing in. * @return void - * @throws \Cake\Core\Error\Exception + * @throws \Cake\Core\Exception\Exception */ protected function _throwMissingClassError($class, $plugin) { throw new Exception(sprintf('Cache engine %s is not available.', $class)); @@ -63,7 +63,7 @@ protected function _throwMissingClassError($class, $plugin) { * @param string $alias The alias of the object. * @param array $config An array of settings to use for the cache engine. * @return CacheEngine The constructed CacheEngine class. - * @throws \Cake\Core\Error\Exception when an object doesn't implement + * @throws \Cake\Core\Exception\Exception when an object doesn't implement * the correct interface. */ protected function _create($class, $alias, $config) { diff --git a/src/Cache/Engine/FileEngine.php b/src/Cache/Engine/FileEngine.php index 268ab72e079..c5413252469 100644 --- a/src/Cache/Engine/FileEngine.php +++ b/src/Cache/Engine/FileEngine.php @@ -16,7 +16,7 @@ use Cake\Cache\CacheEngine; use Cake\Core\Configure; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Utility\Inflector; /** @@ -320,7 +320,7 @@ protected function _clearDirectory($path, $now, $threshold) { * @param string $key The key to decrement * @param int $offset The number to offset * @return void - * @throws \Cake\Core\Error\Exception + * @throws \Cake\Core\Exception\Exception */ public function decrement($key, $offset = 1) { throw new Exception('Files cannot be atomically decremented.'); @@ -332,7 +332,7 @@ public function decrement($key, $offset = 1) { * @param string $key The key to decrement * @param int $offset The number to offset * @return void - * @throws \Cake\Core\Error\Exception + * @throws \Cake\Core\Exception\Exception */ public function increment($key, $offset = 1) { throw new Exception('Files cannot be atomically incremented.'); diff --git a/src/Cache/Engine/MemcachedEngine.php b/src/Cache/Engine/MemcachedEngine.php index d765bbe0fa8..5ae5ad9c836 100644 --- a/src/Cache/Engine/MemcachedEngine.php +++ b/src/Cache/Engine/MemcachedEngine.php @@ -15,7 +15,7 @@ namespace Cake\Cache\Engine; use Cake\Cache\CacheEngine; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Utility\Inflector; use \Memcached; @@ -94,7 +94,7 @@ class MemcachedEngine extends CacheEngine { * * @param array $config array of setting for the engine * @return bool True if the engine has been successfully initialized, false if not - * @throws \Cake\Core\Error\Exception when you try use authentication without Memcached compiled with SASL support + * @throws \Cake\Core\Exception\Exception when you try use authentication without Memcached compiled with SASL support */ public function init(array $config = []) { if (!class_exists('Memcached')) { @@ -166,7 +166,7 @@ public function init(array $config = []) { * Settings the memcached instance * * @return void - * @throws \Cake\Core\Error\Exception when the Memcached extension is not built with the desired serializer engine + * @throws \Cake\Core\Exception\Exception when the Memcached extension is not built with the desired serializer engine */ protected function _setOptions() { $this->_Memcached->setOption(Memcached::OPT_LIBKETAMA_COMPATIBLE, true); @@ -303,7 +303,7 @@ public function readMany($keys) { * @param string $key Identifier for the data * @param int $offset How much to increment * @return bool|int New incremented value, false otherwise - * @throws \Cake\Core\Error\Exception when you try to increment with compress = true + * @throws \Cake\Core\Exception\Exception when you try to increment with compress = true */ public function increment($key, $offset = 1) { $key = $this->_key($key); @@ -317,7 +317,7 @@ public function increment($key, $offset = 1) { * @param string $key Identifier for the data * @param int $offset How much to subtract * @return bool|int New decremented value, false otherwise - * @throws \Cake\Core\Error\Exception when you try to decrement with compress = true + * @throws \Cake\Core\Exception\Exception when you try to decrement with compress = true */ public function decrement($key, $offset = 1) { $key = $this->_key($key); diff --git a/src/Console/Error/ConsoleException.php b/src/Console/Error/ConsoleException.php index c8dee49459e..d97a8e2882c 100644 --- a/src/Console/Error/ConsoleException.php +++ b/src/Console/Error/ConsoleException.php @@ -13,7 +13,7 @@ */ namespace Cake\Console\Error; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; /** * Exception class for Console libraries. This exception will be thrown from Console library diff --git a/src/Console/Error/MissingShellException.php b/src/Console/Error/MissingShellException.php index 43d417d7e89..a157af0c96e 100644 --- a/src/Console/Error/MissingShellException.php +++ b/src/Console/Error/MissingShellException.php @@ -13,7 +13,7 @@ */ namespace Cake\Console\Error; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; /** * Used when a shell cannot be found. diff --git a/src/Console/Error/MissingShellMethodException.php b/src/Console/Error/MissingShellMethodException.php index d0722e8b1b1..380139e0a1e 100644 --- a/src/Console/Error/MissingShellMethodException.php +++ b/src/Console/Error/MissingShellMethodException.php @@ -13,7 +13,7 @@ */ namespace Cake\Console\Error; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; /** * Used when a shell method cannot be found. diff --git a/src/Console/Error/MissingTaskException.php b/src/Console/Error/MissingTaskException.php index 01e9270b9d4..abd39d8364e 100644 --- a/src/Console/Error/MissingTaskException.php +++ b/src/Console/Error/MissingTaskException.php @@ -13,7 +13,7 @@ */ namespace Cake\Console\Error; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; /** * Used when a Task cannot be found. diff --git a/src/Console/ShellDispatcher.php b/src/Console/ShellDispatcher.php index 538f38c518e..6c3294892f7 100644 --- a/src/Console/ShellDispatcher.php +++ b/src/Console/ShellDispatcher.php @@ -16,7 +16,7 @@ use Cake\Core\App; use Cake\Core\Configure; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Utility\Inflector; /** @@ -100,7 +100,7 @@ public static function run($argv) { * Defines current working environment. * * @return void - * @throws \Cake\Core\Error\Exception + * @throws \Cake\Core\Exception\Exception */ protected function _initEnvironment() { if (!$this->_bootstrap()) { diff --git a/src/Controller/Component/AuthComponent.php b/src/Controller/Component/AuthComponent.php index c22ae4cda14..41e6f619b53 100644 --- a/src/Controller/Component/AuthComponent.php +++ b/src/Controller/Component/AuthComponent.php @@ -19,7 +19,7 @@ use Cake\Controller\Controller; use Cake\Core\App; use Cake\Core\Configure; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Error; use Cake\Error\Debugger; use Cake\Event\Event; @@ -484,7 +484,7 @@ public function isAuthorized($user = null, Request $request = null) { * Loads the authorization objects configured. * * @return mixed Either null when authorize is empty, or the loaded authorization objects. - * @throws \Cake\Core\Error\Exception + * @throws \Cake\Core\Exception\Exception */ public function constructAuthorize() { if (empty($this->_config['authorize'])) { @@ -742,7 +742,7 @@ public function identify() { * Loads the configured authentication objects. * * @return mixed either null on empty authenticate value, or an array of loaded objects. - * @throws \Cake\Core\Error\Exception + * @throws \Cake\Core\Exception\Exception */ public function constructAuthenticate() { if (empty($this->_config['authenticate'])) { diff --git a/src/Controller/Component/RequestHandlerComponent.php b/src/Controller/Component/RequestHandlerComponent.php index 41e25a8de53..d0dd94902d3 100644 --- a/src/Controller/Component/RequestHandlerComponent.php +++ b/src/Controller/Component/RequestHandlerComponent.php @@ -19,7 +19,7 @@ use Cake\Controller\Controller; use Cake\Core\App; use Cake\Core\Configure; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Event\Event; use Cake\Network\Response; use Cake\Routing\Router; @@ -636,7 +636,7 @@ public function mapAlias($alias) { * be the handling callback, all other arguments should be additional parameters * for the handler. * @return void - * @throws \Cake\Core\Error\Exception + * @throws \Cake\Core\Exception\Exception */ public function addInputType($type, $handler) { if (!is_array($handler) || !isset($handler[0]) || !is_callable($handler[0])) { diff --git a/src/Controller/Controller.php b/src/Controller/Controller.php index c148b080755..cb27785b40f 100644 --- a/src/Controller/Controller.php +++ b/src/Controller/Controller.php @@ -14,7 +14,7 @@ */ namespace Cake\Controller; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Event\Event; use Cake\Event\EventListener; use Cake\Event\EventManagerTrait; @@ -350,7 +350,7 @@ public function setRequest(Request $request) { * exists and isn't private. * * @return mixed The resulting response. - * @throws \Cake\Core\Error\Exception When request is not set. + * @throws \Cake\Core\Exception\Exception When request is not set. * @throws \Cake\Controller\Error\PrivateActionException When actions are not public or prefixed by _ * @throws \Cake\Controller\Error\MissingActionException When actions are not defined. */ diff --git a/src/Controller/Error/MissingActionException.php b/src/Controller/Error/MissingActionException.php index c21a685790b..48139ac20ea 100644 --- a/src/Controller/Error/MissingActionException.php +++ b/src/Controller/Error/MissingActionException.php @@ -13,7 +13,7 @@ */ namespace Cake\Controller\Error; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; /** * Missing Action exception - used when a controller action diff --git a/src/Controller/Error/MissingComponentException.php b/src/Controller/Error/MissingComponentException.php index e7992b90347..9018e0333ef 100644 --- a/src/Controller/Error/MissingComponentException.php +++ b/src/Controller/Error/MissingComponentException.php @@ -13,7 +13,7 @@ */ namespace Cake\Controller\Error; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; /** * Used when a component cannot be found. diff --git a/src/Controller/Error/MissingControllerException.php b/src/Controller/Error/MissingControllerException.php index db0f13a4168..71a8980c70f 100644 --- a/src/Controller/Error/MissingControllerException.php +++ b/src/Controller/Error/MissingControllerException.php @@ -13,7 +13,7 @@ */ namespace Cake\Controller\Error; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; /** * Missing Controller exception - used when a controller diff --git a/src/Controller/Error/PrivateActionException.php b/src/Controller/Error/PrivateActionException.php index 12fb5e94d02..9f6fed10904 100644 --- a/src/Controller/Error/PrivateActionException.php +++ b/src/Controller/Error/PrivateActionException.php @@ -15,7 +15,7 @@ */ namespace Cake\Controller\Error; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; /** * Private Action exception - used when a controller action diff --git a/src/Core/Configure.php b/src/Core/Configure.php index 19d9076945d..4f65b7ab1bb 100644 --- a/src/Core/Configure.php +++ b/src/Core/Configure.php @@ -17,7 +17,7 @@ use Cake\Cache\Cache; use Cake\Core\Configure\ConfigEngineInterface; use Cake\Core\Configure\Engine\PhpConfig; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Utility\Hash; /** @@ -281,7 +281,7 @@ public static function load($key, $config = 'default', $merge = true) { * @param array $keys The name of the top-level keys you want to dump. * This allows you save only some data stored in Configure. * @return bool success - * @throws \Cake\Core\Error\Exception if the adapter does not implement a `dump` method. + * @throws \Cake\Core\Exception\Exception if the adapter does not implement a `dump` method. */ public static function dump($key, $config = 'default', $keys = []) { $engine = static::_getEngine($config); diff --git a/src/Core/Configure/Engine/IniConfig.php b/src/Core/Configure/Engine/IniConfig.php index e054f88ea15..33fb76afcd2 100644 --- a/src/Core/Configure/Engine/IniConfig.php +++ b/src/Core/Configure/Engine/IniConfig.php @@ -16,7 +16,7 @@ use Cake\Core\Configure\ConfigEngineInterface; use Cake\Core\Plugin; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Utility\Hash; /** @@ -92,7 +92,7 @@ public function __construct($path = null, $section = null) { * @param string $key The identifier to read from. If the key has a . it will be treated * as a plugin prefix. The chosen file must be on the engine's path. * @return array Parsed configuration values. - * @throws \Cake\Core\Error\Exception when files don't exist. + * @throws \Cake\Core\Exception\Exception when files don't exist. * Or when files contain '..' as this could lead to abusive reads. */ public function read($key) { diff --git a/src/Core/Configure/Engine/PhpConfig.php b/src/Core/Configure/Engine/PhpConfig.php index eb41c93b9dd..4f8350c95ba 100644 --- a/src/Core/Configure/Engine/PhpConfig.php +++ b/src/Core/Configure/Engine/PhpConfig.php @@ -15,7 +15,7 @@ namespace Cake\Core\Configure\Engine; use Cake\Core\Configure\ConfigEngineInterface; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Core\Plugin; /** @@ -55,7 +55,7 @@ public function __construct($path = null) { * @param string $key The identifier to read from. If the key has a . it will be treated * as a plugin prefix. * @return array Parsed configuration values. - * @throws \Cake\Core\Error\Exception when files don't exist or they don't contain `$config`. + * @throws \Cake\Core\Exception\Exception when files don't exist or they don't contain `$config`. * Or when files contain '..' as this could lead to abusive reads. */ public function read($key) { diff --git a/src/Core/Error/Exception.php b/src/Core/Exception/Exception.php similarity index 98% rename from src/Core/Error/Exception.php rename to src/Core/Exception/Exception.php index b58344fe629..ec4267a42a2 100644 --- a/src/Core/Error/Exception.php +++ b/src/Core/Exception/Exception.php @@ -11,7 +11,7 @@ * @since 3.0.0 * @license http://www.opensource.org/licenses/mit-license.php MIT License */ -namespace Cake\Core\Error; +namespace Cake\Core\Exception; /** * Base class that all CakePHP Exceptions extend. diff --git a/src/Core/Error/MissingPluginException.php b/src/Core/Exception/MissingPluginException.php similarity index 91% rename from src/Core/Error/MissingPluginException.php rename to src/Core/Exception/MissingPluginException.php index a1eb6825e8d..0d42a45d558 100644 --- a/src/Core/Error/MissingPluginException.php +++ b/src/Core/Exception/MissingPluginException.php @@ -11,9 +11,9 @@ * @since 3.0.0 * @license http://www.opensource.org/licenses/mit-license.php MIT License */ -namespace Cake\Core\Error; +namespace Cake\Core\Exception; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; /** * Exception raised when a plugin could not be found diff --git a/src/Core/InstanceConfigTrait.php b/src/Core/InstanceConfigTrait.php index d07ceadb3d1..72091b09730 100644 --- a/src/Core/InstanceConfigTrait.php +++ b/src/Core/InstanceConfigTrait.php @@ -14,7 +14,7 @@ */ namespace Cake\Core; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Utility\Hash; /** @@ -69,7 +69,7 @@ trait InstanceConfigTrait { * @param mixed|null $value The value to set. * @param bool $merge Whether to merge or overwrite existing config, defaults to true. * @return mixed Config value being read, or the object itself on write operations. - * @throws \Cake\Core\Error\Exception When trying to set a key that is invalid. + * @throws \Cake\Core\Exception\Exception When trying to set a key that is invalid. */ public function config($key = null, $value = null, $merge = true) { if (!$this->_configInitialized) { @@ -122,7 +122,7 @@ protected function _configRead($key) { * @param mixed $value Value to write. * @param bool $merge Whether to merge or overwrite value. * @return void - * @throws Cake\Core\Error\Exception if attempting to clobber existing config + * @throws Cake\Core\Exception\Exception if attempting to clobber existing config */ protected function _configWrite($key, $value, $merge = false) { if (is_string($key) && $value === null) { @@ -174,7 +174,7 @@ protected function _configWrite($key, $value, $merge = false) { * * @param string $key Key to delete. * @return void - * @throws Cake\Core\Error\Exception if attempting to clobber existing config + * @throws Cake\Core\Exception\Exception if attempting to clobber existing config */ protected function _configDelete($key) { if (strpos($key, '.') === false) { diff --git a/src/Core/ObjectRegistry.php b/src/Core/ObjectRegistry.php index d4bcc610271..b1cf2e0a5d3 100644 --- a/src/Core/ObjectRegistry.php +++ b/src/Core/ObjectRegistry.php @@ -95,7 +95,7 @@ abstract protected function _resolveClassName($class); * @param string $class The class that is missing. * @param string $plugin The plugin $class is missing from. * @return void - * @throws \Cake\Core\Error\Exception + * @throws \Cake\Core\Exception\Exception */ abstract protected function _throwMissingClassError($class, $plugin); diff --git a/src/Core/Plugin.php b/src/Core/Plugin.php index 2fffd69f87f..40edbee6d46 100644 --- a/src/Core/Plugin.php +++ b/src/Core/Plugin.php @@ -105,7 +105,7 @@ class Plugin { * * @param string|array $plugin name of the plugin to be loaded in CamelCase format or array or plugins to load * @param array $config configuration options for the plugin - * @throws \Cake\Core\Error\MissingPluginException if the folder for the plugin to be loaded is not found + * @throws \Cake\Core\Exception\MissingPluginException if the folder for the plugin to be loaded is not found * @return void */ public static function load($plugin, array $config = []) { @@ -137,7 +137,7 @@ public static function load($plugin, array $config = []) { } if (empty($config['path'])) { - throw new Error\MissingPluginException(['plugin' => $plugin]); + throw new Exception\MissingPluginException(['plugin' => $plugin]); } $config['classPath'] = $config['path'] . $config['classBase'] . DS; @@ -219,11 +219,11 @@ public static function loadAll(array $options = []) { * * @param string $plugin name of the plugin in CamelCase format * @return string path to the plugin folder - * @throws \Cake\Core\Error\MissingPluginException if the folder for plugin was not found or plugin has not been loaded + * @throws \Cake\Core\Exception\MissingPluginException if the folder for plugin was not found or plugin has not been loaded */ public static function path($plugin) { if (empty(static::$_plugins[$plugin])) { - throw new Error\MissingPluginException(['plugin' => $plugin]); + throw new Exception\MissingPluginException(['plugin' => $plugin]); } return static::$_plugins[$plugin]['path']; } @@ -233,11 +233,11 @@ public static function path($plugin) { * * @param string $plugin name of the plugin in CamelCase format. * @return string Path to the plugin folder container class folders. - * @throws \Cake\Core\Error\MissingPluginException If plugin has not been loaded. + * @throws \Cake\Core\Exception\MissingPluginException If plugin has not been loaded. */ public static function classPath($plugin) { if (empty(static::$_plugins[$plugin])) { - throw new Error\MissingPluginException(['plugin' => $plugin]); + throw new Exception\MissingPluginException(['plugin' => $plugin]); } return static::$_plugins[$plugin]['classPath']; } @@ -247,7 +247,7 @@ public static function classPath($plugin) { * * @param string $plugin name of the plugin in CamelCase format. * @return string Path to the plugin folder container config files. - * @throws \Cake\Core\Error\MissingPluginException If plugin has not been loaded. + * @throws \Cake\Core\Exception\MissingPluginException If plugin has not been loaded. */ public static function configPath($plugin) { if (empty(static::$_plugins[$plugin])) { diff --git a/src/Core/StaticConfigTrait.php b/src/Core/StaticConfigTrait.php index 83f8f3863a9..87860ce3930 100644 --- a/src/Core/StaticConfigTrait.php +++ b/src/Core/StaticConfigTrait.php @@ -14,7 +14,7 @@ */ namespace Cake\Core; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; /** * A trait that provides a set of static methods to manage configuration @@ -65,7 +65,7 @@ trait StaticConfigTrait { * @param string|array $key The name of the configuration, or an array of multiple configs. * @param array $config An array of name => configuration data for adapter. * @return mixed null when adding configuration and an array of configuration data when reading. - * @throws \Cake\Core\Error\Exception When trying to modify an existing config. + * @throws \Cake\Core\Exception\Exception When trying to modify an existing config. */ public static function config($key, $config = null) { // Read config. diff --git a/src/Database/Error/MissingConnectionException.php b/src/Database/Error/MissingConnectionException.php index 6b67ebe2864..70cbadce512 100644 --- a/src/Database/Error/MissingConnectionException.php +++ b/src/Database/Error/MissingConnectionException.php @@ -14,7 +14,7 @@ */ namespace Cake\Database\Error; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; class MissingConnectionException extends Exception { diff --git a/src/Database/Error/MissingDriverException.php b/src/Database/Error/MissingDriverException.php index a8e858188c5..a0f1859f58b 100644 --- a/src/Database/Error/MissingDriverException.php +++ b/src/Database/Error/MissingDriverException.php @@ -14,9 +14,9 @@ */ namespace Cake\Database\Error; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; -class MissingDriverException extends \Cake\Core\Error\Exception { +class MissingDriverException extends \Cake\Core\Exception\Exception { /** * {@inheritDoc} diff --git a/src/Database/Error/MissingExtensionException.php b/src/Database/Error/MissingExtensionException.php index 7ce4044f127..fdfe84f10ee 100644 --- a/src/Database/Error/MissingExtensionException.php +++ b/src/Database/Error/MissingExtensionException.php @@ -14,9 +14,9 @@ */ namespace Cake\Database\Error; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; -class MissingExtensionException extends \Cake\Core\Error\Exception { +class MissingExtensionException extends \Cake\Core\Exception\Exception { /** * {@inheritDoc} diff --git a/src/Database/Exception.php b/src/Database/Exception.php index b04ae071db7..e891d7f202c 100644 --- a/src/Database/Exception.php +++ b/src/Database/Exception.php @@ -17,6 +17,6 @@ /** * Exception for the database package. */ -class Exception extends \Cake\Core\Error\Exception { +class Exception extends \Cake\Core\Exception\Exception { } diff --git a/src/Database/Type/BinaryType.php b/src/Database/Type/BinaryType.php index 6d4f7221a81..3afde97faab 100644 --- a/src/Database/Type/BinaryType.php +++ b/src/Database/Type/BinaryType.php @@ -14,7 +14,7 @@ */ namespace Cake\Database\Type; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Database\Driver; use PDO; @@ -45,7 +45,7 @@ public function toDatabase($value, Driver $driver) { * @param null|string|resource $value The value to convert. * @param Driver $driver The driver instance to convert with. * @return resource - * @throws \Cake\Core\Error\Exception + * @throws \Cake\Core\Exception\Exception */ public function toPHP($value, Driver $driver) { if ($value === null) { diff --git a/src/Database/Type/FloatType.php b/src/Database/Type/FloatType.php index 558bb5ad500..aabb42a33a5 100644 --- a/src/Database/Type/FloatType.php +++ b/src/Database/Type/FloatType.php @@ -45,7 +45,7 @@ public function toDatabase($value, Driver $driver) { * @param null|string|resource $value The value to convert. * @param Driver $driver The driver instance to convert with. * @return resource - * @throws \Cake\Core\Error\Exception + * @throws \Cake\Core\Exception\Exception */ public function toPHP($value, Driver $driver) { if ($value === null) { diff --git a/src/Database/Type/IntegerType.php b/src/Database/Type/IntegerType.php index eee6fb6337b..e1a693c0fbf 100644 --- a/src/Database/Type/IntegerType.php +++ b/src/Database/Type/IntegerType.php @@ -45,7 +45,7 @@ public function toDatabase($value, Driver $driver) { * @param null|string|resource $value The value to convert. * @param Driver $driver The driver instance to convert with. * @return resource - * @throws \Cake\Core\Error\Exception + * @throws \Cake\Core\Exception\Exception */ public function toPHP($value, Driver $driver) { if ($value === null) { diff --git a/src/Datasource/ConnectionManager.php b/src/Datasource/ConnectionManager.php index 155f9acbdad..94e99d0f708 100644 --- a/src/Datasource/ConnectionManager.php +++ b/src/Datasource/ConnectionManager.php @@ -55,7 +55,7 @@ class ConnectionManager { * @param string|array $key The name of the connection config, or an array of multiple configs. * @param array $config An array of name => config data for adapter. * @return mixed null when adding configuration and an array of configuration data when reading. - * @throws \Cake\Core\Error\Exception When trying to modify an existing config. + * @throws \Cake\Core\Exception\Exception When trying to modify an existing config. * @see \Cake\Core\StaticConfigTrait::config() */ public static function config($key, $config = null) { diff --git a/src/Datasource/Error/MissingDatasourceConfigException.php b/src/Datasource/Error/MissingDatasourceConfigException.php index b5ff4dc2273..4ced089ca16 100644 --- a/src/Datasource/Error/MissingDatasourceConfigException.php +++ b/src/Datasource/Error/MissingDatasourceConfigException.php @@ -13,7 +13,7 @@ */ namespace Cake\Datasource\Error; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; /** * Exception class to be thrown when a datasource configuration is not found diff --git a/src/Datasource/Error/MissingDatasourceException.php b/src/Datasource/Error/MissingDatasourceException.php index fa37d9caa7a..4ecee974237 100644 --- a/src/Datasource/Error/MissingDatasourceException.php +++ b/src/Datasource/Error/MissingDatasourceException.php @@ -13,7 +13,7 @@ */ namespace Cake\Datasource\Error; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; /** * Used when a datasource cannot be found. diff --git a/src/Error/Debugger.php b/src/Error/Debugger.php index 7748db37cf7..ac668db0e3b 100644 --- a/src/Error/Debugger.php +++ b/src/Error/Debugger.php @@ -15,7 +15,7 @@ namespace Cake\Error; use Cake\Core\Configure; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Log\Log; use Cake\Utility\Hash; use Cake\Utility\String; @@ -625,7 +625,7 @@ protected static function _object($var, $depth, $indent) { * @param string $format The format you want errors to be output as. * Leave null to get the current format. * @return mixed Returns null when setting. Returns the current format when getting. - * @throws \Cake\Core\Error\Exception when choosing a format that doesn't exist. + * @throws \Cake\Core\Exception\Exception when choosing a format that doesn't exist. */ public static function outputAs($format = null) { $self = Debugger::getInstance(); diff --git a/src/Error/ExceptionRenderer.php b/src/Error/ExceptionRenderer.php index 05efc12890f..23e767b55d7 100644 --- a/src/Error/ExceptionRenderer.php +++ b/src/Error/ExceptionRenderer.php @@ -17,7 +17,7 @@ use Cake\Controller\Controller; use Cake\Controller\ErrorController; use Cake\Core\Configure; -use Cake\Core\Error\MissingPluginException; +use Cake\Core\Exception\MissingPluginException; use Cake\Error; use Cake\Event\Event; use Cake\Network\Request; @@ -53,7 +53,7 @@ class ExceptionRenderer { public $controller = null; /** - * Template to render for Cake\Core\Error\Exception + * Template to render for Cake\Core\Exception\Exception * * @var string */ @@ -75,7 +75,7 @@ class ExceptionRenderer { /** * Creates the controller to perform rendering on the error response. - * If the error is a Cake\Core\Error\Exception it will be converted to either a 400 or a 500 + * If the error is a Cake\Core\Exception\Exception it will be converted to either a 400 or a 500 * code error depending on the code used to construct the error. * * @param \Exception $exception Exception diff --git a/src/Error/FatalErrorException.php b/src/Error/FatalErrorException.php index ad24adc1393..915f01df408 100644 --- a/src/Error/FatalErrorException.php +++ b/src/Error/FatalErrorException.php @@ -13,7 +13,7 @@ */ namespace Cake\Error; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; /** * Represents a fatal error diff --git a/src/Error/HttpException.php b/src/Error/HttpException.php index 453a7dd0c01..3c9613b91f1 100644 --- a/src/Error/HttpException.php +++ b/src/Error/HttpException.php @@ -13,7 +13,7 @@ */ namespace Cake\Error; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; /** * Parent class for all of the HTTP related exceptions in CakePHP. diff --git a/src/Log/Engine/ConsoleLog.php b/src/Log/Engine/ConsoleLog.php index ca82e84bece..9b840c0414b 100644 --- a/src/Log/Engine/ConsoleLog.php +++ b/src/Log/Engine/ConsoleLog.php @@ -15,7 +15,7 @@ namespace Cake\Log\Engine; use Cake\Console\ConsoleOutput; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; /** * Console logging. Writes logs to console output. @@ -52,7 +52,7 @@ class ConsoleLog extends BaseLog { * - `outputAs` integer or ConsoleOutput::[RAW|PLAIN|COLOR] * * @param array $config Options for the FileLog, see above. - * @throws \Cake\Core\Error\Exception + * @throws \Cake\Core\Exception\Exception */ public function __construct(array $config = array()) { if (DS === '\\' && !(bool)env('ANSICON')) { diff --git a/src/Log/Log.php b/src/Log/Log.php index fb416bbc894..64f44b9b648 100644 --- a/src/Log/Log.php +++ b/src/Log/Log.php @@ -14,7 +14,7 @@ namespace Cake\Log; use Cake\Core\StaticConfigTrait; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Log\Engine\BaseLog; /** @@ -246,7 +246,7 @@ public static function levels() { * @param string|array $key The name of the logger config, or an array of multiple configs. * @param array $config An array of name => config data for adapter. * @return mixed null when adding configuration and an array of configuration data when reading. - * @throws \Cake\Core\Error\Exception When trying to modify an existing config. + * @throws \Cake\Core\Exception\Exception When trying to modify an existing config. */ public static function config($key, $config = null) { $return = static::_config($key, $config); @@ -316,7 +316,7 @@ public static function engine($name) { * @param string|array $scope The scope(s) a log message is being created in. * See Cake\Log\Log::config() for more information on logging scopes. * @return bool Success - * @throws \Cake\Core\Error\Exception If invalid level is passed. + * @throws \Cake\Core\Exception\Exception If invalid level is passed. */ public static function write($level, $message, $scope = array()) { static::_init(); diff --git a/src/Log/LogEngineRegistry.php b/src/Log/LogEngineRegistry.php index 0c6716d5f1e..45b0a7f190e 100644 --- a/src/Log/LogEngineRegistry.php +++ b/src/Log/LogEngineRegistry.php @@ -15,7 +15,7 @@ namespace Cake\Log; use Cake\Core\App; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Core\ObjectRegistry; use Cake\Log\LogInterface; @@ -48,7 +48,7 @@ protected function _resolveClassName($class) { * @param string $class The classname that is missing. * @param string $plugin The plugin the logger is missing in. * @return void - * @throws \Cake\Core\Error\Exception + * @throws \Cake\Core\Exception\Exception */ protected function _throwMissingClassError($class, $plugin) { throw new Exception(sprintf('Could not load class %s', $class)); @@ -63,7 +63,7 @@ protected function _throwMissingClassError($class, $plugin) { * @param string $alias The alias of the object. * @param array $settings An array of settings to use for the logger. * @return \Cake\Log\LogInterface The constructed logger class. - * @throws \Cake\Core\Error\Exception when an object doesn't implement + * @throws \Cake\Core\Exception\Exception when an object doesn't implement * the correct interface. */ protected function _create($class, $alias, $settings) { diff --git a/src/Model/Error/MissingModelException.php b/src/Model/Error/MissingModelException.php index 6d2e78f8a8b..bb8dadf3464 100644 --- a/src/Model/Error/MissingModelException.php +++ b/src/Model/Error/MissingModelException.php @@ -14,7 +14,7 @@ */ namespace Cake\Model\Error; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; /** * Used when a model cannot be found. diff --git a/src/Model/ModelAwareTrait.php b/src/Model/ModelAwareTrait.php index dc5050148f7..043efb8c8f8 100644 --- a/src/Model/ModelAwareTrait.php +++ b/src/Model/ModelAwareTrait.php @@ -14,7 +14,7 @@ */ namespace Cake\Model; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; /** * Provides functionality for loading table classes @@ -72,7 +72,7 @@ protected function _setModelClass($name) { * delegates to Cake\ORM\TableRegistry. * @return bool True when single repository found and instance created. * @throws \Cake\Model\Error\MissingModelException If the model class cannot be found. - * @throws \Cake\Core\Error\Exception When using a type that has not been registered. + * @throws \Cake\Core\Exception\Exception When using a type that has not been registered. */ public function loadModel($modelClass = null, $type = 'Table') { if ($modelClass === null) { diff --git a/src/Network/Email/Email.php b/src/Network/Email/Email.php index 83af253a86e..d548f42cc7d 100644 --- a/src/Network/Email/Email.php +++ b/src/Network/Email/Email.php @@ -17,7 +17,7 @@ use Cake\Core\App; use Cake\Core\Configure; use Cake\Core\StaticConfigTrait; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Log\Log; use Cake\Network\Error; use Cake\Network\Http\FormData\Part; @@ -961,7 +961,7 @@ public function transport($name = null) { * * @param string $name The transport configuration name to build. * @return \Cake\Network\Email\AbstractTransport - * @throws \Cake\Core\Error\Exception When transport configuration is missing or invalid. + * @throws \Cake\Core\Exception\Exception When transport configuration is missing or invalid. */ protected function _constructTransport($name) { if (!isset(static::$_transportConfig[$name]['className'])) { @@ -1154,7 +1154,7 @@ public function message($type = null) { * @param array|AbstractTransport $config Either an array of configuration * data, or a transport instance. * @return mixed Either null when setting or an array of data when reading. - * @throws \Cake\Core\Error\Exception When modifying an existing configuration. + * @throws \Cake\Core\Exception\Exception When modifying an existing configuration. */ public static function configTransport($key, $config = null) { if ($config === null && is_string($key)) { @@ -1301,7 +1301,7 @@ public static function deliver($to = null, $subject = null, $message = null, $tr * * @param string|array $config Configuration options. * @return void - * @throws \Cake\Core\Error\Exception When using a configuration that doesn't exist. + * @throws \Cake\Core\Exception\Exception When using a configuration that doesn't exist. */ protected function _applyConfig($config) { if (is_string($config)) { diff --git a/src/Network/Error/SocketException.php b/src/Network/Error/SocketException.php index 75d6fa24f18..e23c5184827 100644 --- a/src/Network/Error/SocketException.php +++ b/src/Network/Error/SocketException.php @@ -13,7 +13,7 @@ */ namespace Cake\Network\Error; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; /** * Exception class for Socket. This exception will be thrown from Socket, Email, HttpSocket diff --git a/src/Network/Http/Adapter/Stream.php b/src/Network/Http/Adapter/Stream.php index c926d77e814..b5ffc518e55 100644 --- a/src/Network/Http/Adapter/Stream.php +++ b/src/Network/Http/Adapter/Stream.php @@ -13,7 +13,7 @@ */ namespace Cake\Network\Http\Adapter; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Network\Http\FormData; use Cake\Network\Http\Request; use Cake\Network\Http\Response; @@ -231,7 +231,7 @@ protected function _buildSslContext(Request $request, $options) { * * @param \Cake\Network\Request $request The request object. * @return array Array of populated Response objects - * @throws \Cake\Core\Error\Exception + * @throws \Cake\Core\Exception\Exception */ protected function _send(Request $request) { $url = $request->url(); @@ -258,7 +258,7 @@ protected function _send(Request $request) { * * @param string $url The url to connect to. * @return void - * @throws \Cake\Core\Error\Exception + * @throws \Cake\Core\Exception\Exception */ protected function _open($url) { set_error_handler([$this, '_connectionErrorHandler']); diff --git a/src/Network/Http/Auth/Oauth.php b/src/Network/Http/Auth/Oauth.php index 796e3fb182c..e2b10a37004 100644 --- a/src/Network/Http/Auth/Oauth.php +++ b/src/Network/Http/Auth/Oauth.php @@ -13,7 +13,7 @@ */ namespace Cake\Network\Http\Auth; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Network\Http\Request; /** @@ -34,7 +34,7 @@ class Oauth { * @param \Cake\Network\Request $request The request object. * @param array $credentials Authentication credentials. * @return void - * @throws \Cake\Core\Error\Exception On invalid signature types. + * @throws \Cake\Core\Exception\Exception On invalid signature types. */ public function authentication(Request $request, array $credentials) { $hasKeys = isset( @@ -161,7 +161,7 @@ public function baseString($request, $oauthValues) { * * @param string $url URL * @return string Normalized URL - * @throws \Cake\Core\Error\Exception On invalid URLs + * @throws \Cake\Core\Exception\Exception On invalid URLs */ protected function _normalizedUrl($url) { $parts = parse_url($url); diff --git a/src/Network/Http/Client.php b/src/Network/Http/Client.php index ed344df8884..b30275cb78b 100644 --- a/src/Network/Http/Client.php +++ b/src/Network/Http/Client.php @@ -14,7 +14,7 @@ namespace Cake\Network\Http; use Cake\Core\App; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Core\InstanceConfigTrait; use Cake\Network\Http\CookieCollection; use Cake\Network\Http\Request; @@ -397,7 +397,7 @@ protected function _createRequest($method, $url, $data, $options) { * * @param string $type short type alias or full mimetype. * @return array Headers to set on the request. - * @throws \Cake\Core\Error\Exception When an unknown type alias is used. + * @throws \Cake\Core\Exception\Exception When an unknown type alias is used. */ protected function _typeHeaders($type) { if (strpos($type, '/') !== false) { @@ -460,7 +460,7 @@ protected function _addProxy(Request $request, $options) { * @param array $auth The authentication options to use. * @param array $options The overall request options to use. * @return mixed Authentication strategy instance. - * @throws \Cake\Core\Error\Exception when an invalid stratgey is chosen. + * @throws \Cake\Core\Exception\Exception when an invalid stratgey is chosen. */ protected function _createAuth($auth, $options) { if (empty($auth['type'])) { diff --git a/src/Network/Http/Request.php b/src/Network/Http/Request.php index 57088c485bc..847b7d6c7df 100644 --- a/src/Network/Http/Request.php +++ b/src/Network/Http/Request.php @@ -13,7 +13,7 @@ */ namespace Cake\Network\Http; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Network\Http\Message; /** @@ -60,7 +60,7 @@ class Request extends Message { * * @param string|null $method The method for the request. * @return mixed Either this or the current method. - * @throws \Cake\Core\Error\Exception On invalid methods. + * @throws \Cake\Core\Exception\Exception On invalid methods. */ public function method($method = null) { if ($method === null) { diff --git a/src/Network/Request.php b/src/Network/Request.php index 16f7c0ad397..ac64c6ba335 100644 --- a/src/Network/Request.php +++ b/src/Network/Request.php @@ -15,7 +15,7 @@ namespace Cake\Network; use Cake\Core\Configure; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Error; use Cake\Network\Session; use Cake\Utility\Hash; @@ -525,7 +525,7 @@ public function referer($local = false) { * @param string $name The method called * @param array $params Array of parameters for the method call * @return mixed - * @throws \Cake\Core\Error\Exception when an invalid method is called. + * @throws \Cake\Core\Exception\Exception when an invalid method is called. */ public function __call($name, $params) { if (strpos($name, 'is') === 0) { diff --git a/src/Network/Response.php b/src/Network/Response.php index 9d0a46de52a..147a5bc5c2d 100644 --- a/src/Network/Response.php +++ b/src/Network/Response.php @@ -15,7 +15,7 @@ namespace Cake\Network; use Cake\Core\Configure; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Error; use Cake\Utility\File; @@ -518,7 +518,7 @@ protected function _setContentLength() { * @param string $name the header name * @param string $value the header value * @return void - * @throws \Cake\Core\Error\Exception When headers have already been sent + * @throws \Cake\Core\Exception\Exception When headers have already been sent */ protected function _sendHeader($name, $value = null) { if (headers_sent($filename, $linenum)) { @@ -625,7 +625,7 @@ public function body($content = null) { * * @param int $code the HTTP status code * @return int current status code - * @throws \Cake\Core\Error\Exception When an unknown status code is reached. + * @throws \Cake\Core\Exception\Exception When an unknown status code is reached. */ public function statusCode($code = null) { if ($code === null) { @@ -666,7 +666,7 @@ public function statusCode($code = null) { * * @return mixed associative array of the HTTP codes as keys, and the message * strings as values, or null of the given $code does not exist. - * @throws \Cake\Core\Error\Exception If an attempt is made to add an invalid status code + * @throws \Cake\Core\Exception\Exception If an attempt is made to add an invalid status code */ public function httpCodes($code = null) { if (empty($code)) { diff --git a/src/ORM/Behavior.php b/src/ORM/Behavior.php index 7df932cd565..8c2989a24b0 100644 --- a/src/ORM/Behavior.php +++ b/src/ORM/Behavior.php @@ -15,7 +15,7 @@ namespace Cake\ORM; use Cake\Core\InstanceConfigTrait; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Event\EventListener; /** @@ -174,7 +174,7 @@ protected function _resolveMethodAliases($key, $defaults, $config) { * Check that implemented* keys contain values pointing at callable. * * @return void - * @throws \Cake\Core\Error\Exception if config are invalid + * @throws \Cake\Core\Exception\Exception if config are invalid */ public function verifyConfig() { $keys = ['implementedFinders', 'implementedMethods']; diff --git a/src/ORM/BehaviorRegistry.php b/src/ORM/BehaviorRegistry.php index afde0f4f932..67774d53939 100644 --- a/src/ORM/BehaviorRegistry.php +++ b/src/ORM/BehaviorRegistry.php @@ -15,7 +15,7 @@ namespace Cake\ORM; use Cake\Core\App; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Event\EventManagerTrait; use Cake\ORM\Behavior; use Cake\ORM\Table; @@ -125,7 +125,7 @@ protected function _create($class, $alias, $config) { * @param string $class The classname that is missing. * @param string $alias The alias of the object. * @return void - * @throws \Cake\Core\Error\Exception when duplicate methods are connected. + * @throws \Cake\Core\Exception\Exception when duplicate methods are connected. */ protected function _getMethods(Behavior $instance, $class, $alias) { $finders = array_change_key_case($instance->implementedFinders()); @@ -196,7 +196,7 @@ public function hasFinder($method) { * @param string $method The method to invoke. * @param array $args The arguments you want to invoke the method with. * @return mixed The return value depends on the underlying behavior method. - * @throws \Cake\Core\Error\Exception When the method is unknown. + * @throws \Cake\Core\Exception\Exception When the method is unknown. */ public function call($method, array $args = []) { $method = strtolower($method); @@ -214,7 +214,7 @@ public function call($method, array $args = []) { * @param string $type The finder type to invoke. * @param array $args The arguments you want to invoke the method with. * @return mixed The return value depends on the underlying behavior method. - * @throws \Cake\Core\Error\Exception When the method is unknown. + * @throws \Cake\Core\Exception\Exception When the method is unknown. */ public function callFinder($type, array $args = []) { $type = strtolower($type); diff --git a/src/ORM/Error/MissingBehaviorException.php b/src/ORM/Error/MissingBehaviorException.php index ea9ea0bae53..ae0e0c352e8 100644 --- a/src/ORM/Error/MissingBehaviorException.php +++ b/src/ORM/Error/MissingBehaviorException.php @@ -13,7 +13,7 @@ */ namespace Cake\ORM\Error; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; /** * Used when a behavior cannot be found. diff --git a/src/ORM/Error/MissingEntityException.php b/src/ORM/Error/MissingEntityException.php index cce611c3710..9dc81c64e23 100644 --- a/src/ORM/Error/MissingEntityException.php +++ b/src/ORM/Error/MissingEntityException.php @@ -16,7 +16,7 @@ */ namespace Cake\ORM\Error; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; /** * Exception raised when an Entity could not be found. diff --git a/src/ORM/Error/MissingTableClassException.php b/src/ORM/Error/MissingTableClassException.php index 6f0fe1c5f2e..e4197d03814 100644 --- a/src/ORM/Error/MissingTableClassException.php +++ b/src/ORM/Error/MissingTableClassException.php @@ -14,7 +14,7 @@ */ namespace Cake\ORM\Error; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; /** * Exception raised when a Table could not be found. diff --git a/src/ORM/Table.php b/src/ORM/Table.php index b096e9d4417..6018d58f27c 100644 --- a/src/ORM/Table.php +++ b/src/ORM/Table.php @@ -1461,7 +1461,7 @@ public function callFinder($type, Query $query, array $options = []) { * @param string $method The method name that was fired. * @param array $args List of arguments passed to the function. * @return mixed - * @throws \Cake\Core\Error\Exception when there are missing arguments, or when + * @throws \Cake\Core\Exception\Exception when there are missing arguments, or when * and & or are combined. */ protected function _dynamicFinder($method, $args) { @@ -1482,7 +1482,7 @@ protected function _dynamicFinder($method, $args) { $makeConditions = function($fields, $args) { $conditions = []; if (count($args) < count($fields)) { - throw new \Cake\Core\Error\Exception(sprintf( + throw new \Cake\Core\Exception\Exception(sprintf( 'Not enough arguments to magic finder. Got %s required %s', count($args), count($fields) @@ -1495,7 +1495,7 @@ protected function _dynamicFinder($method, $args) { }; if ($hasOr !== false && $hasAnd !== false) { - throw new \Cake\Core\Error\Exception( + throw new \Cake\Core\Exception\Exception( 'Cannot mix "and" & "or" in a magic finder. Use find() instead.' ); } diff --git a/src/Routing/Dispatcher.php b/src/Routing/Dispatcher.php index 52c33797841..3866870daf4 100644 --- a/src/Routing/Dispatcher.php +++ b/src/Routing/Dispatcher.php @@ -16,7 +16,7 @@ use Cake\Controller\Controller; use Cake\Controller\Error\MissingControllerException; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Event\Event; use Cake\Event\EventListener; use Cake\Event\EventManagerTrait; @@ -102,7 +102,7 @@ public function dispatch(Request $request, Response $response) { * * @param Controller $controller Controller to invoke * @return \Cake\Network\Response The resulting response object - * @throws \Cake\Core\Error\Exception If data returned by controller action is not an + * @throws \Cake\Core\Exception\Exception If data returned by controller action is not an * instance of Response */ protected function _invoke(Controller $controller) { diff --git a/src/Routing/DispatcherFilter.php b/src/Routing/DispatcherFilter.php index 32af01f3db3..93858645da3 100644 --- a/src/Routing/DispatcherFilter.php +++ b/src/Routing/DispatcherFilter.php @@ -14,7 +14,7 @@ */ namespace Cake\Routing; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Core\InstanceConfigTrait; use Cake\Event\Event; use Cake\Event\EventListener; @@ -94,7 +94,7 @@ class DispatcherFilter implements EventListener { * Constructor. * * @param array $config Settings for the filter. - * @throws \Cake\Core\Error\Exception When 'when' conditions are not callable. + * @throws \Cake\Core\Exception\Exception When 'when' conditions are not callable. */ public function __construct($config = []) { if (!isset($config['priority'])) { diff --git a/src/Routing/Error/MissingDispatcherFilterException.php b/src/Routing/Error/MissingDispatcherFilterException.php index 8eaeb1cb613..2f4b5fbb752 100644 --- a/src/Routing/Error/MissingDispatcherFilterException.php +++ b/src/Routing/Error/MissingDispatcherFilterException.php @@ -13,7 +13,7 @@ */ namespace Cake\Routing\Error; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; /** * Exception raised when a Dispatcher filter could not be found diff --git a/src/Routing/Error/MissingRouteException.php b/src/Routing/Error/MissingRouteException.php index 11c34c5eb20..929a65dfd01 100644 --- a/src/Routing/Error/MissingRouteException.php +++ b/src/Routing/Error/MissingRouteException.php @@ -13,7 +13,7 @@ */ namespace Cake\Routing\Error; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; /** * Exception raised when a URL cannot be reverse routed diff --git a/src/Routing/Filter/LocaleSelectorFilter.php b/src/Routing/Filter/LocaleSelectorFilter.php index c9174bcc3c1..09fb443e3dc 100644 --- a/src/Routing/Filter/LocaleSelectorFilter.php +++ b/src/Routing/Filter/LocaleSelectorFilter.php @@ -36,7 +36,7 @@ class LocaleSelectorFilter extends DispatcherFilter { * Constructor. * * @param array $config Settings for the filter. - * @throws \Cake\Core\Error\Exception When 'when' conditions are not callable. + * @throws \Cake\Core\Exception\Exception When 'when' conditions are not callable. */ public function __construct($config = []) { parent::__construct($config); diff --git a/src/Routing/RouteBuilder.php b/src/Routing/RouteBuilder.php index 090bc41757c..8a60e32a919 100644 --- a/src/Routing/RouteBuilder.php +++ b/src/Routing/RouteBuilder.php @@ -15,7 +15,7 @@ namespace Cake\Routing; use Cake\Core\App; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Routing\Router; use Cake\Routing\Route\Route; use Cake\Utility\Inflector; @@ -310,7 +310,7 @@ public function resources($name, $options = [], $callback = null) { * shifted into the passed arguments, supplying patterns for routing parameters and supplying the name of a * custom routing class. * @return void - * @throws \Cake\Core\Error\Exception + * @throws \Cake\Core\Exception\Exception */ public function connect($route, array $defaults = [], $options = []) { if (empty($options['action'])) { @@ -332,7 +332,7 @@ public function connect($route, array $defaults = [], $options = []) { * @param array $defaults Default parameters. * @param array $options Additional options parameters. * @return \Cake\Routing\Route\Route - * @throws \Cake\Core\Error\Exception when route class or route object is invalid. + * @throws \Cake\Core\Exception\Exception when route class or route object is invalid. */ protected function _makeRoute($route, $defaults, $options) { if (is_string($route)) { diff --git a/src/Routing/Router.php b/src/Routing/Router.php index ca14699cec3..14fef6e69c3 100644 --- a/src/Routing/Router.php +++ b/src/Routing/Router.php @@ -165,7 +165,7 @@ public static function getNamedExpressions() { * shifted into the passed arguments, supplying patterns for routing parameters and supplying the name of a * custom routing class. * @return void - * @throws \Cake\Core\Error\Exception + * @throws \Cake\Core\Exception\Exception * @see \Cake\Routing\RouteBuilder::connect() * @see \Cake\Routing\Router::scope() */ @@ -488,7 +488,7 @@ protected static function _applyUrlFilters($url) { * @param bool $full If true, the full base URL will be prepended to the result. * Default is false. * @return string Full translated URL with base path. - * @throws \Cake\Core\Error\Exception When the route name is not found + * @throws \Cake\Core\Exception\Exception When the route name is not found */ public static function url($url = null, $full = false) { if (!static::$initialized) { diff --git a/src/Shell/Task/TestTask.php b/src/Shell/Task/TestTask.php index 205b4ff05fd..a3919607380 100644 --- a/src/Shell/Task/TestTask.php +++ b/src/Shell/Task/TestTask.php @@ -17,7 +17,7 @@ use Cake\Console\Shell; use Cake\Controller\Controller; use Cake\Core\Configure; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Core\Plugin; use Cake\Network\Request; use Cake\Network\Response; @@ -277,7 +277,7 @@ public function getRealClassName($type, $class) { * * @param string $type The type of thing having a test generated. * @return string - * @throws \Cake\Core\Error\Exception When invalid object types are requested. + * @throws \Cake\Core\Exception\Exception When invalid object types are requested. */ public function mapType($type) { $type = ucfirst($type); diff --git a/src/TestSuite/Fixture/FixtureManager.php b/src/TestSuite/Fixture/FixtureManager.php index 2f84e13a627..cab084dc1c4 100644 --- a/src/TestSuite/Fixture/FixtureManager.php +++ b/src/TestSuite/Fixture/FixtureManager.php @@ -18,7 +18,7 @@ use Cake\Core\Plugin; use Cake\Database\Connection; use Cake\Datasource\ConnectionManager; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\TestSuite\Fixture\TestFixture; use Cake\TestSuite\TestCase; use Cake\Utility\Inflector; @@ -220,7 +220,7 @@ protected function _setupTable(TestFixture $fixture, Connection $db = null, $dro * * @param \Cake\TestSuite\TestCase $test the test to inspect for fixture loading * @return void - * @throws \Cake\Core\Error\Exception When fixture records cannot be inserted. + * @throws \Cake\Core\Exception\Exception When fixture records cannot be inserted. */ public function load($test) { if (empty($test->fixtures)) { diff --git a/src/TestSuite/Fixture/TestFixture.php b/src/TestSuite/Fixture/TestFixture.php index 6a75f3cf91f..4000a7feae8 100644 --- a/src/TestSuite/Fixture/TestFixture.php +++ b/src/TestSuite/Fixture/TestFixture.php @@ -14,7 +14,7 @@ */ namespace Cake\TestSuite\Fixture; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Database\Connection; use Cake\Database\Schema\Table; use Cake\Datasource\ConnectionManager; @@ -87,7 +87,7 @@ class TestFixture { /** * Instantiate the fixture. * - * @throws \Cake\Core\Error\Exception on invalid datasource usage. + * @throws \Cake\Core\Exception\Exception on invalid datasource usage. */ public function __construct() { $connection = 'test'; @@ -175,7 +175,7 @@ protected function _schemaFromFields() { * Build fixture schema from a table in another datasource. * * @return void - * @throws \Cake\Core\Error\Exception when trying to import from an empty table. + * @throws \Cake\Core\Exception\Exception when trying to import from an empty table. */ protected function _schemaFromImport() { if (!is_array($this->import)) { diff --git a/src/Utility/Error/XmlException.php b/src/Utility/Error/XmlException.php index 47cf97fb9d9..951b27d66e0 100644 --- a/src/Utility/Error/XmlException.php +++ b/src/Utility/Error/XmlException.php @@ -13,7 +13,7 @@ */ namespace Cake\Utility\Error; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; /** * Exception class for Xml. This exception will be thrown from Xml when it diff --git a/src/Utility/Number.php b/src/Utility/Number.php index 7ebbe119caf..edea704182a 100644 --- a/src/Utility/Number.php +++ b/src/Utility/Number.php @@ -14,7 +14,7 @@ */ namespace Cake\Utility; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use NumberFormatter; /** @@ -81,7 +81,7 @@ public static function toReadableSize($size) { * @param string $size Size in human readable string like '5MB', '5M', '500B', '50kb' etc. * @param mixed $default Value to be returned when invalid size was used, for example 'Unknown type' * @return mixed Number of bytes as integer on success, `$default` on failure if not false - * @throws \Cake\Core\Error\Exception On invalid Unit type. + * @throws \Cake\Core\Exception\Exception On invalid Unit type. * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/number.html#NumberHelper::fromReadableSize */ public static function fromReadableSize($size, $default = false) { diff --git a/src/Utility/Security.php b/src/Utility/Security.php index 31ad55e6645..1c781063dd1 100644 --- a/src/Utility/Security.php +++ b/src/Utility/Security.php @@ -15,7 +15,7 @@ namespace Cake\Utility; use Cake\Core\Configure; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; /** * Security Library contains utility methods related to security @@ -86,7 +86,7 @@ public static function setHash($hash) { * @param string $text Encrypted string to decrypt, normal string to encrypt * @param string $key Key to use as the encryption key for encrypted data. * @param string $operation Operation to perform, encrypt or decrypt - * @throws \Cake\Core\Error\Exception When there are errors. + * @throws \Cake\Core\Exception\Exception When there are errors. * @return string Encrypted/Decrypted string */ public static function rijndael($text, $key, $operation) { @@ -125,7 +125,7 @@ public static function rijndael($text, $key, $operation) { * @param string $key The 256 bit/32 byte key to use as a cipher key. * @param string $hmacSalt The salt to use for the HMAC process. Leave null to use Security.salt. * @return string Encrypted data. - * @throws \Cake\Core\Error\Exception On invalid data or key. + * @throws \Cake\Core\Exception\Exception On invalid data or key. */ public static function encrypt($plain, $key, $hmacSalt = null) { self::_checkKey($key, 'encrypt()'); @@ -153,7 +153,7 @@ public static function encrypt($plain, $key, $hmacSalt = null) { * @param string $key Key to check. * @param string $method The method the key is being checked for. * @return void - * @throws \Cake\Core\Error\Exception When key length is not 256 bit/32 bytes + * @throws \Cake\Core\Exception\Exception When key length is not 256 bit/32 bytes */ protected static function _checkKey($key, $method) { if (strlen($key) < 32) { @@ -168,7 +168,7 @@ protected static function _checkKey($key, $method) { * @param string $key The 256 bit/32 byte key to use as a cipher key. * @param string $hmacSalt The salt to use for the HMAC process. Leave null to use Security.salt. * @return string Decrypted data. Any trailing null bytes will be removed. - * @throws \Cake\Core\Error\Exception On invalid data or key. + * @throws \Cake\Core\Exception\Exception On invalid data or key. */ public static function decrypt($cipher, $key, $hmacSalt = null) { self::_checkKey($key, 'decrypt()'); diff --git a/src/Validation/Validation.php b/src/Validation/Validation.php index 923d2778877..8bef17f2652 100644 --- a/src/Validation/Validation.php +++ b/src/Validation/Validation.php @@ -15,7 +15,7 @@ namespace Cake\Validation; use Cake\Core\App; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Utility\File; use Cake\Utility\Number; @@ -909,7 +909,7 @@ public static function luhn($check, $deep = false) { * @param string|array $check Value to check. * @param array|string $mimeTypes Array of mime types or regex pattern to check. * @return bool Success - * @throws \Cake\Core\Error\Exception when mime type can not be determined. + * @throws \Cake\Core\Exception\Exception when mime type can not be determined. */ public static function mimeType($check, $mimeTypes = array()) { if (is_array($check) && isset($check['tmp_name'])) { diff --git a/src/View/Error/MissingCellException.php b/src/View/Error/MissingCellException.php index 062b5f41276..0902663c06e 100644 --- a/src/View/Error/MissingCellException.php +++ b/src/View/Error/MissingCellException.php @@ -14,7 +14,7 @@ */ namespace Cake\View\Error; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; /** * Used when a cell class file cannot be found. diff --git a/src/View/Error/MissingCellViewException.php b/src/View/Error/MissingCellViewException.php index cefcad8a746..5e5bdfb51b4 100644 --- a/src/View/Error/MissingCellViewException.php +++ b/src/View/Error/MissingCellViewException.php @@ -13,7 +13,7 @@ */ namespace Cake\View\Error; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; /** * Used when a view file for a cell cannot be found. diff --git a/src/View/Error/MissingElementException.php b/src/View/Error/MissingElementException.php index 49ea06d2ee0..36ebffcd46d 100644 --- a/src/View/Error/MissingElementException.php +++ b/src/View/Error/MissingElementException.php @@ -13,7 +13,7 @@ */ namespace Cake\View\Error; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; /** * Used when an element file cannot be found. diff --git a/src/View/Error/MissingHelperException.php b/src/View/Error/MissingHelperException.php index b7533206c8b..644fc6679ce 100644 --- a/src/View/Error/MissingHelperException.php +++ b/src/View/Error/MissingHelperException.php @@ -13,7 +13,7 @@ */ namespace Cake\View\Error; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; /** * Used when a helper cannot be found. diff --git a/src/View/Error/MissingLayoutException.php b/src/View/Error/MissingLayoutException.php index e67620f398c..b86218b4a58 100644 --- a/src/View/Error/MissingLayoutException.php +++ b/src/View/Error/MissingLayoutException.php @@ -13,7 +13,7 @@ */ namespace Cake\View\Error; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; /** * Used when a layout file cannot be found. diff --git a/src/View/Error/MissingViewException.php b/src/View/Error/MissingViewException.php index 06461fb41cb..d3a2f541f09 100644 --- a/src/View/Error/MissingViewException.php +++ b/src/View/Error/MissingViewException.php @@ -13,7 +13,7 @@ */ namespace Cake\View\Error; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; /** * Used when a view file cannot be found. diff --git a/src/View/Helper/FormHelper.php b/src/View/Helper/FormHelper.php index a5c298cba27..9eb67a31b29 100644 --- a/src/View/Helper/FormHelper.php +++ b/src/View/Helper/FormHelper.php @@ -15,7 +15,7 @@ namespace Cake\View\Helper; use Cake\Core\Configure; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\ORM\Entity; use Cake\Routing\Router; use Cake\Utility\Hash; @@ -1293,7 +1293,7 @@ public function radio($fieldName, $options = [], array $attributes = []) { * @param string $method Method name / input type to make. * @param array $params Parameters for the method call * @return string Formatted input method. - * @throws \Cake\Core\Error\Exception When there are no params for the method call. + * @throws \Cake\Core\Exception\Exception When there are no params for the method call. */ public function __call($method, $params) { $options = []; diff --git a/src/View/Helper/NumberHelper.php b/src/View/Helper/NumberHelper.php index d6fc6623d0d..402990c01b0 100644 --- a/src/View/Helper/NumberHelper.php +++ b/src/View/Helper/NumberHelper.php @@ -15,7 +15,7 @@ namespace Cake\View\Helper; use Cake\Core\App; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\View\Helper; use Cake\View\View; @@ -55,7 +55,7 @@ class NumberHelper extends Helper { * * @param View $View The View this helper is being attached to. * @param array $config Configuration settings for the helper - * @throws \Cake\Core\Error\Exception When the engine class could not be found. + * @throws \Cake\Core\Exception\Exception When the engine class could not be found. */ public function __construct(View $View, array $config = array()) { parent::__construct($View, $config); diff --git a/src/View/Helper/TextHelper.php b/src/View/Helper/TextHelper.php index c973ef77e7d..6ecea8aa080 100644 --- a/src/View/Helper/TextHelper.php +++ b/src/View/Helper/TextHelper.php @@ -15,7 +15,7 @@ namespace Cake\View\Helper; use Cake\Core\App; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\View\Helper; use Cake\View\View; @@ -71,7 +71,7 @@ class TextHelper extends Helper { * * @param View $View the view object the helper is attached to. * @param array $config Settings array Settings array - * @throws \Cake\Core\Error\Exception when the engine class could not be found. + * @throws \Cake\Core\Exception\Exception when the engine class could not be found. */ public function __construct(View $View, array $config = array()) { parent::__construct($View, $config); diff --git a/src/View/View.php b/src/View/View.php index 85073fa25b6..7502d1c4692 100644 --- a/src/View/View.php +++ b/src/View/View.php @@ -18,7 +18,7 @@ use Cake\Core\App; use Cake\Core\Configure; use Cake\Core\Plugin; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Event\Event; use Cake\Event\EventManager; use Cake\Event\EventManagerTrait; @@ -406,7 +406,7 @@ public function elementExists($name) { * @param string $view Name of view file to use * @param string $layout Layout to use. * @return string|null Rendered content or null if content already rendered and returned earlier. - * @throws \Cake\Core\Error\Exception If there is an error in the view. + * @throws \Cake\Core\Exception\Exception If there is an error in the view. */ public function render($view = null, $layout = null) { if ($this->hasRendered) { @@ -437,7 +437,7 @@ public function render($view = null, $layout = null) { * @param string $content Content to render in a view, wrapped by the surrounding layout. * @param string $layout Layout name * @return mixed Rendered output, or false on error - * @throws \Cake\Core\Error\Exception if there is an error in the view. + * @throws \Cake\Core\Exception\Exception if there is an error in the view. */ public function renderLayout($content, $layout = null) { $layoutFileName = $this->_getLayoutFileName($layout); @@ -685,7 +685,7 @@ public function loadHelpers() { * @param string $viewFile Filename of the view * @param array $data Data to include in rendered view. If empty the current View::$viewVars will be used. * @return string Rendered output - * @throws \Cake\Core\Error\Exception when a block is left open. + * @throws \Cake\Core\Exception\Exception when a block is left open. */ protected function _render($viewFile, $data = array()) { if (empty($data)) { @@ -821,7 +821,7 @@ protected function _getViewFileName($name = null) { * @param string $file The path to the template file. * @param string $path Base path that $file should be inside of. * @return string The file path - * @throws \Cake\Core\Error\Exception + * @throws \Cake\Core\Exception\Exception */ protected function _checkFilePath($file, $path) { if (strpos($file, '..') === false) { diff --git a/src/View/ViewBlock.php b/src/View/ViewBlock.php index c35796e37f8..8fe2856c3f0 100644 --- a/src/View/ViewBlock.php +++ b/src/View/ViewBlock.php @@ -14,7 +14,7 @@ */ namespace Cake\View; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; /** * ViewBlock implements the concept of Blocks or Slots in the View layer. @@ -72,7 +72,7 @@ class ViewBlock { * using View::get(); * * @param string $name The name of the block to capture for. - * @throws \Cake\Core\Error\Exception When starting a block twice + * @throws \Cake\Core\Exception\Exception When starting a block twice * @return void */ public function start($name) { diff --git a/tests/TestCase/Auth/ControllerAuthorizeTest.php b/tests/TestCase/Auth/ControllerAuthorizeTest.php index b1d8c2257b7..748d84f6dcd 100644 --- a/tests/TestCase/Auth/ControllerAuthorizeTest.php +++ b/tests/TestCase/Auth/ControllerAuthorizeTest.php @@ -52,7 +52,7 @@ public function testControllerTypeError() { } /** - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testControllerErrorOnMissingMethod() { diff --git a/tests/TestCase/Cache/CacheTest.php b/tests/TestCase/Cache/CacheTest.php index 5629fba1a6a..29e3230d092 100644 --- a/tests/TestCase/Cache/CacheTest.php +++ b/tests/TestCase/Cache/CacheTest.php @@ -115,7 +115,7 @@ public function testConfigWithLibAndPluginEngines() { /** * Test write from a config that is undefined. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testWriteNonExistingConfig() { @@ -125,7 +125,7 @@ public function testWriteNonExistingConfig() { /** * Test write from a config that is undefined. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testIncrementNonExistingConfig() { @@ -135,7 +135,7 @@ public function testIncrementNonExistingConfig() { /** * Test write from a config that is undefined. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testDecrementNonExistingConfig() { @@ -181,7 +181,7 @@ public function testConfigVariants($config) { /** * testConfigInvalidEngine method * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testConfigInvalidEngine() { @@ -193,7 +193,7 @@ public function testConfigInvalidEngine() { /** * test that trying to configure classes that don't extend CacheEngine fail. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testConfigInvalidObject() { @@ -207,7 +207,7 @@ public function testConfigInvalidObject() { /** * Ensure you cannot reconfigure a cache adapter. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testConfigErrorOnReconfigure() { @@ -285,7 +285,7 @@ public function testGroupConfigs() { /** * testGroupConfigsThrowsException method - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception */ public function testGroupConfigsThrowsException() { Cache::groupConfigs('bogus'); diff --git a/tests/TestCase/Cache/Engine/MemcachedEngineTest.php b/tests/TestCase/Cache/Engine/MemcachedEngineTest.php index b635ee91ad7..a5a4a9d2c6d 100644 --- a/tests/TestCase/Cache/Engine/MemcachedEngineTest.php +++ b/tests/TestCase/Cache/Engine/MemcachedEngineTest.php @@ -177,7 +177,7 @@ public function testInvalidSerializerSetting() { ); $this->setExpectedException( - 'Cake\Core\Error\Exception', 'invalid_serializer is not a valid serializer engine for Memcached' + 'Cake\Core\Exception\Exception', 'invalid_serializer is not a valid serializer engine for Memcached' ); $Memcached->init($config); } @@ -289,7 +289,7 @@ public function testJsonSerializerThrowException() { ); $this->setExpectedException( - 'Cake\Core\Error\Exception', 'Memcached extension is not compiled with json support' + 'Cake\Core\Exception\Exception', 'Memcached extension is not compiled with json support' ); $Memcached->init($config); } @@ -314,7 +314,7 @@ public function testMsgpackSerializerThrowException() { ); $this->setExpectedException( - 'Cake\Core\Error\Exception', 'msgpack is not a valid serializer engine for Memcached' + 'Cake\Core\Exception\Exception', 'msgpack is not a valid serializer engine for Memcached' ); $Memcached->init($config); } @@ -339,7 +339,7 @@ public function testIgbinarySerializerThrowException() { ); $this->setExpectedException( - 'Cake\Core\Error\Exception', 'Memcached extension is not compiled with igbinary support' + 'Cake\Core\Exception\Exception', 'Memcached extension is not compiled with igbinary support' ); $Memcached->init($config); } @@ -366,7 +366,7 @@ public function testSaslAuthException() { ); $this->setExpectedException( - 'Cake\Core\Error\Exception', 'Memcached extension is not build with SASL support' + 'Cake\Core\Exception\Exception', 'Memcached extension is not build with SASL support' ); $Memcached->init($config); } diff --git a/tests/TestCase/Console/ConsoleErrorHandlerTest.php b/tests/TestCase/Console/ConsoleErrorHandlerTest.php index 847002e4ea4..1af766793ce 100644 --- a/tests/TestCase/Console/ConsoleErrorHandlerTest.php +++ b/tests/TestCase/Console/ConsoleErrorHandlerTest.php @@ -16,7 +16,7 @@ use Cake\Console\ConsoleErrorHandler; use Cake\Controller\Error\MissingActionException; -use Cake\Core\Error\Exception; +use Cake\Core\Exception\Exception; use Cake\Error; use Cake\Log\Log; use Cake\TestSuite\TestCase; diff --git a/tests/TestCase/Controller/Component/AuthComponentTest.php b/tests/TestCase/Controller/Component/AuthComponentTest.php index 0e8b57b7e40..9ea4ab358e5 100644 --- a/tests/TestCase/Controller/Component/AuthComponentTest.php +++ b/tests/TestCase/Controller/Component/AuthComponentTest.php @@ -207,7 +207,7 @@ public function testAuthorizeFalse() { /** * testIsAuthorizedMissingFile function * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testIsAuthorizedMissingFile() { @@ -298,7 +298,7 @@ public function testLoadAuthorizeResets() { /** * testLoadAuthenticateNoFile function * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testLoadAuthenticateNoFile() { diff --git a/tests/TestCase/Controller/Component/RequestHandlerComponentTest.php b/tests/TestCase/Controller/Component/RequestHandlerComponentTest.php index 30300df33b5..af1bc955462 100644 --- a/tests/TestCase/Controller/Component/RequestHandlerComponentTest.php +++ b/tests/TestCase/Controller/Component/RequestHandlerComponentTest.php @@ -841,7 +841,7 @@ public function testBeforeRedirectCallbackWithArrayUrl() { /** * testAddInputTypeException method * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testAddInputTypeException() { diff --git a/tests/TestCase/Core/Configure/Engine/IniConfigTest.php b/tests/TestCase/Core/Configure/Engine/IniConfigTest.php index 3b33637635a..02c6c7a1ebd 100644 --- a/tests/TestCase/Core/Configure/Engine/IniConfigTest.php +++ b/tests/TestCase/Core/Configure/Engine/IniConfigTest.php @@ -166,7 +166,7 @@ public function testBooleanReading() { /** * Test an exception is thrown by reading files that exist without .ini extension. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testReadWithExistentFileWithoutExtension() { @@ -177,7 +177,7 @@ public function testReadWithExistentFileWithoutExtension() { /** * Test an exception is thrown by reading files that don't exist. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testReadWithNonExistentFile() { @@ -199,7 +199,7 @@ public function testReadEmptyFile() { /** * Test reading keys with ../ doesn't work. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testReadWithDots() { diff --git a/tests/TestCase/Core/Configure/Engine/PhpConfigTest.php b/tests/TestCase/Core/Configure/Engine/PhpConfigTest.php index e1939e67561..db6d92cdb7f 100644 --- a/tests/TestCase/Core/Configure/Engine/PhpConfigTest.php +++ b/tests/TestCase/Core/Configure/Engine/PhpConfigTest.php @@ -73,7 +73,7 @@ public function testRead() { /** * Test an exception is thrown by reading files that exist without .php extension. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testReadWithExistentFileWithoutExtension() { @@ -84,7 +84,7 @@ public function testReadWithExistentFileWithoutExtension() { /** * Test an exception is thrown by reading files that don't exist. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testReadWithNonExistentFile() { @@ -95,7 +95,7 @@ public function testReadWithNonExistentFile() { /** * Test reading an empty file. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testReadEmptyFile() { @@ -106,7 +106,7 @@ public function testReadEmptyFile() { /** * Test reading keys with ../ doesn't work. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testReadWithDots() { diff --git a/tests/TestCase/Core/ConfigureTest.php b/tests/TestCase/Core/ConfigureTest.php index 68fa3df724a..cf3c1964930 100644 --- a/tests/TestCase/Core/ConfigureTest.php +++ b/tests/TestCase/Core/ConfigureTest.php @@ -457,7 +457,7 @@ public function testClear() { } /** - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testDumpNoAdapter() { diff --git a/tests/TestCase/Core/PluginTest.php b/tests/TestCase/Core/PluginTest.php index c361488af16..34ca6c5519c 100644 --- a/tests/TestCase/Core/PluginTest.php +++ b/tests/TestCase/Core/PluginTest.php @@ -181,7 +181,7 @@ public function testIgnoreMissingFiles() { * Tests that Plugin::load() throws an exception on unknown plugin * * @return void - * @expectedException \Cake\Core\Error\MissingPluginException + * @expectedException \Cake\Core\Exception\MissingPluginException */ public function testLoadNotFound() { Plugin::load('MissingPlugin'); @@ -208,7 +208,7 @@ public function testPath() { * Tests that Plugin::path() throws an exception on unknown plugin * * @return void - * @expectedException \Cake\Core\Error\MissingPluginException + * @expectedException \Cake\Core\Exception\MissingPluginException */ public function testPathNotFound() { Plugin::path('TestPlugin'); @@ -235,7 +235,7 @@ public function testClassPath() { * Tests that Plugin::classPath() throws an exception on unknown plugin * * @return void - * @expectedException \Cake\Core\Error\MissingPluginException + * @expectedException \Cake\Core\Exception\MissingPluginException */ public function testClassPathNotFound() { Plugin::classPath('TestPlugin'); diff --git a/tests/TestCase/Database/Type/BinaryTypeTest.php b/tests/TestCase/Database/Type/BinaryTypeTest.php index b2593422797..c9055bf1b64 100644 --- a/tests/TestCase/Database/Type/BinaryTypeTest.php +++ b/tests/TestCase/Database/Type/BinaryTypeTest.php @@ -55,7 +55,7 @@ public function testToPHP() { /** * Test exceptions on invalid data. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @expectedExceptionMessage Unable to convert array into binary. */ public function testToPHPFailure() { diff --git a/tests/TestCase/Datasource/ConnectionManagerTest.php b/tests/TestCase/Datasource/ConnectionManagerTest.php index 88d4754d751..e6729e606ca 100644 --- a/tests/TestCase/Datasource/ConnectionManagerTest.php +++ b/tests/TestCase/Datasource/ConnectionManagerTest.php @@ -83,7 +83,7 @@ public function testConfigInvalidOptions() { /** * Test for errors on duplicate config. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @expectedExceptionMessage Cannot reconfigure existing key "test_variant" * @return void */ @@ -99,7 +99,7 @@ public function testConfigDuplicateConfig() { /** * Test get() failing on missing config. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @expectedExceptionMessage The datasource configuration "test_variant" was not found. * @return void */ @@ -125,7 +125,7 @@ public function testGet() { /** * Test loading connections without aliases * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @expectedExceptionMessage The datasource configuration "other_name" was not found. * @return void */ diff --git a/tests/TestCase/Error/DebuggerTest.php b/tests/TestCase/Error/DebuggerTest.php index 2dc10af4dd4..00af2c349a0 100644 --- a/tests/TestCase/Error/DebuggerTest.php +++ b/tests/TestCase/Error/DebuggerTest.php @@ -220,7 +220,7 @@ public function testOutputAs() { /** * Test that choosing a non-existent format causes an exception * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testOutputAsException() { diff --git a/tests/TestCase/Error/ExceptionRendererTest.php b/tests/TestCase/Error/ExceptionRendererTest.php index c7f3d8d03b5..fb1a2dbeb7c 100644 --- a/tests/TestCase/Error/ExceptionRendererTest.php +++ b/tests/TestCase/Error/ExceptionRendererTest.php @@ -22,7 +22,7 @@ use Cake\Controller\Error\PrivateActionException; use Cake\Core\App; use Cake\Core\Configure; -use Cake\Core\Error\MissingPluginException; +use Cake\Core\Exception\MissingPluginException; use Cake\Core\Plugin; use Cake\Datasource\Error\MissingDatasourceConfigException; use Cake\Datasource\Error\MissingDatasourceException; @@ -567,7 +567,7 @@ public static function exceptionProvider() { 500 ), array( - new \Cake\Core\Error\Exception('base class'), + new \Cake\Core\Exception\Exception('base class'), array('/Internal Error/'), 500 ) diff --git a/tests/TestCase/Log/LogTest.php b/tests/TestCase/Log/LogTest.php index 67934300c98..641505c9d25 100644 --- a/tests/TestCase/Log/LogTest.php +++ b/tests/TestCase/Log/LogTest.php @@ -69,7 +69,7 @@ public function testImportingLoggers() { /** * test all the errors from failed logger imports * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testImportingLoggerFailure() { @@ -91,7 +91,7 @@ public function testValidKeyName() { /** * test that loggers have to implement the correct interface. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testNotImplementingInterface() { @@ -122,7 +122,7 @@ public function testDrop() { /** * test config() with valid key name * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testInvalidLevel() { @@ -166,7 +166,7 @@ public function testConfigVariants($settings) { * Test that config() throws an exception when adding an * adapter with the wrong type. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testConfigInjectErrorOnWrongType() { @@ -195,7 +195,7 @@ public function testConfigRead() { /** * Ensure you cannot reconfigure a log adapter. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testConfigErrorOnReconfigure() { diff --git a/tests/TestCase/Network/Email/EmailTest.php b/tests/TestCase/Network/Email/EmailTest.php index 1ff9e283abb..c0b141b36e9 100644 --- a/tests/TestCase/Network/Email/EmailTest.php +++ b/tests/TestCase/Network/Email/EmailTest.php @@ -766,7 +766,7 @@ public function testTransport() { /** * Test that using unknown transports fails. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception */ public function testTransportInvalid() { $this->CakeEmail->transport('Invalid'); @@ -775,7 +775,7 @@ public function testTransportInvalid() { /** * Test that using classes with no send method fails. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception */ public function testTransportInstanceInvalid() { $this->CakeEmail->transport(new \StdClass()); @@ -824,7 +824,7 @@ public function testConfigTransportMultiple() { /** * Test that exceptions are raised when duplicate transports are configured. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception */ public function testConfigTransportErrorOnDuplicate() { Email::dropTransport('debug'); @@ -880,7 +880,7 @@ public function testConfig() { /** * Test that exceptions are raised on duplicate config set. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testConfigErrorOnDuplicate() { @@ -911,7 +911,7 @@ public function testProfile() { /** * Test that using an invalid profile fails. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @expectedExceptionMessage Unknown email configuration "derp". */ public function testProfileInvalid() { diff --git a/tests/TestCase/Network/Http/Auth/OauthTest.php b/tests/TestCase/Network/Http/Auth/OauthTest.php index f2e93d57bb6..f72578208b8 100644 --- a/tests/TestCase/Network/Http/Auth/OauthTest.php +++ b/tests/TestCase/Network/Http/Auth/OauthTest.php @@ -23,7 +23,7 @@ class OauthTest extends TestCase { /** - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception */ public function testExceptionUnknownSigningMethod() { $auth = new Oauth(); diff --git a/tests/TestCase/Network/Http/ClientTest.php b/tests/TestCase/Network/Http/ClientTest.php index f4f055855b6..5baaadab0fb 100644 --- a/tests/TestCase/Network/Http/ClientTest.php +++ b/tests/TestCase/Network/Http/ClientTest.php @@ -244,7 +244,7 @@ public function testGetWithContent() { /** * Test invalid authentication types throw exceptions. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testInvalidAuthenticationType() { @@ -388,7 +388,7 @@ public function testPostWithTypeKey($type, $mime) { /** * Test that exceptions are raised on invalid types. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testExceptionOnUnknownType() { diff --git a/tests/TestCase/Network/Http/RequestTest.php b/tests/TestCase/Network/Http/RequestTest.php index 8a07af232f9..04409b93b59 100644 --- a/tests/TestCase/Network/Http/RequestTest.php +++ b/tests/TestCase/Network/Http/RequestTest.php @@ -48,7 +48,7 @@ public function testMethod() { /** * test invalid method. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testMethodInvalid() { diff --git a/tests/TestCase/Network/RequestTest.php b/tests/TestCase/Network/RequestTest.php index 6a4f91d3b5a..7f3ce25d67a 100644 --- a/tests/TestCase/Network/RequestTest.php +++ b/tests/TestCase/Network/RequestTest.php @@ -684,7 +684,7 @@ public function testisAjaxFlashAndFriends() { /** * Test __call exceptions * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testMagicCallExceptionOnUnknownMethod() { diff --git a/tests/TestCase/Network/ResponseTest.php b/tests/TestCase/Network/ResponseTest.php index 592e2142ac7..4cd498cdee8 100644 --- a/tests/TestCase/Network/ResponseTest.php +++ b/tests/TestCase/Network/ResponseTest.php @@ -113,7 +113,7 @@ public function testCharset() { /** * Tests the statusCode method * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testStatusCode() { @@ -398,7 +398,7 @@ public function testCompress() { /** * Tests the httpCodes method * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testHttpCodes() { diff --git a/tests/TestCase/ORM/BehaviorRegistryTest.php b/tests/TestCase/ORM/BehaviorRegistryTest.php index e7d65dfc319..ecfc50ff4c1 100644 --- a/tests/TestCase/ORM/BehaviorRegistryTest.php +++ b/tests/TestCase/ORM/BehaviorRegistryTest.php @@ -119,7 +119,7 @@ public function testLoadMissingClass() { /** * Test load() duplicate method error * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @expectedExceptionMessage TestApp\Model\Behavior\DuplicateBehavior contains duplicate method "slugify" * @return void */ @@ -149,7 +149,7 @@ public function testLoadDuplicateMethodAliasing() { /** * Test load() duplicate finder error * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @expectedExceptionMessage TestApp\Model\Behavior\DuplicateBehavior contains duplicate finder "children" * @return void */ @@ -243,7 +243,7 @@ public function testCall() { /** * Test errors on unknown methods. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @expectedExceptionMessage Cannot call "nope" */ public function testCallError() { @@ -280,7 +280,7 @@ public function testCallFinder() { /** * Test errors on unknown methods. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @expectedExceptionMessage Cannot call finder "nope" */ public function testCallFinderError() { @@ -291,7 +291,7 @@ public function testCallFinderError() { /** * Test errors on unloaded behavior methods. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @expectedExceptionMessage Cannot call "slugify" it does not belong to any attached behavior. */ public function testUnloadBehaviorThenCall() { @@ -304,7 +304,7 @@ public function testUnloadBehaviorThenCall() { /** * Test errors on unloaded behavior finders. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @expectedExceptionMessage Cannot call finder "noslug" it does not belong to any attached behavior. */ public function testUnloadBehaviorThenCallFinder() { diff --git a/tests/TestCase/ORM/BehaviorTest.php b/tests/TestCase/ORM/BehaviorTest.php index 1a86a9b14c5..fb138797c9b 100644 --- a/tests/TestCase/ORM/BehaviorTest.php +++ b/tests/TestCase/ORM/BehaviorTest.php @@ -319,7 +319,7 @@ public function testVerifyConfigImplementedFindersOverriden() { /** * testVerifyImplementedFindersInvalid * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @expectedExceptionMessage The method findNotDefined is not callable on class Cake\Test\TestCase\ORM\Test2Behavior * * @return void @@ -356,7 +356,7 @@ public function testVerifyConfigImplementedMethodsOverriden() { /** * testVerifyImplementedMethodsInvalid * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @expectedExceptionMessage The method iDoNotExist is not callable on class Cake\Test\TestCase\ORM\Test2Behavior * * @return void diff --git a/tests/TestCase/ORM/TableTest.php b/tests/TestCase/ORM/TableTest.php index 43d8313c83e..3415a5742a9 100644 --- a/tests/TestCase/ORM/TableTest.php +++ b/tests/TestCase/ORM/TableTest.php @@ -2212,7 +2212,7 @@ public function testMagicFindDefaultToAll() { /** * Test magic findByXX errors on missing arguments. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @expectedExceptionMessage Not enough arguments to magic finder. Got 0 required 1 * @return void */ @@ -2225,7 +2225,7 @@ public function testMagicFindError() { /** * Test magic findByXX errors on missing arguments. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @expectedExceptionMessage Not enough arguments to magic finder. Got 1 required 2 * @return void */ @@ -2238,7 +2238,7 @@ public function testMagicFindErrorMissingField() { /** * Test magic findByXX errors when there is a mix of or & and. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @expectedExceptionMessage Cannot mix "and" & "or" in a magic finder. Use find() instead. * @return void */ diff --git a/tests/TestCase/Routing/DispatcherFilterTest.php b/tests/TestCase/Routing/DispatcherFilterTest.php index 968bad900d1..a3c6827dfce 100644 --- a/tests/TestCase/Routing/DispatcherFilterTest.php +++ b/tests/TestCase/Routing/DispatcherFilterTest.php @@ -63,7 +63,7 @@ public function testImplementedEvents() { /** * Test constructor error invalid when * - * @expectedException Cake\Core\Error\Exception + * @expectedException Cake\Core\Exception\Exception * @expectedExceptionMessage "when" conditions must be a callable. * @return void */ diff --git a/tests/TestCase/Routing/RouteBuilderTest.php b/tests/TestCase/Routing/RouteBuilderTest.php index 849e3961d8f..16c7f2a874b 100644 --- a/tests/TestCase/Routing/RouteBuilderTest.php +++ b/tests/TestCase/Routing/RouteBuilderTest.php @@ -162,7 +162,7 @@ public function testExtensionsString() { /** * Test error on invalid route class * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @expectedExceptionMessage Route class not found, or route class is not a subclass of * @return void */ @@ -174,7 +174,7 @@ public function testConnectErrorInvalidRouteClass() { /** * Test conflicting parameters raises an exception. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @expectedExceptionMessage You cannot define routes that conflict with the scope. * @return void */ diff --git a/tests/TestCase/Routing/RouterTest.php b/tests/TestCase/Routing/RouterTest.php index 21274589359..64f3b5c6a55 100644 --- a/tests/TestCase/Routing/RouterTest.php +++ b/tests/TestCase/Routing/RouterTest.php @@ -2276,7 +2276,7 @@ public function testUsingCustomRouteClassPluginDotSyntax() { /** * test that route classes must extend \Cake\Routing\Route\Route * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testCustomRouteException() { diff --git a/tests/TestCase/Utility/NumberTest.php b/tests/TestCase/Utility/NumberTest.php index f5213a41d9b..56e9d333911 100644 --- a/tests/TestCase/Utility/NumberTest.php +++ b/tests/TestCase/Utility/NumberTest.php @@ -508,7 +508,7 @@ public function testFromReadableSize($params, $expected) { /** * testFromReadableSize * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testFromReadableSizeException() { diff --git a/tests/TestCase/Utility/SecurityTest.php b/tests/TestCase/Utility/SecurityTest.php index 2de7dc8c147..aab21bbbce8 100644 --- a/tests/TestCase/Utility/SecurityTest.php +++ b/tests/TestCase/Utility/SecurityTest.php @@ -103,7 +103,7 @@ public function testRijndael() { /** * testRijndaelInvalidOperation method * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testRijndaelInvalidOperation() { @@ -115,7 +115,7 @@ public function testRijndaelInvalidOperation() { /** * testRijndaelInvalidKey method * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testRijndaelInvalidKey() { @@ -186,7 +186,7 @@ public function testDecryptHmacSaltFailure() { /** * Test that short keys cause errors * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @expectedExceptionMessage Invalid key for encrypt(), key must be at least 256 bits (32 bytes) long. * @return void */ @@ -223,7 +223,7 @@ public function testEncryptDecryptFalseyData() { /** * Test that short keys cause errors * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @expectedExceptionMessage Invalid key for decrypt(), key must be at least 256 bits (32 bytes) long. * @return void */ @@ -236,7 +236,7 @@ public function testDecryptInvalidKey() { /** * Test that empty data cause errors * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @expectedExceptionMessage The data to decrypt cannot be empty. * @return void */ diff --git a/tests/TestCase/Utility/XmlTest.php b/tests/TestCase/Utility/XmlTest.php index 30fbff1b9d2..63db6d8ef2e 100644 --- a/tests/TestCase/Utility/XmlTest.php +++ b/tests/TestCase/Utility/XmlTest.php @@ -168,7 +168,7 @@ public static function invalidDataProvider() { * testBuildInvalidData * * @dataProvider invalidDataProvider - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testBuildInvalidData($value) { diff --git a/tests/TestCase/Validation/ValidationTest.php b/tests/TestCase/Validation/ValidationTest.php index 95d842aa737..e0db27fc527 100644 --- a/tests/TestCase/Validation/ValidationTest.php +++ b/tests/TestCase/Validation/ValidationTest.php @@ -2378,7 +2378,7 @@ public function testMimeType() { /** * testMimeTypeFalse method * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testMimeTypeFalse() { diff --git a/tests/TestCase/View/Helper/FormHelperTest.php b/tests/TestCase/View/Helper/FormHelperTest.php index 692c2dd73bb..d6f0f69e5db 100755 --- a/tests/TestCase/View/Helper/FormHelperTest.php +++ b/tests/TestCase/View/Helper/FormHelperTest.php @@ -6092,7 +6092,7 @@ public function testHtml5InputWithInput() { /** * Test errors when field name is missing. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testHtml5InputException() { diff --git a/tests/TestCase/View/StringTemplateTest.php b/tests/TestCase/View/StringTemplateTest.php index 19b1e007af5..3adefe03be2 100644 --- a/tests/TestCase/View/StringTemplateTest.php +++ b/tests/TestCase/View/StringTemplateTest.php @@ -124,7 +124,7 @@ public function testLoadPlugin() { /** * Test that loading non-existing templates causes errors. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @expectedExceptionMessage Could not load configuration file */ public function testLoadErrorNoFile() { diff --git a/tests/TestCase/View/ViewTest.php b/tests/TestCase/View/ViewTest.php index f88a289596c..c5e0843db76 100644 --- a/tests/TestCase/View/ViewTest.php +++ b/tests/TestCase/View/ViewTest.php @@ -543,7 +543,7 @@ public function testGetViewFileNames() { /** * Test that getViewFileName() protects against malicious directory traversal. * - * @expectedException Cake\Core\Error\Exception + * @expectedException Cake\Core\Exception\Exception * @return void */ public function testGetViewFileNameDirectoryTraversal() { @@ -642,7 +642,7 @@ public function testGetLayoutFileNamePrefix() { /** * Test that getLayoutFileName() protects against malicious directory traversal. * - * @expectedException Cake\Core\Error\Exception + * @expectedException Cake\Core\Exception\Exception * @return void */ public function testGetLayoutFileNameDirectoryTraversal() { @@ -1467,7 +1467,7 @@ public function testNestedBlocks() { /** * Test that starting the same block twice throws an exception * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testStartBlocksTwice() { @@ -1479,7 +1479,7 @@ public function testStartBlocksTwice() { * Test that an exception gets thrown when you leave a block open at the end * of a view. * - * @expectedException \Cake\Core\Error\Exception + * @expectedException \Cake\Core\Exception\Exception * @return void */ public function testExceptionOnOpenBlock() {