mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
code cleanup
This commit is contained in:
parent
554d5794ce
commit
2b1e5b02b5
3 changed files with 4 additions and 4 deletions
|
@ -164,7 +164,7 @@ class PhpAcl extends Object implements AclInterface {
|
||||||
$allow = $this->options['policy'];
|
$allow = $this->options['policy'];
|
||||||
$prioritizedAros = $this->Aro->roles($aro);
|
$prioritizedAros = $this->Aro->roles($aro);
|
||||||
|
|
||||||
if ($action && $action != "*") {
|
if ($action && $action !== "*") {
|
||||||
$aco .= '/' . $action;
|
$aco .= '/' . $action;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -456,7 +456,7 @@ class I18n {
|
||||||
|
|
||||||
do {
|
do {
|
||||||
$line = trim(fgets($file));
|
$line = trim(fgets($file));
|
||||||
if ($line == "" || $line[0] == "#") {
|
if ($line === "" || $line[0] === "#") {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (preg_match("/msgid[[:space:]]+\"(.+)\"$/i", $line, $regs)) {
|
if (preg_match("/msgid[[:space:]]+\"(.+)\"$/i", $line, $regs)) {
|
||||||
|
|
|
@ -178,7 +178,7 @@ class Permission extends AppModel {
|
||||||
$save = $perms[0][$this->alias];
|
$save = $perms[0][$this->alias];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($actions == "*") {
|
if ($actions === "*") {
|
||||||
$save = array_combine($permKeys, array_pad(array(), count($permKeys), $value));
|
$save = array_combine($permKeys, array_pad(array(), count($permKeys), $value));
|
||||||
} else {
|
} else {
|
||||||
if (!is_array($actions)) {
|
if (!is_array($actions)) {
|
||||||
|
@ -186,7 +186,7 @@ class Permission extends AppModel {
|
||||||
}
|
}
|
||||||
if (is_array($actions)) {
|
if (is_array($actions)) {
|
||||||
foreach ($actions as $action) {
|
foreach ($actions as $action) {
|
||||||
if ($action{0} != '_') {
|
if ($action{0} !== '_') {
|
||||||
$action = '_' . $action;
|
$action = '_' . $action;
|
||||||
}
|
}
|
||||||
if (in_array($action, $permKeys)) {
|
if (in_array($action, $permKeys)) {
|
||||||
|
|
Loading…
Reference in a new issue