@@ -929,7 +929,9 @@ discard block |
||
929 | 929 | * @return SS_List |
930 | 930 | */ |
931 | 931 | public function whoIsAllowedAny($codes) { |
932 | - if(!is_array($codes)) $codes = array($codes); |
|
932 | + if(!is_array($codes)) { |
|
933 | + $codes = array($codes); |
|
934 | + } |
|
933 | 935 | |
934 | 936 | $SQLa_codes = Convert::raw2sql($codes); |
935 | 937 | $SQL_codes = join("','", $SQLa_codes); |
@@ -991,7 +993,9 @@ discard block |
||
991 | 993 | $member = Member::currentUser(); |
992 | 994 | } |
993 | 995 | |
994 | - if(Permission::checkMember($member, 'ADMIN')) return true; |
|
996 | + if(Permission::checkMember($member, 'ADMIN')) { |
|
997 | + return true; |
|
998 | + } |
|
995 | 999 | |
996 | 1000 | $hits = $this->whoIsAllowedAny($codes)->filter('Member.ID', $member->ID)->count(); |
997 | 1001 | return ($hits>0 ? true : false); |
@@ -1018,7 +1022,9 @@ discard block |
||
1018 | 1022 | }); |
1019 | 1023 | |
1020 | 1024 | // If anything returns false then we're not ready. |
1021 | - if($isDone) return min($isDone); |
|
1025 | + if($isDone) { |
|
1026 | + return min($isDone); |
|
1027 | + } |
|
1022 | 1028 | } |
1023 | 1029 | |
1024 | 1030 | return true; |
@@ -1099,8 +1105,12 @@ discard block |
||
1099 | 1105 | * @return bool |
1100 | 1106 | */ |
1101 | 1107 | public function canCreate($member = null) { |
1102 | - if(!$member) $member = Member::currentUser(); |
|
1103 | - if(!$member) return false; |
|
1108 | + if(!$member) { |
|
1109 | + $member = Member::currentUser(); |
|
1110 | + } |
|
1111 | + if(!$member) { |
|
1112 | + return false; |
|
1113 | + } |
|
1104 | 1114 | |
1105 | 1115 | if(Permission::checkMember($member, 'ADMIN')) { |
1106 | 1116 | return true; |
@@ -110,8 +110,12 @@ |
||
110 | 110 | // Normalise "empty" values into dashes so comparisons are done properly. |
111 | 111 | // This means there is no diference between an empty string and a null |
112 | 112 | // but "0" is considered to be non-empty. |
113 | - if(empty($from) && !strlen($from)) $from = '-'; |
|
114 | - if(empty($to) && !strlen($to)) $to = '-'; |
|
113 | + if(empty($from) && !strlen($from)) { |
|
114 | + $from = '-'; |
|
115 | + } |
|
116 | + if(empty($to) && !strlen($to)) { |
|
117 | + $to = '-'; |
|
118 | + } |
|
115 | 119 | |
116 | 120 | return $this->changes[$title] = array( |
117 | 121 | 'from' => $from, |
@@ -205,12 +205,16 @@ |
||
205 | 205 | */ |
206 | 206 | public function getFullDeployMessages() { |
207 | 207 | $strategy = $this->getDeploymentStrategy(); |
208 | - if ($strategy->getActionCode()!=='full') return null; |
|
208 | + if ($strategy->getActionCode()!=='full') { |
|
209 | + return null; |
|
210 | + } |
|
209 | 211 | |
210 | 212 | $changes = $strategy->getChangesModificationNeeded(); |
211 | 213 | $messages = []; |
212 | 214 | foreach ($changes as $change => $details) { |
213 | - if ($change==='Code version') continue; |
|
215 | + if ($change==='Code version') { |
|
216 | + continue; |
|
217 | + } |
|
214 | 218 | |
215 | 219 | $messages[] = [ |
216 | 220 | 'Flag' => sprintf( |
@@ -58,7 +58,9 @@ |
||
58 | 58 | |
59 | 59 | protected function addHandlers($machine) { |
60 | 60 | $class = get_class($machine->getObject()); |
61 | - if (empty($this->config()->handlers[$class])) return; |
|
61 | + if (empty($this->config()->handlers[$class])) { |
|
62 | + return; |
|
63 | + } |
|
62 | 64 | |
63 | 65 | $transitions = $this->config()->handlers[$class]; |
64 | 66 | foreach ($transitions as $transName => $handlers) { |