From 213d4caa852fb22b0c2d0d12e3f200c93485e8e9 Mon Sep 17 00:00:00 2001 From: euromark Date: Thu, 20 Sep 2012 01:50:15 +0200 Subject: [PATCH] coding standards --- lib/Cake/Console/Command/Task/ExtractTask.php | 2 +- lib/Cake/Console/Templates/skel/View/Errors/error400.ctp | 2 +- lib/Cake/Console/Templates/skel/View/Errors/error500.ctp | 2 +- lib/Cake/Controller/Component/SecurityComponent.php | 2 +- lib/Cake/I18n/Multibyte.php | 2 +- lib/Cake/Model/Behavior/TranslateBehavior.php | 2 +- lib/Cake/Model/Datasource/DboSource.php | 2 +- lib/Cake/Network/CakeResponse.php | 2 +- lib/Cake/Test/test_app/View/Errors/error400.ctp | 2 +- lib/Cake/Test/test_app/View/Errors/error500.ctp | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/Cake/Console/Command/Task/ExtractTask.php b/lib/Cake/Console/Command/Task/ExtractTask.php index 8d0777be9..ab35612db 100644 --- a/lib/Cake/Console/Command/Task/ExtractTask.php +++ b/lib/Cake/Console/Command/Task/ExtractTask.php @@ -245,7 +245,7 @@ class ExtractTask extends AppShell { if (empty($this->_translations[$domain][$msgid])) { $this->_translations[$domain][$msgid] = array( 'msgid_plural' => false - ); + ); } if (isset($details['msgid_plural'])) { diff --git a/lib/Cake/Console/Templates/skel/View/Errors/error400.ctp b/lib/Cake/Console/Templates/skel/View/Errors/error400.ctp index 6d508604c..cfaff40a1 100644 --- a/lib/Cake/Console/Templates/skel/View/Errors/error400.ctp +++ b/lib/Cake/Console/Templates/skel/View/Errors/error400.ctp @@ -25,7 +25,7 @@ ); ?>

0 ): +if (Configure::read('debug') > 0): echo $this->element('exception_stack_trace'); endif; ?> diff --git a/lib/Cake/Console/Templates/skel/View/Errors/error500.ctp b/lib/Cake/Console/Templates/skel/View/Errors/error500.ctp index 4e1f36ece..54d3774df 100644 --- a/lib/Cake/Console/Templates/skel/View/Errors/error500.ctp +++ b/lib/Cake/Console/Templates/skel/View/Errors/error500.ctp @@ -22,7 +22,7 @@

0 ): +if (Configure::read('debug') > 0): echo $this->element('exception_stack_trace'); endif; ?> diff --git a/lib/Cake/Controller/Component/SecurityComponent.php b/lib/Cake/Controller/Component/SecurityComponent.php index c89bb48cc..cda99d7e7 100644 --- a/lib/Cake/Controller/Component/SecurityComponent.php +++ b/lib/Cake/Controller/Component/SecurityComponent.php @@ -389,7 +389,7 @@ class SecurityComponent extends Component { $requireAuth = $this->requireAuth; if (in_array($this->request->params['action'], $requireAuth) || $this->requireAuth == array('*')) { - if (!isset($controller->request->data['_Token'] )) { + if (!isset($controller->request->data['_Token'])) { if (!$this->blackHole($controller, 'auth')) { return null; } diff --git a/lib/Cake/I18n/Multibyte.php b/lib/Cake/I18n/Multibyte.php index b741ef4d6..f69d11683 100644 --- a/lib/Cake/I18n/Multibyte.php +++ b/lib/Cake/I18n/Multibyte.php @@ -1122,7 +1122,7 @@ class Multibyte { public static function checkMultibyte($string) { $length = strlen($string); - for ($i = 0; $i < $length; $i++ ) { + for ($i = 0; $i < $length; $i++) { $value = ord(($string[$i])); if ($value > 128) { return true; diff --git a/lib/Cake/Model/Behavior/TranslateBehavior.php b/lib/Cake/Model/Behavior/TranslateBehavior.php index 3eccf6269..001c355d9 100644 --- a/lib/Cake/Model/Behavior/TranslateBehavior.php +++ b/lib/Cake/Model/Behavior/TranslateBehavior.php @@ -184,7 +184,7 @@ class TranslateBehavior extends ModelBehavior { */ protected function _checkConditions(Model $Model, $query) { $conditionFields = array(); - if (empty($query['conditions']) || (!empty($query['conditions']) && !is_array($query['conditions'])) ) { + if (empty($query['conditions']) || (!empty($query['conditions']) && !is_array($query['conditions']))) { return $conditionFields; } foreach ($query['conditions'] as $col => $val) { diff --git a/lib/Cake/Model/Datasource/DboSource.php b/lib/Cake/Model/Datasource/DboSource.php index 387c5e82f..73087c3f0 100644 --- a/lib/Cake/Model/Datasource/DboSource.php +++ b/lib/Cake/Model/Datasource/DboSource.php @@ -599,7 +599,7 @@ class DboSource extends DataSource { } else { if (isset($args[1]) && $args[1] === true) { return $this->fetchAll($args[0], true); - } elseif (isset($args[1]) && !is_array($args[1]) ) { + } elseif (isset($args[1]) && !is_array($args[1])) { return $this->fetchAll($args[0], false); } elseif (isset($args[1]) && is_array($args[1])) { if (isset($args[2])) { diff --git a/lib/Cake/Network/CakeResponse.php b/lib/Cake/Network/CakeResponse.php index 15c1892b6..2740e0a4f 100644 --- a/lib/Cake/Network/CakeResponse.php +++ b/lib/Cake/Network/CakeResponse.php @@ -1070,7 +1070,7 @@ class CakeResponse { * @return int */ public function length($bytes = null) { - if ($bytes !== null ) { + if ($bytes !== null) { $this->_headers['Content-Length'] = $bytes; } if (isset($this->_headers['Content-Length'])) { diff --git a/lib/Cake/Test/test_app/View/Errors/error400.ctp b/lib/Cake/Test/test_app/View/Errors/error400.ctp index 6d508604c..cfaff40a1 100644 --- a/lib/Cake/Test/test_app/View/Errors/error400.ctp +++ b/lib/Cake/Test/test_app/View/Errors/error400.ctp @@ -25,7 +25,7 @@ ); ?>

0 ): +if (Configure::read('debug') > 0): echo $this->element('exception_stack_trace'); endif; ?> diff --git a/lib/Cake/Test/test_app/View/Errors/error500.ctp b/lib/Cake/Test/test_app/View/Errors/error500.ctp index 4e1f36ece..54d3774df 100644 --- a/lib/Cake/Test/test_app/View/Errors/error500.ctp +++ b/lib/Cake/Test/test_app/View/Errors/error500.ctp @@ -22,7 +22,7 @@

0 ): +if (Configure::read('debug') > 0): echo $this->element('exception_stack_trace'); endif; ?>