@@ -226,25 +226,25 @@ |
||
226 | 226 | if(!is_null($father) && is_null($mother) && is_null($guardian)){ |
227 | 227 | Security_user::where('id',$student['student_id']) |
228 | 228 | ->update(['address_area_id' => $father->address_area_id]); |
229 | - }elseif(!is_null($mother) && (is_null($father) && is_null($guardian))){ |
|
229 | + } elseif(!is_null($mother) && (is_null($father) && is_null($guardian))){ |
|
230 | 230 | Security_user::where('id',$student['student_id']) |
231 | 231 | ->update(['address_area_id' => $mother->address_area_id]); |
232 | - }elseif(!is_null($guardian) && is_null($father) && is_null($mother)){ |
|
232 | + } elseif(!is_null($guardian) && is_null($father) && is_null($mother)){ |
|
233 | 233 | Security_user::where('id',$student['student_id']) |
234 | 234 | ->update(['address_area_id' => $guardian->address_area_id]); |
235 | - }elseif(!is_null($mother) && !is_null($father) && ($father->address_area_id == $mother->address_area_id)){ |
|
235 | + } elseif(!is_null($mother) && !is_null($father) && ($father->address_area_id == $mother->address_area_id)){ |
|
236 | 236 | Security_user::where('id',$student['student_id']) |
237 | 237 | ->update(['address_area_id' => $mother->address_area_id]); |
238 | - }elseif(!is_null($mother) && !is_null($father) && ($father->address_area_id !== $mother->address_area_id) && !is_null($guardian)){ |
|
238 | + } elseif(!is_null($mother) && !is_null($father) && ($father->address_area_id !== $mother->address_area_id) && !is_null($guardian)){ |
|
239 | 239 | Security_user::where('id',$student['student_id']) |
240 | 240 | ->update(['address_area_id' => $guardian->address_area_id]); |
241 | - }elseif(!is_null($father) && $father->address == $student['address']){ |
|
241 | + } elseif(!is_null($father) && $father->address == $student['address']){ |
|
242 | 242 | Security_user::where('id',$student['student_id']) |
243 | 243 | ->update(['address_area_id' => $guardian->address_area_id]); |
244 | - }elseif(!is_null($mother) && $mother->address == $student['address']){ |
|
244 | + } elseif(!is_null($mother) && $mother->address == $student['address']){ |
|
245 | 245 | Security_user::where('id',$student['student_id']) |
246 | 246 | ->update(['address_area_id' => $mother->address_area_id]); |
247 | - }elseif(!is_null($guardian) && $guardian->address == $student['address']){ |
|
247 | + } elseif(!is_null($guardian) && $guardian->address == $student['address']){ |
|
248 | 248 | Security_user::where('id',$student['student_id']) |
249 | 249 | ->update(['address_area_id' => $guardian->address_area_id]); |
250 | 250 | } |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | $Initials = $Initials . '' . mb_substr($names[$i], 0, 1, "UTF-8"); |
17 | 17 | } |
18 | 18 | $nameWithInitials = $Initials . ' ' . $names[$length - 1]; |
19 | - }else{ |
|
19 | + } else{ |
|
20 | 20 | $nameWithInitials = $fullname; |
21 | 21 | } |
22 | 22 | return $nameWithInitials; |
@@ -38,8 +38,9 @@ discard block |
||
38 | 38 | function getMatchingKeys($array){ |
39 | 39 | $keys = []; |
40 | 40 | foreach ($array as $key => $value){ |
41 | - if(strstr($key , 'option')) |
|
42 | - $keys[] = $key; |
|
41 | + if(strstr($key , 'option')) { |
|
42 | + $keys[] = $key; |
|
43 | + } |
|
43 | 44 | } |
44 | 45 | return $keys; |
45 | 46 | } |
@@ -54,7 +55,9 @@ discard block |
||
54 | 55 | |
55 | 56 | function isEmptyRow($row) { |
56 | 57 | foreach($row as $cell){ |
57 | - if (null !== $cell) return false; |
|
58 | + if (null !== $cell) { |
|
59 | + return false; |
|
60 | + } |
|
58 | 61 | } |
59 | 62 | return true; |
60 | 63 | } |
@@ -95,7 +98,9 @@ discard block |
||
95 | 98 | function array_value_recursive($key, array $arr){ |
96 | 99 | $val = array(); |
97 | 100 | array_walk_recursive($arr, function($v, $k) use($key, &$val){ |
98 | - if($k == $key) array_push($val, $v); |
|
101 | + if($k == $key) { |
|
102 | + array_push($val, $v); |
|
103 | + } |
|
99 | 104 | }); |
100 | 105 | return count($val) > 1 ? $val : array_pop($val); |
101 | 106 | } |