Permalink
Browse files

Fix malformed/missing @throws docblock tags (split into multiple tags…

…, add missing leading backslashes and sub-namespaces, etc)
  • Loading branch information...
1 parent 225f433 commit 31d36c00a5a22523ab6bf8662d98db4fecbdc61e @ndm2 ndm2 committed Feb 20, 2014
@@ -200,7 +200,7 @@ public function key($key) {
*
* @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);
@@ -167,7 +167,7 @@ public function getOptionParser() {
* 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 @@ public function available() {
* @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')) {
@@ -1330,7 +1330,7 @@ protected function _stringifyExpressions(array $expressions, ValueBinder $genera
* @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)) {
@@ -93,7 +93,7 @@ public static function instance($manager = null) {
* 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()) {
@@ -362,7 +362,7 @@ public function reset($state = null) {
* @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
*/
@@ -171,7 +171,7 @@ public function saveChildren(Table $table, Entity $entity, $associations, $optio
* @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']);
@@ -119,7 +119,7 @@ protected function _initDb() {
*
* @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 @@ public function unload(TestCase $test) {
* @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])) {
@@ -91,7 +91,7 @@ protected function createTestResult() {
*
* @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'])) {
@@ -2798,7 +2798,7 @@ public function context() {
*
* @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 = []) {
@@ -59,7 +59,7 @@ public function __construct(View $view) {
*
* @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) {
View
@@ -690,8 +690,8 @@ public function end() {
*
* @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) {
@@ -55,7 +55,7 @@ public function testSkipIfFalse() {
* test that a fixtures are unoaded even if the test throws exceptions
*
* @return void
- * @throws Exception
+ * @throws \Exception
*/
public function testThrowException() {
throw new \Exception();
@@ -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();

0 comments on commit 31d36c0

Please sign in to comment.