Browse Source

Fix malformed/missing @throws docblock tags (split into multiple tags, add missing leading backslashes and sub-namespaces, etc)

ndm2 12 years ago
parent
commit
31d36c00a5

+ 1 - 1
src/Cache/CacheEngine.php

@@ -200,7 +200,7 @@ abstract class CacheEngine {
  *
  * @param string $key the key passed over
  * @return mixed string $key or false
- * @throws InvalidArgumentException If key's value is empty
+ * @throws \InvalidArgumentException If key's value is empty
  */
 	protected function _key($key) {
 		$key = $this->key($key);

+ 2 - 2
src/Console/Command/TestShell.php

@@ -167,7 +167,7 @@ class TestShell extends Shell {
  * Initialization method installs PHPUnit and loads all plugins
  *
  * @return void
- * @throws Exception
+ * @throws \Exception
  */
 	public function initialize() {
 		$this->_dispatcher = new TestSuiteDispatcher();
@@ -339,7 +339,7 @@ class TestShell extends Shell {
  * @param string $category
  * @param boolean $throwOnMissingFile
  * @return array [type, case]
- * @throws Exception
+ * @throws \Exception
  */
 	protected function _mapFileToCase($file, $category, $throwOnMissingFile = true) {
 		if (!$category || (substr($file, -4) !== '.php')) {

+ 1 - 1
src/Database/Query.php

@@ -1330,7 +1330,7 @@ class Query implements ExpressionInterface, IteratorAggregate {
  * @param array $columns The columns to insert into.
  * @param array $types A map between columns & their datatypes.
  * @return Query
- * @throws RuntimeException When there are 0 columns.
+ * @throws \RuntimeException When there are 0 columns.
  */
 	public function insert($columns, $types = []) {
 		if (empty($columns)) {

+ 1 - 1
src/Event/EventManager.php

@@ -93,7 +93,7 @@ class EventManager {
  * the order of insertion.
  *
  * @return void
- * @throws InvalidArgumentException When event key is missing or callable is not an
+ * @throws \InvalidArgumentException When event key is missing or callable is not an
  *   instance of Cake\Event\EventListener.
  */
 	public function attach($callable, $eventKey = null, $options = array()) {

+ 1 - 1
src/Network/Socket.php

@@ -362,7 +362,7 @@ class Socket {
  * @param string $clientOrServer can be one of 'client', 'server'. Default is 'client'
  * @param boolean $enable enable or disable encryption. Default is true (enable)
  * @return boolean True on success
- * @throws InvalidArgumentException When an invalid encryption scheme is chosen.
+ * @throws \InvalidArgumentException When an invalid encryption scheme is chosen.
  * @throws \Cake\Error\SocketException When attempting to enable SSL/TLS fails
  * @see stream_socket_enable_crypto
  */

+ 1 - 1
src/ORM/Associations.php

@@ -171,7 +171,7 @@ class Associations {
  * @param boolean $owningSide Compared with association classes'
  *   isOwningSide method.
  * @return boolean Success
- * @throws InvalidArgumentException When an unknown alias is used.
+ * @throws \InvalidArgumentException When an unknown alias is used.
  */
 	protected function _saveAssociations($table, $entity, $associations, $options, $owningSide) {
 		unset($options['associated']);

+ 2 - 2
src/TestSuite/Fixture/FixtureManager.php

@@ -119,7 +119,7 @@ class FixtureManager {
  *
  * @param \Cake\TestSuite\Testcase $test The test suite to load fixtures for.
  * @return void
- * @throws UnexpectedValueException when a referenced fixture does not exist.
+ * @throws \UnexpectedValueException when a referenced fixture does not exist.
  */
 	protected function _loadFixtures($test) {
 		if (empty($test->fixtures)) {
@@ -265,7 +265,7 @@ class FixtureManager {
  * @param DataSource $db DataSource instance or leave null to get DataSource from the fixture
  * @param boolean $dropTables Whether or not tables should be dropped and re-created.
  * @return void
- * @throws UnexpectedValueException if $name is not a previously loaded class
+ * @throws \UnexpectedValueException if $name is not a previously loaded class
  */
 	public function loadSingle($name, $db = null, $dropTables = true) {
 		if (isset($this->_fixtureMap[$name])) {

+ 1 - 1
src/TestSuite/TestRunner.php

@@ -91,7 +91,7 @@ class TestRunner extends \PHPUnit_TextUI_TestRunner {
  *
  * @param array $arguments
  * @return mixed instance of a fixture manager.
- * @throws RuntimeException When fixture manager class cannot be loaded.
+ * @throws \RuntimeException When fixture manager class cannot be loaded.
  */
 	protected function _getFixtureManager($arguments) {
 		if (isset($arguments['fixtureManager'])) {

+ 1 - 1
src/View/Helper/FormHelper.php

@@ -2798,7 +2798,7 @@ class FormHelper extends Helper {
  *
  * @param mixed $data The data to get a context provider for.
  * @return mixed Context provider.
- * @throws RuntimeException when the context class does not implement the
+ * @throws \RuntimeException when the context class does not implement the
  *   ContextInterface.
  */
 	protected function _getContext($data = []) {

+ 1 - 1
src/View/HelperRegistry.php

@@ -59,7 +59,7 @@ class HelperRegistry extends ObjectRegistry {
  *
  * @param string $helper The helper name to be loaded
  * @return boolean whether the helper could be loaded or not
- * @throws MissingHelperException When a helper could not be found.
+ * @throws \Cake\Error\MissingHelperException When a helper could not be found.
  *    App helpers are searched, and then plugin helpers.
  */
 	public function __isset($helper) {

+ 2 - 2
src/View/View.php

@@ -690,8 +690,8 @@ class View extends Object {
  *
  * @param string $name The view or element to 'extend' the current one with.
  * @return void
- * @throws LogicException when you extend a view with itself or make extend loops.
- * @throws LogicException when you extend an element which doesn't exist
+ * @throws \LogicException when you extend a view with itself or make extend loops.
+ * @throws \LogicException when you extend an element which doesn't exist
  */
 	public function extend($name) {
 		if ($name[0] === '/' || $this->_currentType === static::TYPE_VIEW) {

+ 1 - 1
tests/Fixture/FixturizedTestCase.php

@@ -55,7 +55,7 @@ class FixturizedTestCase extends TestCase {
  * test that a fixtures are unoaded even if the test throws exceptions
  *
  * @return void
- * @throws Exception
+ * @throws \Exception
  */
 	public function testThrowException() {
 		throw new \Exception();

+ 2 - 2
tests/test_app/TestApp/Controller/PagesController.php

@@ -50,8 +50,8 @@ class PagesController extends AppController {
  *
  * @param mixed What page to display
  * @return void
- * @throws \Cake\Error\NotFoundException When the view file could not be found
- *	or Cake\Error\MissingViewException in debug mode.
+ * @throws \Cake\Error\NotFoundException When the view file could not be found.
+ * @throws \Cake\Error\MissingViewException in debug mode.
  */
 	public function display() {
 		$path = func_get_args();