Skip to content

Commit

Permalink
Fix malformed/missing @throws docblock tags (split into multiple tags…
Browse files Browse the repository at this point in the history
…, add missing leading backslashes and sub-namespaces, etc)
  • Loading branch information
ndm2 committed Feb 22, 2014
1 parent 225f433 commit 31d36c0
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/Cache/CacheEngine.php
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/Console/Command/TestShell.php
Expand Up @@ -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();
Expand Down Expand Up @@ -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')) {
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Query.php
Expand Up @@ -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)) {
Expand Down
2 changes: 1 addition & 1 deletion src/Event/EventManager.php
Expand Up @@ -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()) {
Expand Down
2 changes: 1 addition & 1 deletion src/Network/Socket.php
Expand Up @@ -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
*/
Expand Down
2 changes: 1 addition & 1 deletion src/ORM/Associations.php
Expand Up @@ -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']);
Expand Down
4 changes: 2 additions & 2 deletions src/TestSuite/Fixture/FixtureManager.php
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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])) {
Expand Down
2 changes: 1 addition & 1 deletion src/TestSuite/TestRunner.php
Expand Up @@ -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'])) {
Expand Down
2 changes: 1 addition & 1 deletion src/View/Helper/FormHelper.php
Expand Up @@ -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 = []) {
Expand Down
2 changes: 1 addition & 1 deletion src/View/HelperRegistry.php
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions src/View/View.php
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion tests/Fixture/FixturizedTestCase.php
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions tests/test_app/TestApp/Controller/PagesController.php
Expand Up @@ -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();
Expand Down

0 comments on commit 31d36c0

Please sign in to comment.