code cleanup

This commit is contained in:
euromark 2012-12-21 00:40:12 +01:00
parent 554d5794ce
commit 2b1e5b02b5
3 changed files with 4 additions and 4 deletions

View file

@ -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;
} }

View file

@ -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)) {

View file

@ -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)) {