mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
coding standards
This commit is contained in:
parent
8a070ca3dd
commit
213d4caa85
10 changed files with 10 additions and 10 deletions
|
@ -245,7 +245,7 @@ class ExtractTask extends AppShell {
|
||||||
if (empty($this->_translations[$domain][$msgid])) {
|
if (empty($this->_translations[$domain][$msgid])) {
|
||||||
$this->_translations[$domain][$msgid] = array(
|
$this->_translations[$domain][$msgid] = array(
|
||||||
'msgid_plural' => false
|
'msgid_plural' => false
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($details['msgid_plural'])) {
|
if (isset($details['msgid_plural'])) {
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
); ?>
|
); ?>
|
||||||
</p>
|
</p>
|
||||||
<?php
|
<?php
|
||||||
if (Configure::read('debug') > 0 ):
|
if (Configure::read('debug') > 0):
|
||||||
echo $this->element('exception_stack_trace');
|
echo $this->element('exception_stack_trace');
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
<?php echo __d('cake', 'An Internal Error Has Occurred.'); ?>
|
<?php echo __d('cake', 'An Internal Error Has Occurred.'); ?>
|
||||||
</p>
|
</p>
|
||||||
<?php
|
<?php
|
||||||
if (Configure::read('debug') > 0 ):
|
if (Configure::read('debug') > 0):
|
||||||
echo $this->element('exception_stack_trace');
|
echo $this->element('exception_stack_trace');
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -389,7 +389,7 @@ class SecurityComponent extends Component {
|
||||||
$requireAuth = $this->requireAuth;
|
$requireAuth = $this->requireAuth;
|
||||||
|
|
||||||
if (in_array($this->request->params['action'], $requireAuth) || $this->requireAuth == array('*')) {
|
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')) {
|
if (!$this->blackHole($controller, 'auth')) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1122,7 +1122,7 @@ class Multibyte {
|
||||||
public static function checkMultibyte($string) {
|
public static function checkMultibyte($string) {
|
||||||
$length = strlen($string);
|
$length = strlen($string);
|
||||||
|
|
||||||
for ($i = 0; $i < $length; $i++ ) {
|
for ($i = 0; $i < $length; $i++) {
|
||||||
$value = ord(($string[$i]));
|
$value = ord(($string[$i]));
|
||||||
if ($value > 128) {
|
if ($value > 128) {
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -184,7 +184,7 @@ class TranslateBehavior extends ModelBehavior {
|
||||||
*/
|
*/
|
||||||
protected function _checkConditions(Model $Model, $query) {
|
protected function _checkConditions(Model $Model, $query) {
|
||||||
$conditionFields = array();
|
$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;
|
return $conditionFields;
|
||||||
}
|
}
|
||||||
foreach ($query['conditions'] as $col => $val) {
|
foreach ($query['conditions'] as $col => $val) {
|
||||||
|
|
|
@ -599,7 +599,7 @@ class DboSource extends DataSource {
|
||||||
} else {
|
} else {
|
||||||
if (isset($args[1]) && $args[1] === true) {
|
if (isset($args[1]) && $args[1] === true) {
|
||||||
return $this->fetchAll($args[0], 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);
|
return $this->fetchAll($args[0], false);
|
||||||
} elseif (isset($args[1]) && is_array($args[1])) {
|
} elseif (isset($args[1]) && is_array($args[1])) {
|
||||||
if (isset($args[2])) {
|
if (isset($args[2])) {
|
||||||
|
|
|
@ -1070,7 +1070,7 @@ class CakeResponse {
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function length($bytes = null) {
|
public function length($bytes = null) {
|
||||||
if ($bytes !== null ) {
|
if ($bytes !== null) {
|
||||||
$this->_headers['Content-Length'] = $bytes;
|
$this->_headers['Content-Length'] = $bytes;
|
||||||
}
|
}
|
||||||
if (isset($this->_headers['Content-Length'])) {
|
if (isset($this->_headers['Content-Length'])) {
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
); ?>
|
); ?>
|
||||||
</p>
|
</p>
|
||||||
<?php
|
<?php
|
||||||
if (Configure::read('debug') > 0 ):
|
if (Configure::read('debug') > 0):
|
||||||
echo $this->element('exception_stack_trace');
|
echo $this->element('exception_stack_trace');
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
<?php echo __d('cake', 'An Internal Error Has Occurred.'); ?>
|
<?php echo __d('cake', 'An Internal Error Has Occurred.'); ?>
|
||||||
</p>
|
</p>
|
||||||
<?php
|
<?php
|
||||||
if (Configure::read('debug') > 0 ):
|
if (Configure::read('debug') > 0):
|
||||||
echo $this->element('exception_stack_trace');
|
echo $this->element('exception_stack_trace');
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in a new issue