@@ -22,7 +22,9 @@ |
||
22 | 22 | $vehResp = 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($vehResp, $key)) { |
27 | 29 | $vehResp->$key = $value; |
28 | 30 | } |
@@ -77,7 +77,9 @@ |
||
77 | 77 | $profResp = new self(); |
78 | 78 | |
79 | 79 | foreach ($params as $key => $value) { |
80 | - if (is_null(Common::getValue($params, $key))) continue; |
|
80 | + if (is_null(Common::getValue($params, $key))) { |
|
81 | + continue; |
|
82 | + } |
|
81 | 83 | if (property_exists($profResp, $key)) { |
82 | 84 | $profResp->$key = $value; |
83 | 85 | } |
@@ -27,7 +27,9 @@ |
||
27 | 27 | $ordParams = new self(); |
28 | 28 | |
29 | 29 | foreach ($params as $key => $value) { |
30 | - if (is_null(Common::getValue($params, $key))) continue; |
|
30 | + if (is_null(Common::getValue($params, $key))) { |
|
31 | + continue; |
|
32 | + } |
|
31 | 33 | if (property_exists($ordParams, $key)) { |
32 | 34 | $ordParams->$key = $value; |
33 | 35 | } |
@@ -42,7 +42,9 @@ |
||
42 | 42 | $vehicleTemp = 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($vehicleTemp, $key)) { |
47 | 49 | $vehicleTemp->$key = $value; |
48 | 50 | } |
@@ -83,7 +83,9 @@ |
||
83 | 83 | $vehiclesResponse = new self(); |
84 | 84 | |
85 | 85 | foreach ($params as $key => $value) { |
86 | - if (is_null(Common::getValue($params, $key))) continue; |
|
86 | + if (is_null(Common::getValue($params, $key))) { |
|
87 | + continue; |
|
88 | + } |
|
87 | 89 | if (property_exists($vehiclesResponse, $key)) { |
88 | 90 | $vehiclesResponse->$key = $value; |
89 | 91 | } |
@@ -137,7 +137,9 @@ |
||
137 | 137 | $vehicleCreateResponse = new self(); |
138 | 138 | |
139 | 139 | foreach ($params as $key => $value) { |
140 | - if (is_null(Common::getValue($params, $key))) continue; |
|
140 | + if (is_null(Common::getValue($params, $key))) { |
|
141 | + continue; |
|
142 | + } |
|
141 | 143 | if (property_exists($vehicleCreateResponse, $key)) { |
142 | 144 | $vehicleCreateResponse->$key = $value; |
143 | 145 | } |
@@ -103,5 +103,7 @@ |
||
103 | 103 | echo "\tDistance: " . $route->trip_distance . PHP_EOL; |
104 | 104 | echo "\tAddresses:" . PHP_EOL; |
105 | 105 | |
106 | - foreach($route->addresses as $address) echo "\t\t" . $address->address . PHP_EOL; |
|
107 | -} |
|
106 | + foreach($route->addresses as $address) { |
|
107 | + echo "\t\t" . $address->address . PHP_EOL; |
|
108 | + } |
|
109 | + } |
@@ -87,8 +87,7 @@ discard block |
||
87 | 87 | if($n == 0 || $n == 2 || $n == 4 || $n == 5) |
88 | 88 | { |
89 | 89 | $addr_obj->tags = ['TAG001', 'TAG002']; |
90 | - } |
|
91 | - else if($n == 1 || $n == 3) |
|
90 | + } else if($n == 1 || $n == 3) |
|
92 | 91 | { |
93 | 92 | $addr_obj->tags = ['TAG003']; |
94 | 93 | } |
@@ -112,5 +111,7 @@ discard block |
||
112 | 111 | echo "\tDistance: " . $route->trip_distance . PHP_EOL; |
113 | 112 | echo "\tAddresses:" . PHP_EOL; |
114 | 113 | |
115 | - foreach($route->addresses as $address) echo "\t\t" . $address->address . PHP_EOL; |
|
116 | -} |
|
114 | + foreach($route->addresses as $address) { |
|
115 | + echo "\t\t" . $address->address . PHP_EOL; |
|
116 | + } |
|
117 | + } |
@@ -86,7 +86,9 @@ discard block |
||
86 | 86 | foreach ($json as $address) { |
87 | 87 | |
88 | 88 | // skip persistent |
89 | - if($address['address'] == '4738 BELLEVUE AVE, Louisville, KY, 40215') continue; |
|
89 | + if($address['address'] == '4738 BELLEVUE AVE, Louisville, KY, 40215') { |
|
90 | + continue; |
|
91 | + } |
|
90 | 92 | |
91 | 93 | $addresses[] = Address::fromArray([ |
92 | 94 | 'address' => $address['address'], |
@@ -112,5 +114,7 @@ discard block |
||
112 | 114 | echo "\tDistance: " . $route->trip_distance . PHP_EOL; |
113 | 115 | echo "\tAddresses:" . PHP_EOL; |
114 | 116 | |
115 | - foreach($route->addresses as $address) echo "\t\t" . $address->address . PHP_EOL; |
|
116 | -} |
|
117 | + foreach($route->addresses as $address) { |
|
118 | + echo "\t\t" . $address->address . PHP_EOL; |
|
119 | + } |
|
120 | + } |