@@ -16,7 +16,7 @@ |
||
| 16 | 16 | static $name = 'PickPoint - курьерская служба'; |
| 17 | 17 | |
| 18 | 18 | /** |
| 19 | - * @param \Ecommerce\Cart $cart |
|
| 19 | + * @param string $URL |
|
| 20 | 20 | * @return \Money\Sums |
| 21 | 21 | */ |
| 22 | 22 | static function curl_get_file_contents($URL, $data) { |
@@ -35,8 +35,11 @@ |
||
| 35 | 35 | $contents = curl_exec($c); |
| 36 | 36 | curl_close($c); |
| 37 | 37 | |
| 38 | - if ($contents) return $contents; |
|
| 39 | - else return FALSE; |
|
| 38 | + if ($contents) { |
|
| 39 | + return $contents; |
|
| 40 | + } else { |
|
| 41 | + return FALSE; |
|
| 42 | + } |
|
| 40 | 43 | } |
| 41 | 44 | |
| 42 | 45 | static function calcPrice($cart) { |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | curl_close($c); |
| 37 | 37 | |
| 38 | 38 | if ($contents) return $contents; |
| 39 | - else return FALSE; |
|
| 39 | + else return false; |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | static function calcPrice($cart) { |
@@ -49,6 +49,6 @@ |
||
| 49 | 49 | ]; |
| 50 | 50 | $result = json_decode(file_get_contents($url . http_build_query($data)), true); |
| 51 | 51 | $sum = !empty($result['tariff'][0]['ground']['valnds']) ? $result['tariff'][0]['ground']['valnds'] : (!empty($result['tariff'][0]['avia']['valnds']) ? $result['tariff'][0]['avia']['valnds'] : 0); |
| 52 | - return new \Money\Sums([$cart->delivery->currency_id => $sum/100]); |
|
| 52 | + return new \Money\Sums([$cart->delivery->currency_id => $sum / 100]); |
|
| 53 | 53 | } |
| 54 | 54 | } |
| 55 | 55 | \ No newline at end of file |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | ob_end_clean(); |
| 197 | 197 | |
| 198 | 198 | $cols = []; |
| 199 | - if($actions) { |
|
| 199 | + if ($actions) { |
|
| 200 | 200 | $cols[] = ['label' => $dropdown]; |
| 201 | 201 | } |
| 202 | 202 | $cols['id'] = ['label' => '№', 'sortable' => true]; |
@@ -244,10 +244,10 @@ discard block |
||
| 244 | 244 | $queryParams = []; |
| 245 | 245 | if (empty($params['all'])) { |
| 246 | 246 | if (!empty($params['limit'])) { |
| 247 | - $this->limit = (int)$params['limit']; |
|
| 247 | + $this->limit = (int) $params['limit']; |
|
| 248 | 248 | } |
| 249 | 249 | if (!empty($params['page'])) { |
| 250 | - $this->page = (int)$params['page']; |
|
| 250 | + $this->page = (int) $params['page']; |
|
| 251 | 251 | } |
| 252 | 252 | $queryParams['limit'] = $this->limit; |
| 253 | 253 | $queryParams['start'] = $this->page * $this->limit - $this->limit; |
@@ -557,10 +557,10 @@ discard block |
||
| 557 | 557 | return []; |
| 558 | 558 | } |
| 559 | 559 | if (!empty($params['limit'])) { |
| 560 | - $this->limit = (int)$params['limit']; |
|
| 560 | + $this->limit = (int) $params['limit']; |
|
| 561 | 561 | } |
| 562 | 562 | if (!empty($params['page'])) { |
| 563 | - $this->page = (int)$params['page']; |
|
| 563 | + $this->page = (int) $params['page']; |
|
| 564 | 564 | } |
| 565 | 565 | $queryParams = [ |
| 566 | 566 | 'count' => true |