From ba4afcc074a53239476bbe8471cd06c010dcf583 Mon Sep 17 00:00:00 2001 From: mark_story Date: Thu, 12 Sep 2013 20:14:11 -0400 Subject: [PATCH 01/13] Fix incorrectly encoded address fields. Address fields cannot contain : or " it causes a number of mail servers/clients to be confused. Fixes #4058 --- lib/Cake/Network/Email/CakeEmail.php | 11 ++++++--- .../Test/Case/Network/Email/CakeEmailTest.php | 23 +++++++++++++++++++ 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/lib/Cake/Network/Email/CakeEmail.php b/lib/Cake/Network/Email/CakeEmail.php index 3d6d8a551..1b5f59f21 100644 --- a/lib/Cake/Network/Email/CakeEmail.php +++ b/lib/Cake/Network/Email/CakeEmail.php @@ -762,6 +762,10 @@ class CakeEmail { /** * Format addresses * + * If the address contains non alphanumeric/whitespace characters, it will + * be quoted as characters like `:` and `,` are known to cause issues + * in address header fields. + * * @param array $address * @return array */ @@ -771,10 +775,11 @@ class CakeEmail { if ($email === $alias) { $return[] = $email; } else { - if (strpos($alias, ',') !== false) { - $alias = '"' . $alias . '"'; + $encoded = $this->_encode($alias); + if ($encoded === $alias && preg_match('/[^a-z0-9 ]/i', $encoded)) { + $encoded = '"' . str_replace('"', '\"', $encoded) . '"'; } - $return[] = sprintf('%s <%s>', $this->_encode($alias), $email); + $return[] = sprintf('%s <%s>', $encoded, $email); } } return $return; diff --git a/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php b/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php index a64821cac..6e7f0396b 100644 --- a/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php +++ b/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php @@ -178,6 +178,25 @@ class CakeEmailTest extends CakeTestCase { $result = $this->CakeEmail->from(array('cake@cakephp.org' => 'CakePHP', 'fail@cakephp.org' => 'From can only be one address')); } +/** + * Test that from addresses using colons work. + * + * @return void + */ + public function testFromWithColonsAndQuotes() { + $address = array( + 'info@example.com' => '70:20:00 " Forum' + ); + $this->CakeEmail->from($address); + $this->assertEquals($address, $this->CakeEmail->from()); + $this->CakeEmail->to('info@example.com') + ->subject('Test email') + ->transport('Debug'); + + $result = $this->CakeEmail->send(); + $this->assertContains('From: "70:20:00 \" Forum" ', $result['headers']); + } + /** * testSender method * @@ -371,6 +390,10 @@ class CakeEmailTest extends CakeTestCase { $expected = array('"Last, First" '); $this->assertSame($expected, $result); + $result = $this->CakeEmail->formatAddress(array('me@example.com' => '"Last" First')); + $expected = array('"\"Last\" First" '); + $this->assertSame($expected, $result); + $result = $this->CakeEmail->formatAddress(array('me@example.com' => 'Last First')); $expected = array('Last First '); $this->assertSame($expected, $result); From 0a7d5b9c3ff3bb60aa0e69b39bac64198bca9451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=BCrth?= Date: Fri, 13 Sep 2013 03:07:46 +0200 Subject: [PATCH 02/13] Corrected a CakeLog example in a DocBlock about scopes and types > Its important to remember that > when using scopes you must also define the `types` of log messages > that a logger will handle. Failing to do so will result in the logger > catching all log messages even if the scope is incorrect. According to this the previous example would fail to log correctly. --- lib/Cake/Log/CakeLog.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Cake/Log/CakeLog.php b/lib/Cake/Log/CakeLog.php index f7b932051..8052ea2cd 100644 --- a/lib/Cake/Log/CakeLog.php +++ b/lib/Cake/Log/CakeLog.php @@ -169,6 +169,7 @@ class CakeLog { * {{{ * CakeLog::config('payments', array( * 'engine' => 'File', + * 'types' => array('info', 'error', 'warning'), * 'scopes' => array('payment', 'order') * )); * }}} From 7379d32b596e125fdfb340396bf658c65194ba49 Mon Sep 17 00:00:00 2001 From: mark_story Date: Fri, 13 Sep 2013 23:05:40 -0400 Subject: [PATCH 03/13] Simplify & fix phone number validation. The changes made in fa3d4a0bb5a25c461b4a42a4dbaf9829ee1afd93 tightened the area code validation too much and excluded at least one valid area code. This change replaces that with a more generic solution that does not attempt to exclude non-allocated but potentially valid area codes. Fixes #4066 --- lib/Cake/Test/Case/Utility/ValidationTest.php | 6 +++--- lib/Cake/Utility/Validation.php | 14 +++++++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/lib/Cake/Test/Case/Utility/ValidationTest.php b/lib/Cake/Test/Case/Utility/ValidationTest.php index 04d0884e5..a9133676b 100644 --- a/lib/Cake/Test/Case/Utility/ValidationTest.php +++ b/lib/Cake/Test/Case/Utility/ValidationTest.php @@ -2134,9 +2134,6 @@ class ValidationTest extends CakeTestCase { // invalid area-codes $this->assertFalse(Validation::phone('1-(511)-999-9999')); - $this->assertFalse(Validation::phone('1-(379)-999-9999')); - $this->assertFalse(Validation::phone('1-(962)-999-9999')); - $this->assertFalse(Validation::phone('1-(295)-999-9999')); $this->assertFalse(Validation::phone('1-(555)-999-9999')); // invalid exhange @@ -2147,10 +2144,13 @@ class ValidationTest extends CakeTestCase { $this->assertFalse(Validation::phone('1-(222)-555-0122')); // valid phone numbers + $this->assertTrue(Validation::phone('416-428-1234')); $this->assertTrue(Validation::phone('1-(369)-333-4444')); $this->assertTrue(Validation::phone('1-(973)-333-4444')); $this->assertTrue(Validation::phone('1-(313)-555-9999')); $this->assertTrue(Validation::phone('1-(222)-555-0299')); + $this->assertTrue(Validation::phone('508-428-1234')); + $this->assertTrue(Validation::phone('1-(508)-232-9651')); $this->assertTrue(Validation::phone('1 (222) 333 4444')); $this->assertTrue(Validation::phone('+1 (222) 333 4444')); diff --git a/lib/Cake/Utility/Validation.php b/lib/Cake/Utility/Validation.php index 247930364..cf2811a8d 100644 --- a/lib/Cake/Utility/Validation.php +++ b/lib/Cake/Utility/Validation.php @@ -620,11 +620,19 @@ class Validation { case 'all': // includes all NANPA members. // see http://en.wikipedia.org/wiki/North_American_Numbering_Plan#List_of_NANPA_countries_and_territories - $regex = '/^(?:(?:\+?1\s*(?:[.-]\s*)?)?(?:\(\s*([2-9]1[02-9]|[2-9][02-8]1|3[02-689][0-9]|9[02-57-9][0-9]|[246-8][02-46-8][02-46-9])\s*\)'; - $regex .= '|(55[0-46-9]|5[0-46-9][5]|[0-46-9]55|[2-9]1[02-9]|[2-9][02-8]1|[2-46-9][02-46-8][02-46-9]))\s*(?:[.-]\s*)?)'; - $regex .= '(?!(555(?:\s*(?:[.|\-|\s]\s*))(01([0-9][0-9])|1212)))'; + $regex = '/^(?:(?:\+?1\s*(?:[.-]\s*)?)?'; + + // Area code 555, X11 is not allowed. + $areaCode = '(?![2-9]11)(?!555)([2-9][0-8][0-9])'; + $regex .= '(?:\(\s*' . $areaCode . '\s*\)|' . $areaCode . ')'; + $regex .= '\s*(?:[.-]\s*)?)'; + + // Exchange and 555-XXXX numbers + $regex .= '(?!(555(?:\s*(?:[.\-\s]\s*))(01([0-9][0-9])|1212)))'; $regex .= '(?!(555(01([0-9][0-9])|1212)))'; $regex .= '([2-9]1[02-9]|[2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\s*(?:[.-]\s*)'; + + // Local number and extension $regex .= '?([0-9]{4})'; $regex .= '(?:\s*(?:#|x\.?|ext\.?|extension)\s*(\d+))?$/'; break; From 085636ea1bb2a57b084456e776bfada01dee71df Mon Sep 17 00:00:00 2001 From: mark_story Date: Sat, 14 Sep 2013 22:07:19 -0400 Subject: [PATCH 04/13] Update version number to 2.4.1 --- lib/Cake/VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/VERSION.txt b/lib/Cake/VERSION.txt index e1a97770d..fdd823fce 100644 --- a/lib/Cake/VERSION.txt +++ b/lib/Cake/VERSION.txt @@ -17,4 +17,4 @@ // @license http://www.opensource.org/licenses/mit-license.php MIT License // +--------------------------------------------------------------------------------------------+ // //////////////////////////////////////////////////////////////////////////////////////////////////// -2.4.0 +2.4.1 From 910ee3371027620f2140a7843006550c0fed7752 Mon Sep 17 00:00:00 2001 From: euromark Date: Mon, 16 Sep 2013 00:40:37 +0200 Subject: [PATCH 05/13] remove wrong trailing slash --- lib/Cake/Error/ExceptionRenderer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Error/ExceptionRenderer.php b/lib/Cake/Error/ExceptionRenderer.php index 09ee6db08..76f0ddff5 100644 --- a/lib/Cake/Error/ExceptionRenderer.php +++ b/lib/Cake/Error/ExceptionRenderer.php @@ -298,7 +298,7 @@ class ExceptionRenderer { protected function _outputMessageSafe($template) { $this->controller->layoutPath = null; $this->controller->subDir = null; - $this->controller->viewPath = 'Errors/'; + $this->controller->viewPath = 'Errors'; $this->controller->layout = 'error'; $this->controller->helpers = array('Form', 'Html', 'Session'); From c8b18164c5f61d1f86035084d687e8660779cbbf Mon Sep 17 00:00:00 2001 From: euromark Date: Mon, 16 Sep 2013 00:49:01 +0200 Subject: [PATCH 06/13] fix test --- lib/Cake/Test/Case/Error/ExceptionRendererTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Test/Case/Error/ExceptionRendererTest.php b/lib/Cake/Test/Case/Error/ExceptionRendererTest.php index cf2a0631e..1abf76ced 100644 --- a/lib/Cake/Test/Case/Error/ExceptionRendererTest.php +++ b/lib/Cake/Test/Case/Error/ExceptionRendererTest.php @@ -761,7 +761,7 @@ class ExceptionRendererTest extends CakeTestCase { $ExceptionRenderer->render(); $this->assertEquals('', $ExceptionRenderer->controller->layoutPath); $this->assertEquals('', $ExceptionRenderer->controller->subDir); - $this->assertEquals('Errors/', $ExceptionRenderer->controller->viewPath); + $this->assertEquals('Errors', $ExceptionRenderer->controller->viewPath); } /** From 3a4a0e54ebe74734556762b683a8f61e21f5ef11 Mon Sep 17 00:00:00 2001 From: Jerome Roethlisberger Date: Mon, 16 Sep 2013 16:13:58 +0200 Subject: [PATCH 07/13] Improved wording of Model::invalidFields() Inspired by http://book.cakephp.org/2.0/en/models/data-validation/validating-data-from-the-controller.html#validating-data-from-the-controller --- lib/Cake/Model/Model.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/Cake/Model/Model.php b/lib/Cake/Model/Model.php index 50d9d6a23..950eeaa72 100644 --- a/lib/Cake/Model/Model.php +++ b/lib/Cake/Model/Model.php @@ -3142,10 +3142,13 @@ class Model extends Object implements CakeEventListener { } /** - * Returns an array of fields that have failed validation. On the current model. + * Returns an array of fields that have failed the validation of the current model. + * + * Additionally it populates the validationErrors property of the model with the same array. * * @param string $options An optional array of custom options to be made available in the beforeValidate callback - * @return array Array of invalid fields + * @return array Array of invalid fields and its error messages + * * @see Model::validates() */ public function invalidFields($options = array()) { From 4ea6c158d1519677d4af6f2cf2d7f766d8efe2f8 Mon Sep 17 00:00:00 2001 From: mark_story Date: Mon, 16 Sep 2013 12:04:29 -0400 Subject: [PATCH 08/13] Fix wording and remove trailing spaces. --- lib/Cake/Model/Model.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/Cake/Model/Model.php b/lib/Cake/Model/Model.php index 950eeaa72..f414f2d65 100644 --- a/lib/Cake/Model/Model.php +++ b/lib/Cake/Model/Model.php @@ -3143,12 +3143,11 @@ class Model extends Object implements CakeEventListener { /** * Returns an array of fields that have failed the validation of the current model. - * + * * Additionally it populates the validationErrors property of the model with the same array. * * @param string $options An optional array of custom options to be made available in the beforeValidate callback - * @return array Array of invalid fields and its error messages - * + * @return array Array of invalid fields and their error messages * @see Model::validates() */ public function invalidFields($options = array()) { From 37c9832dc19ae4512058a18029ceb193ae6cfda6 Mon Sep 17 00:00:00 2001 From: spiliot Date: Tue, 17 Sep 2013 00:48:09 +0300 Subject: [PATCH 09/13] removed duplicate test case Was exact duplicate of case starting line 692 --- lib/Cake/Test/Case/Network/CakeRequestTest.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/Cake/Test/Case/Network/CakeRequestTest.php b/lib/Cake/Test/Case/Network/CakeRequestTest.php index 06e4f8151..b5cbf48da 100644 --- a/lib/Cake/Test/Case/Network/CakeRequestTest.php +++ b/lib/Cake/Test/Case/Network/CakeRequestTest.php @@ -697,10 +697,6 @@ class CakeRequestTest extends CakeTestCase { $result = $request->referer(false); $this->assertSame($result, Configure::read('App.fullBaseUrl') . '/some/path'); - $_SERVER['HTTP_REFERER'] = Configure::read('App.fullBaseUrl') . '/some/path'; - $result = $request->referer(true); - $this->assertSame($result, '/some/path'); - $_SERVER['HTTP_REFERER'] = Configure::read('App.fullBaseUrl') . '/recipes/add'; $result = $request->referer(true); $this->assertSame($result, '/recipes/add'); From 5ec9b145bf5ba9132bb663e0b889a2eb89824a8b Mon Sep 17 00:00:00 2001 From: mark_story Date: Mon, 16 Sep 2013 22:38:07 -0400 Subject: [PATCH 10/13] Fix label element for attributes not matching their inputs. Radio elements would contain ModelModelFieldValue instead of ModelFieldValue like they should. This was caused by the fix for #3936 and lack of tests for create() + radio(). Fixes #4071 --- .../Test/Case/View/Helper/FormHelperTest.php | 21 +++++++++++++++++++ lib/Cake/View/Helper/FormHelper.php | 4 +++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php index ddd1f9fd9..c4989159d 100644 --- a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php @@ -4097,6 +4097,27 @@ class FormHelperTest extends CakeTestCase { ); } +/** + * Test that label id's match the input element id's when radio is called after create(). + * + * @return void + */ + public function testRadioWithCreate() { + $this->Form->create('Model'); + $result = $this->Form->radio('recipient', + array('1' => '1', '2' => '2', '3' => '3'), + array('legend' => false, 'value' => '1') + ); + $this->assertTextNotContains( + '', + $result + ); + $this->assertTextContains( + '', + $result + ); + } + /** * testSelect method * diff --git a/lib/Cake/View/Helper/FormHelper.php b/lib/Cake/View/Helper/FormHelper.php index d6583ac63..6cb892961 100644 --- a/lib/Cake/View/Helper/FormHelper.php +++ b/lib/Cake/View/Helper/FormHelper.php @@ -1520,7 +1520,9 @@ class FormHelper extends AppHelper { ); if ($label) { - $optTitle = $this->label($tagName, $optTitle, is_array($label) ? $label : null); + $labelOpts = is_array($label) ? $label : array(); + $labelOpts += array('for' => $tagName); + $optTitle = $this->label($tagName, $optTitle, $labelOpts); } if (is_array($between)) { From 382f75dbfc914046e6c211f46269a79b6ad0979b Mon Sep 17 00:00:00 2001 From: euromark Date: Tue, 17 Sep 2013 14:44:34 +0200 Subject: [PATCH 11/13] cs corrections, bool to boolean and int to integer. --- lib/Cake/Configure/IniReader.php | 2 +- lib/Cake/Configure/PhpReader.php | 2 +- lib/Cake/Console/ConsoleInput.php | 4 +- lib/Cake/Controller/Controller.php | 2 +- lib/Cake/Event/CakeEventManager.php | 2 +- lib/Cake/Log/Engine/SyslogLog.php | 2 +- .../Datasource/Session/DatabaseSession.php | 2 +- lib/Cake/Model/ModelValidator.php | 2 +- .../Model/Validator/CakeValidationSet.php | 2 +- lib/Cake/Network/CakeResponse.php | 4 +- lib/Cake/Routing/DispatcherFilter.php | 2 +- lib/Cake/Routing/Filter/AssetDispatcher.php | 2 +- lib/Cake/Routing/Filter/CacheDispatcher.php | 2 +- lib/Cake/Routing/Router.php | 2 +- .../Console/Command/Task/FixtureTaskTest.php | 2 +- .../Controller/Component/Acl/DbAclTest.php | 4 +- .../Component/AuthComponentTest.php | 4 +- lib/Cake/Test/Case/Model/AclNodeTest.php | 4 +- .../Model/Behavior/TranslateBehaviorTest.php | 2 +- .../Model/Behavior/TreeBehaviorAfterTest.php | 2 +- .../Model/Behavior/TreeBehaviorNumberTest.php | 2 +- .../Model/Behavior/TreeBehaviorScopedTest.php | 2 +- .../Model/Behavior/TreeBehaviorUuidTest.php | 2 +- .../Model/Datasource/Database/MysqlTest.php | 2 +- .../Datasource/Database/PostgresTest.php | 4 +- .../Datasource/Database/SqlserverTest.php | 6 +- .../Case/Model/Datasource/DboSourceTest.php | 2 +- lib/Cake/Test/Case/Model/ModelTestBase.php | 4 +- lib/Cake/Test/Case/Model/models.php | 64 +++++++++---------- .../Test/Case/Network/CakeRequestTest.php | 2 +- lib/Cake/Test/Case/Routing/DispatcherTest.php | 2 +- .../Test/Case/Utility/ClassRegistryTest.php | 2 +- lib/Cake/Test/Case/Utility/SanitizeTest.php | 2 +- lib/Cake/Test/Case/Utility/XmlTest.php | 2 +- .../Test/Case/View/Helper/FormHelperTest.php | 18 +++--- lib/Cake/Test/Case/View/HelperTest.php | 8 +-- lib/Cake/Utility/ObjectCollection.php | 2 +- lib/Cake/View/Helper/FormHelper.php | 2 +- 38 files changed, 89 insertions(+), 89 deletions(-) diff --git a/lib/Cake/Configure/IniReader.php b/lib/Cake/Configure/IniReader.php index 2ed2ff01f..66e009404 100644 --- a/lib/Cake/Configure/IniReader.php +++ b/lib/Cake/Configure/IniReader.php @@ -155,7 +155,7 @@ class IniReader implements ConfigReaderInterface { * @param string $key The identifier to write to. If the key has a . it will be treated * as a plugin prefix. * @param array $data The data to convert to ini file. - * @return int Bytes saved. + * @return integer Bytes saved. */ public function dump($key, $data) { $result = array(); diff --git a/lib/Cake/Configure/PhpReader.php b/lib/Cake/Configure/PhpReader.php index b3446247c..c1eae3e46 100644 --- a/lib/Cake/Configure/PhpReader.php +++ b/lib/Cake/Configure/PhpReader.php @@ -83,7 +83,7 @@ class PhpReader implements ConfigReaderInterface { * @param string $key The identifier to write to. If the key has a . it will be treated * as a plugin prefix. * @param array $data Data to dump. - * @return int Bytes saved. + * @return integer Bytes saved. */ public function dump($key, $data) { $contents = '_input); diff --git a/lib/Cake/Controller/Controller.php b/lib/Cake/Controller/Controller.php index daf2cf2cc..13d36328c 100644 --- a/lib/Cake/Controller/Controller.php +++ b/lib/Cake/Controller/Controller.php @@ -718,7 +718,7 @@ class Controller extends Object implements CakeEventListener { * * @param string $modelClass Name of model class to load * @param integer|string $id Initial ID the instanced model class should have - * @return bool True if the model was found + * @return boolean True if the model was found * @throws MissingModelException if the model class cannot be found. */ public function loadModel($modelClass = null, $id = null) { diff --git a/lib/Cake/Event/CakeEventManager.php b/lib/Cake/Event/CakeEventManager.php index 57a95104f..799e0b733 100644 --- a/lib/Cake/Event/CakeEventManager.php +++ b/lib/Cake/Event/CakeEventManager.php @@ -32,7 +32,7 @@ class CakeEventManager { /** * The default priority queue value for new, attached listeners * - * @var int + * @var integer */ public static $defaultPriority = 10; diff --git a/lib/Cake/Log/Engine/SyslogLog.php b/lib/Cake/Log/Engine/SyslogLog.php index cf5701de1..4c6147903 100644 --- a/lib/Cake/Log/Engine/SyslogLog.php +++ b/lib/Cake/Log/Engine/SyslogLog.php @@ -146,7 +146,7 @@ class SyslogLog extends BaseLog { * * @param integer $priority * @param string $message - * @return bool + * @return boolean */ protected function _write($priority, $message) { return syslog($priority, $message); diff --git a/lib/Cake/Model/Datasource/Session/DatabaseSession.php b/lib/Cake/Model/Datasource/Session/DatabaseSession.php index 8a65ddef2..980719767 100644 --- a/lib/Cake/Model/Datasource/Session/DatabaseSession.php +++ b/lib/Cake/Model/Datasource/Session/DatabaseSession.php @@ -38,7 +38,7 @@ class DatabaseSession implements CakeSessionHandlerInterface { /** * Number of seconds to mark the session as expired * - * @var int + * @var integer */ protected $_timeout; diff --git a/lib/Cake/Model/ModelValidator.php b/lib/Cake/Model/ModelValidator.php index f85133881..bbc54c8da 100644 --- a/lib/Cake/Model/ModelValidator.php +++ b/lib/Cake/Model/ModelValidator.php @@ -526,7 +526,7 @@ class ModelValidator implements ArrayAccess, IteratorAggregate, Countable { /** * Returns the number of fields having validation rules * - * @return int + * @return integer */ public function count() { $this->_parseRules(); diff --git a/lib/Cake/Model/Validator/CakeValidationSet.php b/lib/Cake/Model/Validator/CakeValidationSet.php index e17e0213a..3913d0c67 100644 --- a/lib/Cake/Model/Validator/CakeValidationSet.php +++ b/lib/Cake/Model/Validator/CakeValidationSet.php @@ -359,7 +359,7 @@ class CakeValidationSet implements ArrayAccess, IteratorAggregate, Countable { /** * Returns the number of rules in this set * - * @return int + * @return integer */ public function count() { return count($this->_rules); diff --git a/lib/Cake/Network/CakeResponse.php b/lib/Cake/Network/CakeResponse.php index c63623d17..3db176327 100644 --- a/lib/Cake/Network/CakeResponse.php +++ b/lib/Cake/Network/CakeResponse.php @@ -848,7 +848,7 @@ class CakeResponse { * If called with no parameters, this function will return the current max-age value if any * * @param integer $seconds if null, the method will return the current s-maxage value - * @return int + * @return integer */ public function sharedMaxAge($seconds = null) { if ($seconds !== null) { @@ -868,7 +868,7 @@ class CakeResponse { * If called with no parameters, this function will return the current max-age value if any * * @param integer $seconds if null, the method will return the current max-age value - * @return int + * @return integer */ public function maxAge($seconds = null) { if ($seconds !== null) { diff --git a/lib/Cake/Routing/DispatcherFilter.php b/lib/Cake/Routing/DispatcherFilter.php index ec8e96081..8aa703c97 100644 --- a/lib/Cake/Routing/DispatcherFilter.php +++ b/lib/Cake/Routing/DispatcherFilter.php @@ -31,7 +31,7 @@ abstract class DispatcherFilter implements CakeEventListener { /** * Default priority for all methods in this filter * - * @var int + * @var integer */ public $priority = 10; diff --git a/lib/Cake/Routing/Filter/AssetDispatcher.php b/lib/Cake/Routing/Filter/AssetDispatcher.php index 2c8d165b0..21aeffd60 100644 --- a/lib/Cake/Routing/Filter/AssetDispatcher.php +++ b/lib/Cake/Routing/Filter/AssetDispatcher.php @@ -31,7 +31,7 @@ class AssetDispatcher extends DispatcherFilter { * Default priority for all methods in this filter * This filter should run before the request gets parsed by router * - * @var int + * @var integer */ public $priority = 9; diff --git a/lib/Cake/Routing/Filter/CacheDispatcher.php b/lib/Cake/Routing/Filter/CacheDispatcher.php index 9219005bb..109b2cfd8 100644 --- a/lib/Cake/Routing/Filter/CacheDispatcher.php +++ b/lib/Cake/Routing/Filter/CacheDispatcher.php @@ -27,7 +27,7 @@ class CacheDispatcher extends DispatcherFilter { * Default priority for all methods in this filter * This filter should run before the request gets parsed by router * - * @var int + * @var integer */ public $priority = 9; diff --git a/lib/Cake/Routing/Router.php b/lib/Cake/Routing/Router.php index 6d37d3d20..1b1b579bf 100644 --- a/lib/Cake/Routing/Router.php +++ b/lib/Cake/Routing/Router.php @@ -778,7 +778,7 @@ class Router { * or an array specifying any of the following: 'controller', 'action', * and/or 'plugin', in addition to named arguments (keyed array elements), * and standard URL arguments (indexed array elements) - * @param bool|array $full If (bool) true, the full base URL will be prepended to the result. + * @param boolean|array $full If (bool) true, the full base URL will be prepended to the result. * If an array accepts the following keys * - escape - used when making URLs embedded in html escapes query string '&' * - full - if true the full base URL will be prepended. diff --git a/lib/Cake/Test/Case/Console/Command/Task/FixtureTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/FixtureTaskTest.php index b9b6203af..0e4fa41a2 100644 --- a/lib/Cake/Test/Case/Console/Command/Task/FixtureTaskTest.php +++ b/lib/Cake/Test/Case/Console/Command/Task/FixtureTaskTest.php @@ -44,7 +44,7 @@ class FixtureTaskTest extends CakeTestCase { /** * Whether backup global state for each test method or not * - * @var bool false + * @var boolean */ public $backupGlobals = false; diff --git a/lib/Cake/Test/Case/Controller/Component/Acl/DbAclTest.php b/lib/Cake/Test/Case/Controller/Component/Acl/DbAclTest.php index a04cb593c..c29550b01 100644 --- a/lib/Cake/Test/Case/Controller/Component/Acl/DbAclTest.php +++ b/lib/Cake/Test/Case/Controller/Component/Acl/DbAclTest.php @@ -42,7 +42,7 @@ class AclNodeTwoTestBase extends AclNode { /** * cacheSources property * - * @var bool false + * @var boolean */ public $cacheSources = false; } @@ -129,7 +129,7 @@ class PermissionTwoTest extends Permission { /** * cacheQueries property * - * @var bool false + * @var boolean */ public $cacheQueries = false; diff --git a/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php b/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php index 73366e017..1fcf626bb 100644 --- a/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php @@ -33,7 +33,7 @@ class TestAuthComponent extends AuthComponent { /** * testStop property * - * @var bool false + * @var boolean */ public $testStop = false; @@ -271,7 +271,7 @@ class AuthComponentTest extends CakeTestCase { /** * initialized property * - * @var bool false + * @var boolean */ public $initialized = false; diff --git a/lib/Cake/Test/Case/Model/AclNodeTest.php b/lib/Cake/Test/Case/Model/AclNodeTest.php index 0fa8b3e8c..d8986ea81 100644 --- a/lib/Cake/Test/Case/Model/AclNodeTest.php +++ b/lib/Cake/Test/Case/Model/AclNodeTest.php @@ -38,7 +38,7 @@ class DbAclNodeTestBase extends AclNode { /** * cacheSources property * - * @var bool false + * @var boolean */ public $cacheSources = false; } @@ -104,7 +104,7 @@ class DbPermissionTest extends CakeTestModel { /** * cacheQueries property * - * @var bool false + * @var boolean */ public $cacheQueries = false; diff --git a/lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php b/lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php index e4e32c393..bd1462968 100644 --- a/lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php +++ b/lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php @@ -27,7 +27,7 @@ class TranslateBehaviorTest extends CakeTestCase { /** * autoFixtures property * - * @var bool false + * @var boolean */ public $autoFixtures = false; diff --git a/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorAfterTest.php b/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorAfterTest.php index b0e845e74..c5252945b 100644 --- a/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorAfterTest.php +++ b/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorAfterTest.php @@ -32,7 +32,7 @@ class TreeBehaviorAfterTest extends CakeTestCase { /** * Whether backup global state for each test method or not * - * @var bool false + * @var boolean */ public $backupGlobals = false; diff --git a/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorNumberTest.php b/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorNumberTest.php index ae7dc9812..2e1bc3c83 100644 --- a/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorNumberTest.php +++ b/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorNumberTest.php @@ -34,7 +34,7 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * Whether backup global state for each test method or not * - * @var bool false + * @var boolean */ public $backupGlobals = false; diff --git a/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorScopedTest.php b/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorScopedTest.php index 8f809b51e..d617aa70e 100644 --- a/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorScopedTest.php +++ b/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorScopedTest.php @@ -34,7 +34,7 @@ class TreeBehaviorScopedTest extends CakeTestCase { /** * Whether backup global state for each test method or not * - * @var bool false + * @var boolean */ public $backupGlobals = false; diff --git a/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorUuidTest.php b/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorUuidTest.php index 4766b1519..4a7a36763 100644 --- a/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorUuidTest.php +++ b/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorUuidTest.php @@ -35,7 +35,7 @@ class TreeBehaviorUuidTest extends CakeTestCase { /** * Whether backup global state for each test method or not * - * @var bool false + * @var boolean */ public $backupGlobals = false; diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php index 882c71543..8db344ad1 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php @@ -35,7 +35,7 @@ class MysqlTest extends CakeTestCase { /** * autoFixtures property * - * @var bool false + * @var boolean */ public $autoFixtures = false; diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php index 48cc3bc37..937c8ae3d 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php @@ -69,7 +69,7 @@ class PostgresTestModel extends Model { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -150,7 +150,7 @@ class PostgresClientTestModel extends Model { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php index 8a0e1a96f..235e56aef 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php @@ -118,7 +118,7 @@ class SqlserverTestModel extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -184,7 +184,7 @@ class SqlserverClientTestModel extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -250,7 +250,7 @@ class SqlserverTest extends CakeTestCase { /** * autoFixtures property * - * @var bool false + * @var boolean */ public $autoFixtures = false; diff --git a/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php b/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php index 0487f72fe..9c37e91ef 100644 --- a/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php @@ -116,7 +116,7 @@ class DboSourceTest extends CakeTestCase { /** * autoFixtures property * - * @var bool false + * @var boolean */ public $autoFixtures = false; diff --git a/lib/Cake/Test/Case/Model/ModelTestBase.php b/lib/Cake/Test/Case/Model/ModelTestBase.php index 16bffd8b4..f68729158 100644 --- a/lib/Cake/Test/Case/Model/ModelTestBase.php +++ b/lib/Cake/Test/Case/Model/ModelTestBase.php @@ -32,14 +32,14 @@ abstract class BaseModelTest extends CakeTestCase { /** * autoFixtures property * - * @var bool false + * @var boolean */ public $autoFixtures = false; /** * Whether backup global state for each test method or not * - * @var bool false + * @var boolean */ public $backupGlobals = false; diff --git a/lib/Cake/Test/Case/Model/models.php b/lib/Cake/Test/Case/Model/models.php index 51b44ef80..3655ee798 100644 --- a/lib/Cake/Test/Case/Model/models.php +++ b/lib/Cake/Test/Case/Model/models.php @@ -68,7 +68,7 @@ class Test extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -105,7 +105,7 @@ class TestAlias extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -141,7 +141,7 @@ class TestValidate extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -215,7 +215,7 @@ class User extends CakeTestModel { /** * beforeFind() callback used to run ContainableBehaviorTest::testLazyLoad() * - * @return bool + * @return boolean * @throws Exception */ public function beforeFind($queryData) { @@ -278,7 +278,7 @@ class Article extends CakeTestModel { /** * beforeSaveReturn property * - * @var bool true + * @var boolean */ public $beforeSaveReturn = true; @@ -2105,7 +2105,7 @@ class TheVoid extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; } @@ -2127,7 +2127,7 @@ class ValidationTest1 extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -2213,7 +2213,7 @@ class ValidationTest2 extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -3079,7 +3079,7 @@ class TranslatedItem extends CakeTestModel { /** * cacheQueries property * - * @var bool false + * @var boolean */ public $cacheQueries = false; @@ -3116,7 +3116,7 @@ class TranslatedItem2 extends CakeTestModel { /** * cacheQueries property * - * @var bool false + * @var boolean */ public $cacheQueries = false; @@ -3160,7 +3160,7 @@ class TranslatedItemWithTable extends CakeTestModel { /** * cacheQueries property * - * @var bool false + * @var boolean */ public $cacheQueries = false; @@ -3234,7 +3234,7 @@ class TranslatedArticle extends CakeTestModel { /** * cacheQueries property * - * @var bool false + * @var boolean */ public $cacheQueries = false; @@ -3536,7 +3536,7 @@ class TestModel extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -3611,7 +3611,7 @@ class TestModel2 extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; } @@ -3633,7 +3633,7 @@ class TestModel3 extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; } @@ -3662,7 +3662,7 @@ class TestModel4 extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -3746,7 +3746,7 @@ class TestModel4TestModel7 extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -3791,7 +3791,7 @@ class TestModel5 extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -3859,7 +3859,7 @@ class TestModel6 extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -3919,7 +3919,7 @@ class TestModel7 extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -3966,7 +3966,7 @@ class TestModel8 extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -4027,7 +4027,7 @@ class TestModel9 extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -4088,7 +4088,7 @@ class Level extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -4147,7 +4147,7 @@ class Group extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -4207,7 +4207,7 @@ class User2 extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -4279,7 +4279,7 @@ class Category2 extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -4362,7 +4362,7 @@ class Article2 extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -4434,7 +4434,7 @@ class CategoryFeatured2 extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -4482,7 +4482,7 @@ class Featured2 extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -4547,7 +4547,7 @@ class Comment2 extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -4594,7 +4594,7 @@ class ArticleFeatured2 extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -4667,7 +4667,7 @@ class MysqlTestModel extends Model { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; diff --git a/lib/Cake/Test/Case/Network/CakeRequestTest.php b/lib/Cake/Test/Case/Network/CakeRequestTest.php index b5cbf48da..759e5a2dc 100644 --- a/lib/Cake/Test/Case/Network/CakeRequestTest.php +++ b/lib/Cake/Test/Case/Network/CakeRequestTest.php @@ -1052,7 +1052,7 @@ class CakeRequestTest extends CakeTestCase { * Helper function for testing callbacks. * * @param $request - * @return bool + * @return boolean */ public function detectCallback($request) { return (bool)$request->return; diff --git a/lib/Cake/Test/Case/Routing/DispatcherTest.php b/lib/Cake/Test/Case/Routing/DispatcherTest.php index 2d10fa241..5a80c5393 100644 --- a/lib/Cake/Test/Case/Routing/DispatcherTest.php +++ b/lib/Cake/Test/Case/Routing/DispatcherTest.php @@ -341,7 +341,7 @@ class SomePostsController extends AppController { /** * autoRender property * - * @var bool false + * @var boolean */ public $autoRender = false; diff --git a/lib/Cake/Test/Case/Utility/ClassRegistryTest.php b/lib/Cake/Test/Case/Utility/ClassRegistryTest.php index 08d0575d7..ff751fe96 100644 --- a/lib/Cake/Test/Case/Utility/ClassRegistryTest.php +++ b/lib/Cake/Test/Case/Utility/ClassRegistryTest.php @@ -30,7 +30,7 @@ class ClassRegisterModel extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; } diff --git a/lib/Cake/Test/Case/Utility/SanitizeTest.php b/lib/Cake/Test/Case/Utility/SanitizeTest.php index 16bad14b7..991c038b2 100644 --- a/lib/Cake/Test/Case/Utility/SanitizeTest.php +++ b/lib/Cake/Test/Case/Utility/SanitizeTest.php @@ -60,7 +60,7 @@ class SanitizeTest extends CakeTestCase { /** * autoFixtures property * - * @var bool false + * @var boolean */ public $autoFixtures = false; diff --git a/lib/Cake/Test/Case/Utility/XmlTest.php b/lib/Cake/Test/Case/Utility/XmlTest.php index fc9c7c265..acfe4d71d 100644 --- a/lib/Cake/Test/Case/Utility/XmlTest.php +++ b/lib/Cake/Test/Case/Utility/XmlTest.php @@ -84,7 +84,7 @@ class XmlTest extends CakeTestCase { /** * autoFixtures property * - * @var bool false + * @var boolean */ public $autoFixtures = false; diff --git a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php index c4989159d..2ffdfcdbe 100644 --- a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php @@ -53,7 +53,7 @@ class Contact extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -144,7 +144,7 @@ class ContactTagsContact extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -209,7 +209,7 @@ class ContactTag extends Model { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -236,7 +236,7 @@ class UserForm extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -276,7 +276,7 @@ class OpenidUrl extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -331,7 +331,7 @@ class ValidateUser extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -380,7 +380,7 @@ class ValidateProfile extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -439,7 +439,7 @@ class ValidateItem extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -488,7 +488,7 @@ class TestMail extends CakeTestModel { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; diff --git a/lib/Cake/Test/Case/View/HelperTest.php b/lib/Cake/Test/Case/View/HelperTest.php index 945612c91..d50322eba 100644 --- a/lib/Cake/Test/Case/View/HelperTest.php +++ b/lib/Cake/Test/Case/View/HelperTest.php @@ -33,7 +33,7 @@ class HelperTestPost extends Model { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -73,7 +73,7 @@ class HelperTestComment extends Model { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -107,7 +107,7 @@ class HelperTestTag extends Model { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; @@ -138,7 +138,7 @@ class HelperTestPostsTag extends Model { /** * useTable property * - * @var bool false + * @var boolean */ public $useTable = false; diff --git a/lib/Cake/Utility/ObjectCollection.php b/lib/Cake/Utility/ObjectCollection.php index 778e0b2d0..83e3a0143 100644 --- a/lib/Cake/Utility/ObjectCollection.php +++ b/lib/Cake/Utility/ObjectCollection.php @@ -44,7 +44,7 @@ abstract class ObjectCollection { /** * Default object priority. A non zero integer. * - * @var int + * @var integer */ public $defaultPriority = 10; diff --git a/lib/Cake/View/Helper/FormHelper.php b/lib/Cake/View/Helper/FormHelper.php index 6cb892961..aefb3420d 100644 --- a/lib/Cake/View/Helper/FormHelper.php +++ b/lib/Cake/View/Helper/FormHelper.php @@ -1739,7 +1739,7 @@ class FormHelper extends AppHelper { * @param string $title The content to be wrapped by tags. * @param string|array $url Cake-relative URL or array of URL parameters, or external URL (starts with http://) * @param array $options Array of HTML attributes. - * @param bool|string $confirmMessage JavaScript confirmation message. + * @param boolean|string $confirmMessage JavaScript confirmation message. * @return string An `` element. * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html#FormHelper::postLink */ From 12f2f729c8be43de48d54a64c99e447b2874d3cc Mon Sep 17 00:00:00 2001 From: euromark Date: Tue, 17 Sep 2013 14:53:07 +0200 Subject: [PATCH 12/13] more cs --- app/Config/core.php | 2 +- lib/Cake/Cache/Engine/RedisEngine.php | 2 +- lib/Cake/Console/Templates/skel/Config/core.php | 2 +- lib/Cake/Controller/Component/AuthComponent.php | 2 +- lib/Cake/Routing/Dispatcher.php | 2 +- lib/Cake/Utility/CakeNumber.php | 2 +- lib/Cake/View/Helper/FormHelper.php | 2 +- lib/Cake/View/Helper/NumberHelper.php | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/Config/core.php b/app/Config/core.php index ba7a9d0ea..99b3d744f 100644 --- a/app/Config/core.php +++ b/app/Config/core.php @@ -45,7 +45,7 @@ * - `handler` - callback - The callback to handle errors. You can set this to any callable type, * including anonymous functions. * Make sure you add App::uses('MyHandler', 'Error'); when using a custom handler class - * - `level` - int - The level of errors you are interested in capturing. + * - `level` - integer - The level of errors you are interested in capturing. * - `trace` - boolean - Include stack traces for errors in log files. * * @see ErrorHandler for more information on error handling and configuration. diff --git a/lib/Cake/Cache/Engine/RedisEngine.php b/lib/Cake/Cache/Engine/RedisEngine.php index 052aff8c1..c481f8c6f 100644 --- a/lib/Cake/Cache/Engine/RedisEngine.php +++ b/lib/Cake/Cache/Engine/RedisEngine.php @@ -39,7 +39,7 @@ class RedisEngine extends CacheEngine { * - server = string URL or ip to the Redis server host * - port = integer port number to the Redis server (default: 6379) * - timeout = float timeout in seconds (default: 0) - * - persistent = bool Connects to the Redis server with a persistent connection (default: true) + * - persistent = boolean Connects to the Redis server with a persistent connection (default: true) * * @var array */ diff --git a/lib/Cake/Console/Templates/skel/Config/core.php b/lib/Cake/Console/Templates/skel/Config/core.php index 4f91b05e6..012af933a 100644 --- a/lib/Cake/Console/Templates/skel/Config/core.php +++ b/lib/Cake/Console/Templates/skel/Config/core.php @@ -36,7 +36,7 @@ * - `handler` - callback - The callback to handle errors. You can set this to any callable type, * including anonymous functions. * Make sure you add App::uses('MyHandler', 'Error'); when using a custom handler class - * - `level` - int - The level of errors you are interested in capturing. + * - `level` - integer - The level of errors you are interested in capturing. * - `trace` - boolean - Include stack traces for errors in log files. * * @see ErrorHandler for more information on error handling and configuration. diff --git a/lib/Cake/Controller/Component/AuthComponent.php b/lib/Cake/Controller/Component/AuthComponent.php index c36008d9d..8ad5a1885 100644 --- a/lib/Cake/Controller/Component/AuthComponent.php +++ b/lib/Cake/Controller/Component/AuthComponent.php @@ -211,7 +211,7 @@ class AuthComponent extends Component { * Error to display when user attempts to access an object or action to which they do not have * access. * - * @var string|bool Error message or boolean false to suppress flash message + * @var string|boolean Error message or boolean false to suppress flash message * @link http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#AuthComponent::$authError */ public $authError = null; diff --git a/lib/Cake/Routing/Dispatcher.php b/lib/Cake/Routing/Dispatcher.php index 48974e008..aed253a88 100644 --- a/lib/Cake/Routing/Dispatcher.php +++ b/lib/Cake/Routing/Dispatcher.php @@ -243,7 +243,7 @@ class Dispatcher implements CakeEventListener { * Load controller and return controller classname * * @param CakeRequest $request - * @return string|bool Name of controller class name + * @return string|boolean Name of controller class name */ protected function _loadController($request) { $pluginName = $pluginPath = $controller = null; diff --git a/lib/Cake/Utility/CakeNumber.php b/lib/Cake/Utility/CakeNumber.php index 1f7742b32..8d43c4169 100644 --- a/lib/Cake/Utility/CakeNumber.php +++ b/lib/Cake/Utility/CakeNumber.php @@ -190,7 +190,7 @@ class CakeNumber { * Formats a number into a currency format. * * @param float $value A floating point number - * @param integer $options if int then places, if string then before, if (,.-) then use it + * @param integer $options If integer then places, if string then before, if (,.-) then use it * or array with places and before keys * @return string formatted number * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/number.html#NumberHelper::format diff --git a/lib/Cake/View/Helper/FormHelper.php b/lib/Cake/View/Helper/FormHelper.php index aefb3420d..542655709 100644 --- a/lib/Cake/View/Helper/FormHelper.php +++ b/lib/Cake/View/Helper/FormHelper.php @@ -647,7 +647,7 @@ class FormHelper extends AppHelper { * * ### Options: * - * - `escape` bool - Whether or not to html escape the contents of the error. + * - `escape` boolean - Whether or not to html escape the contents of the error. * - `wrap` mixed - Whether or not the error message should be wrapped in a div. If a * string, will be used as the HTML tag to use. * - `class` string - The classname for the error message diff --git a/lib/Cake/View/Helper/NumberHelper.php b/lib/Cake/View/Helper/NumberHelper.php index ddf3b483b..007c6cdbd 100644 --- a/lib/Cake/View/Helper/NumberHelper.php +++ b/lib/Cake/View/Helper/NumberHelper.php @@ -113,7 +113,7 @@ class NumberHelper extends AppHelper { * @see CakeNumber::format() * * @param float $number A floating point number - * @param integer $options if int then places, if string then before, if (,.-) then use it + * @param integer $options If integer then places, if string then before, if (,.-) then use it * or array with places and before keys * @return string formatted number * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/number.html#NumberHelper::format From e3a3946e89354e0884841ce6dca6660cf88ed88d Mon Sep 17 00:00:00 2001 From: euromark Date: Tue, 17 Sep 2013 15:15:25 +0200 Subject: [PATCH 13/13] address casting cs --- lib/Cake/Controller/Component/AuthComponent.php | 2 +- lib/Cake/Test/Case/BasicsTest.php | 2 +- lib/Cake/Test/Case/Model/ModelWriteTest.php | 2 +- lib/Cake/Utility/Validation.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Cake/Controller/Component/AuthComponent.php b/lib/Cake/Controller/Component/AuthComponent.php index 8ad5a1885..fe1f1e8af 100644 --- a/lib/Cake/Controller/Component/AuthComponent.php +++ b/lib/Cake/Controller/Component/AuthComponent.php @@ -812,7 +812,7 @@ class AuthComponent extends Component { * @return boolean true if the user is logged in, false otherwise */ public function loggedIn() { - return (boolean)$this->user(); + return (bool)$this->user(); } /** diff --git a/lib/Cake/Test/Case/BasicsTest.php b/lib/Cake/Test/Case/BasicsTest.php index b6e752b01..38f5fda6f 100644 --- a/lib/Cake/Test/Case/BasicsTest.php +++ b/lib/Cake/Test/Case/BasicsTest.php @@ -278,7 +278,7 @@ class BasicsTest extends CakeTestCase { Configure::write('Cache.disable', false); $result = cache('basics_test', 'simple cache write'); - $this->assertTrue((boolean)$result); + $this->assertTrue((bool)$result); $this->assertTrue(file_exists(CACHE . 'basics_test')); $result = cache('basics_test'); diff --git a/lib/Cake/Test/Case/Model/ModelWriteTest.php b/lib/Cake/Test/Case/Model/ModelWriteTest.php index 6ec1de8ac..ae8d71cfb 100644 --- a/lib/Cake/Test/Case/Model/ModelWriteTest.php +++ b/lib/Cake/Test/Case/Model/ModelWriteTest.php @@ -7144,7 +7144,7 @@ class ModelWriteTest extends BaseModelTest { $TestModel = new Item(); $result = $TestModel->save(array('published' => true, 'id' => 1)); - $this->assertTrue((boolean)$result); + $this->assertTrue((bool)$result); $result = $TestModel->find('first', array( 'fields' => array('id', 'published'), 'conditions' => array('Item.id' => 1))); diff --git a/lib/Cake/Utility/Validation.php b/lib/Cake/Utility/Validation.php index cf2811a8d..45d1e3e37 100644 --- a/lib/Cake/Utility/Validation.php +++ b/lib/Cake/Utility/Validation.php @@ -497,7 +497,7 @@ class Validation { if ($type === 'ipv6') { $flags = FILTER_FLAG_IPV6; } - return (boolean)filter_var($check, FILTER_VALIDATE_IP, array('flags' => $flags)); + return (bool)filter_var($check, FILTER_VALIDATE_IP, array('flags' => $flags)); } /**