@@ -294,7 +294,9 @@ |
||
294 | 294 | |
295 | 295 | public static function tearDownAfterClass() |
296 | 296 | { |
297 | - if (sizeof(self::$createdTerritories)<1) return; |
|
297 | + if (sizeof(self::$createdTerritories)<1) { |
|
298 | + return; |
|
299 | + } |
|
298 | 300 | |
299 | 301 | $territory = new Territory(); |
300 | 302 |
@@ -199,8 +199,7 @@ |
||
199 | 199 | |
200 | 200 | if ($result==true) { |
201 | 201 | echo "The test avoidance zone with territory_id=".$territoryId." removed. <br>"; |
202 | - } |
|
203 | - else { |
|
202 | + } else { |
|
204 | 203 | echo "Cannot remove the test avoidance zone with territory_id=".$territoryId."<br>"; |
205 | 204 | } |
206 | 205 |
@@ -383,7 +383,9 @@ |
||
383 | 383 | |
384 | 384 | public function testValidateScheduleNthWhat() |
385 | 385 | { |
386 | - for ($i=1;$i<11;$i++) $this->assertTrue(AddressBookLocation::validateScheduleNthWhat($i)); |
|
386 | + for ($i=1;$i<11;$i++) { |
|
387 | + $this->assertTrue(AddressBookLocation::validateScheduleNthWhat($i)); |
|
388 | + } |
|
387 | 389 | |
388 | 390 | $this->assertFalse(AddressBookLocation::validateScheduleNthWhat(0)); |
389 | 391 | $this->assertFalse(AddressBookLocation::validateScheduleNthWhat(14)); |
@@ -59,7 +59,9 @@ discard block |
||
59 | 59 | |
60 | 60 | assert(is_array($duplicateResult1), "Cannot duplicate the route<br>"); |
61 | 61 | |
62 | -if (!$duplicateResult1['status'] || sizeof($duplicateResult1['route_ids'])<1) die("Cannot duplicate the route<br>"); |
|
62 | +if (!$duplicateResult1['status'] || sizeof($duplicateResult1['route_ids'])<1) { |
|
63 | + die("Cannot duplicate the route<br>"); |
|
64 | +} |
|
63 | 65 | |
64 | 66 | $duplicatedRouteId1 = $duplicateResult1['route_ids'][0]; |
65 | 67 | |
@@ -95,7 +97,9 @@ discard block |
||
95 | 97 | |
96 | 98 | assert(is_array($duplicateResult2), "Cannot duplicate the route<br>"); |
97 | 99 | |
98 | -if (!$duplicateResult2['status'] || sizeof($duplicateResult2['route_ids'])<1) die("Cannot duplicate the route<br>"); |
|
100 | +if (!$duplicateResult2['status'] || sizeof($duplicateResult2['route_ids'])<1) { |
|
101 | + die("Cannot duplicate the route<br>"); |
|
102 | +} |
|
99 | 103 | |
100 | 104 | $duplicatedRouteId2 = $duplicateResult2['route_ids'][0]; |
101 | 105 |
@@ -390,8 +390,12 @@ discard block |
||
390 | 390 | public static function validateScheduleEnable($scheduleEnabled) |
391 | 391 | { |
392 | 392 | if (is_string($scheduleEnabled)) { |
393 | - if (strtolower($scheduleEnabled)=="true") $scheduleEnabled = true; |
|
394 | - if (strtolower($scheduleEnabled)=="false") $scheduleEnabled = false; |
|
393 | + if (strtolower($scheduleEnabled)=="true") { |
|
394 | + $scheduleEnabled = true; |
|
395 | + } |
|
396 | + if (strtolower($scheduleEnabled)=="false") { |
|
397 | + $scheduleEnabled = false; |
|
398 | + } |
|
395 | 399 | } |
396 | 400 | |
397 | 401 | $schedEnables = [true, false,]; |
@@ -418,7 +422,9 @@ discard block |
||
418 | 422 | |
419 | 423 | public static function validateScheduleWeekDays($scheduleWeekDays) |
420 | 424 | { |
421 | - if (is_bool($scheduleWeekDays)) return false; |
|
425 | + if (is_bool($scheduleWeekDays)) { |
|
426 | + return false; |
|
427 | + } |
|
422 | 428 | |
423 | 429 | $weekdays = explode(',', $scheduleWeekDays); |
424 | 430 | $weekdaysSize = sizeof($weekdays); |
@@ -458,7 +464,9 @@ discard block |
||
458 | 464 | |
459 | 465 | public static function validateScheduleMonthlyDates($scheduleMonthlyDates) |
460 | 466 | { |
461 | - if (is_bool($scheduleMonthlyDates)) return false; |
|
467 | + if (is_bool($scheduleMonthlyDates)) { |
|
468 | + return false; |
|
469 | + } |
|
462 | 470 | |
463 | 471 | $monthlyDates = explode(',', $scheduleMonthlyDates); |
464 | 472 | $monthlyDatesSize = sizeof($monthlyDates); |
@@ -178,7 +178,9 @@ |
||
178 | 178 | 'method' => 'GET', |
179 | 179 | ]); |
180 | 180 | |
181 | - if (is_null($result) || !is_array($result)) return null; |
|
181 | + if (is_null($result) || !is_array($result)) { |
|
182 | + return null; |
|
183 | + } |
|
182 | 184 | |
183 | 185 | foreach ($result as $custNoteType) { |
184 | 186 | if (isset($custNoteType["note_custom_type"]) && $custNoteType["note_custom_type"] == $params) { |
@@ -32,7 +32,9 @@ |
||
32 | 32 | $orderParams = new self(); |
33 | 33 | |
34 | 34 | foreach ($params as $key => $value) { |
35 | - if (is_null(Common::getValue($params, $key))) continue; |
|
35 | + if (is_null(Common::getValue($params, $key))) { |
|
36 | + continue; |
|
37 | + } |
|
36 | 38 | if (property_exists($orderParams, $key)) { |
37 | 39 | $orderParams->$key = $value; |
38 | 40 | } |
@@ -42,7 +42,9 @@ |
||
42 | 42 | $vehParams = new self(); |
43 | 43 | |
44 | 44 | foreach ($params as $key => $value) { |
45 | - if (is_null(Common::getValue($params, $key))) continue; |
|
45 | + if (is_null(Common::getValue($params, $key))) { |
|
46 | + continue; |
|
47 | + } |
|
46 | 48 | if (property_exists($vehParams, $key)) { |
47 | 49 | $vehParams->$key = $value; |
48 | 50 | } |
@@ -22,7 +22,9 @@ |
||
22 | 22 | $vehicleTrack = new self(); |
23 | 23 | |
24 | 24 | foreach ($params as $key => $value) { |
25 | - if (is_null(Common::getValue($params, $key))) continue; |
|
25 | + if (is_null(Common::getValue($params, $key))) { |
|
26 | + continue; |
|
27 | + } |
|
26 | 28 | if (property_exists($vehicleTrack, $key)) { |
27 | 29 | $vehicleTrack->$key = $value; |
28 | 30 | } |