Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix remaining cs errors

  • Loading branch information...
commit aaf2d2ef71886a95cc5d31f74e09ca0f767b9857 1 parent fa5ccf4
@ceeram ceeram authored
View
5 app/Config/Schema/i18n.php
@@ -19,14 +19,17 @@
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
+// @codingStandardsIgnoreStart
+
/*
*
* Using the Schema command line utility
* cake schema run create i18n
- *
*/
class i18nSchema extends CakeSchema {
+// @codingStandardsIgnoreEnd
+
public $name = 'i18n';
public function before($event = array()) {
View
5 lib/Cake/Console/Templates/skel/Config/Schema/i18n.php
@@ -21,14 +21,17 @@
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
+// @codingStandardsIgnoreStart
+
/*
*
* Using the Schema command line utility
* cake schema run create i18n
- *
*/
class i18nSchema extends CakeSchema {
+// @codingStandardsIgnoreEnd
+
public $name = 'i18n';
public function before($event = array()) {
View
4 lib/Cake/I18n/Multibyte.php
@@ -1008,7 +1008,8 @@ public static function mimeEncode($string, $charset = null, $newline = "\r\n") {
if ($charset == 'UTF-8') {
$parts = array();
$maxchars = floor(($length * 3) / 4);
- while (strlen($string) > $maxchars) {
+ $stringLength = strlen($string);
+ while ($stringLength > $maxchars) {
$i = (int)$maxchars;
$test = ord($string[$i]);
while ($test >= 128 && $test <= 191) {
@@ -1017,6 +1018,7 @@ public static function mimeEncode($string, $charset = null, $newline = "\r\n") {
}
$parts[] = base64_encode(substr($string, 0, $i));
$string = substr($string, $i);
+ $stringLength = strlen($string);
}
$parts[] = base64_encode($string);
$string = implode($spacer, $parts);
View
4 lib/Cake/Model/Model.php
@@ -558,6 +558,8 @@ class Model extends Object implements CakeEventListener {
*/
protected $_associations = array('belongsTo', 'hasOne', 'hasMany', 'hasAndBelongsToMany');
+// @codingStandardsIgnoreStart
+
/**
* Holds model associations temporarily to allow for dynamic (un)binding.
*
@@ -586,6 +588,8 @@ class Model extends Object implements CakeEventListener {
*/
public $__backContainableAssociation = array();
+// @codingStandardsIgnoreEnd
+
/**
* The ID of the model record that was last inserted.
*
View
10 lib/Cake/Test/Case/Controller/Component/Acl/DbAclTest.php
@@ -483,14 +483,14 @@ public function testRevoke() {
/**
* debug function - to help editing/creating test cases for the ACL component
*
- * To check the overall ACL status at any time call $this->__debug();
+ * To check the overall ACL status at any time call $this->_debug();
* Generates a list of the current aro and aco structures and a grid dump of the permissions that are defined
* Only designed to work with the db based ACL
*
* @param bool $treesToo
* @return void
*/
- protected function __debug($printTreesToo = false) {
+ protected function _debug($printTreesToo = false) {
$this->Acl->Aro->displayField = 'alias';
$this->Acl->Aco->displayField = 'alias';
$aros = $this->Acl->Aro->find('list', array('order' => 'lft'));
@@ -518,10 +518,10 @@ protected function __debug($printTreesToo = false) {
}
foreach ($permissions as $key => $values) {
array_unshift($values, $key);
- $values = array_map(array(&$this, '__pad'), $values);
+ $values = array_map(array(&$this, '_pad'), $values);
$permissions[$key] = implode (' ', $values);
}
- $permisssions = array_map(array(&$this, '__pad'), $permissions);
+ $permisssions = array_map(array(&$this, '_pad'), $permissions);
array_unshift($permissions, 'Current Permissions :');
if ($printTreesToo) {
debug(array('aros' => $this->Acl->Aro->generateTreeList(), 'acos' => $this->Acl->Aco->generateTreeList()));
@@ -537,7 +537,7 @@ protected function __debug($printTreesToo = false) {
* @param integer $len
* @return void
*/
- protected function __pad($string = '', $len = 14) {
+ protected function _pad($string = '', $len = 14) {
return str_pad($string, $len);
}
}
View
18 lib/Cake/Test/Case/Controller/Component/CookieComponentTest.php
@@ -412,11 +412,11 @@ public function testReadingCookieDataOnStartup() {
$this->assertNull($data);
$_COOKIE['CakeTestCookie'] = array(
- 'Encrytped_array' => $this->__encrypt(array('name' => 'CakePHP', 'version' => '1.2.0.x', 'tag' => 'CakePHP Rocks!')),
+ 'Encrytped_array' => $this->_encrypt(array('name' => 'CakePHP', 'version' => '1.2.0.x', 'tag' => 'CakePHP Rocks!')),
'Encrytped_multi_cookies' => array(
- 'name' => $this->__encrypt('CakePHP'),
- 'version' => $this->__encrypt('1.2.0.x'),
- 'tag' => $this->__encrypt('CakePHP Rocks!')),
+ 'name' => $this->_encrypt('CakePHP'),
+ 'version' => $this->_encrypt('1.2.0.x'),
+ 'tag' => $this->_encrypt('CakePHP Rocks!')),
'Plain_array' => '{"name":"CakePHP","version":"1.2.0.x","tag":"CakePHP Rocks!"}',
'Plain_multi_cookies' => array(
'name' => 'CakePHP',
@@ -467,11 +467,11 @@ public function testReadingCookieDataWithoutStartup() {
$this->assertEquals($expected, $data);
$_COOKIE['CakeTestCookie'] = array(
- 'Encrytped_array' => $this->__encrypt(array('name' => 'CakePHP', 'version' => '1.2.0.x', 'tag' => 'CakePHP Rocks!')),
+ 'Encrytped_array' => $this->_encrypt(array('name' => 'CakePHP', 'version' => '1.2.0.x', 'tag' => 'CakePHP Rocks!')),
'Encrytped_multi_cookies' => array(
- 'name' => $this->__encrypt('CakePHP'),
- 'version' => $this->__encrypt('1.2.0.x'),
- 'tag' => $this->__encrypt('CakePHP Rocks!')),
+ 'name' => $this->_encrypt('CakePHP'),
+ 'version' => $this->_encrypt('1.2.0.x'),
+ 'tag' => $this->_encrypt('CakePHP Rocks!')),
'Plain_array' => '{"name":"CakePHP","version":"1.2.0.x","tag":"CakePHP Rocks!"}',
'Plain_multi_cookies' => array(
'name' => 'CakePHP',
@@ -594,7 +594,7 @@ protected function _implode(array $array) {
* @param array|string $value
* @return string
*/
- protected function __encrypt($value) {
+ protected function _encrypt($value) {
if (is_array($value)) {
$value = $this->_implode($value);
}
View
4 lib/Cake/Test/Case/Network/CakeRequestTest.php
@@ -1710,7 +1710,7 @@ public static function environmentGenerator() {
*/
public function testEnvironmentDetection($name, $env, $expected) {
$_GET = array();
- $this->__loadEnvironment($env);
+ $this->_loadEnvironment($env);
$request = new CakeRequest();
$this->assertEquals($expected['url'], $request->url, "url error");
@@ -1913,7 +1913,7 @@ public function testIsRequested() {
* @param array $env
* @return void
*/
- protected function __loadEnvironment($env) {
+ protected function _loadEnvironment($env) {
if (isset($env['App'])) {
Configure::write('App', $env['App']);
}
View
70 lib/Cake/Test/Case/Routing/DispatcherTest.php
@@ -1574,7 +1574,7 @@ public function testFullPageCachingDispatch($url) {
$this->assertTextEquals($out, $cached);
- $filename = $this->__cachePath($request->here());
+ $filename = $this->_cachePath($request->here());
unlink($filename);
}
@@ -1658,78 +1658,12 @@ public function testHttpMethodOverrides() {
}
/**
- * backupEnvironment method
- *
- * @return void
- */
- protected function __backupEnvironment() {
- return array(
- 'App' => Configure::read('App'),
- 'GET' => $_GET,
- 'POST' => $_POST,
- 'SERVER' => $_SERVER
- );
- }
-
-/**
- * reloadEnvironment method
- *
- * @return void
- */
- protected function __reloadEnvironment() {
- foreach ($_GET as $key => $val) {
- unset($_GET[$key]);
- }
- foreach ($_POST as $key => $val) {
- unset($_POST[$key]);
- }
- foreach ($_SERVER as $key => $val) {
- unset($_SERVER[$key]);
- }
- Configure::write('App', array());
- }
-
-/**
- * loadEnvironment method
- *
- * @param array $env
- * @return void
- */
- protected function __loadEnvironment($env) {
- if ($env['reload']) {
- $this->__reloadEnvironment();
- }
-
- if (isset($env['App'])) {
- Configure::write('App', $env['App']);
- }
-
- if (isset($env['GET'])) {
- foreach ($env['GET'] as $key => $val) {
- $_GET[$key] = $val;
- }
- }
-
- if (isset($env['POST'])) {
- foreach ($env['POST'] as $key => $val) {
- $_POST[$key] = $val;
- }
- }
-
- if (isset($env['SERVER'])) {
- foreach ($env['SERVER'] as $key => $val) {
- $_SERVER[$key] = $val;
- }
- }
- }
-
-/**
* cachePath method
*
* @param string $here
* @return string
*/
- protected function __cachePath($here) {
+ protected function _cachePath($here) {
$path = $here;
if ($here == '/') {
$path = 'home';
View
3  lib/Cake/TestSuite/templates/menu.php
@@ -1,4 +1,5 @@
<?php
+// @codingStandardsIgnoreFile
/**
* Short description for file.
*
@@ -28,7 +29,7 @@
<?php if (!empty($plugins)): ?>
<li style="padding-top: 10px">
<span style="font-size: 18px">Plugins</span>
- <?php foreach ($plugins as $plugin): ?>
+ <?php foreach ($plugins as $plugin) : ?>
<ul>
<li style="padding-top: 10px">
<span style="font-size: 18px"><?php echo $plugin; ?></span>
Please sign in to comment.
Something went wrong with that request. Please try again.