@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | } |
51 | 51 | |
52 | 52 | foreach (explode('.', $item) as $segment) { |
53 | - if (! is_array($decoded) || ! array_key_exists($segment, $decoded)) { |
|
53 | + if (!is_array($decoded) || !array_key_exists($segment, $decoded)) { |
|
54 | 54 | return $default; |
55 | 55 | } |
56 | 56 | |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | |
80 | 80 | try { |
81 | 81 | return $this->decoded = \GuzzleHttp\json_decode( |
82 | - (string) $this->getHttpResponse()->getBody(), |
|
82 | + (string)$this->getHttpResponse()->getBody(), |
|
83 | 83 | true |
84 | 84 | ); |
85 | 85 | } catch (\InvalidArgumentException $e) { |
@@ -62,7 +62,7 @@ |
||
62 | 62 | */ |
63 | 63 | public function update($pageId, GenericResource $page) |
64 | 64 | { |
65 | - $request = new PutJson('/admin/pages/' . $pageId. '.json', array('page' => $page->toArray())); |
|
65 | + $request = new PutJson('/admin/pages/' . $pageId . '.json', array('page' => $page->toArray())); |
|
66 | 66 | $response = $this->send($request); |
67 | 67 | return $this->createEntity($response->get('page')); |
68 | 68 | } |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | { |
20 | 20 | $handlers = HandlerStack::create(); |
21 | 21 | $handlers->push(Middleware::retry( |
22 | - function ($retries, RequestInterface $request, ResponseInterface $response = null, \Exception $error = null) { |
|
22 | + function($retries, RequestInterface $request, ResponseInterface $response = null, \Exception $error = null) { |
|
23 | 23 | |
24 | 24 | // todo rate limit by this |
25 | 25 | //$response->getHeaderLine('X-Shopify-Shop-Api-Call-Limit'); |
@@ -29,15 +29,15 @@ discard block |
||
29 | 29 | |
30 | 30 | return false; |
31 | 31 | }, |
32 | - function ($retries, ResponseInterface $response) { |
|
32 | + function($retries, ResponseInterface $response) { |
|
33 | 33 | if (!$response->hasHeader('Retry-After')) { |
34 | 34 | return 1000; |
35 | 35 | } |
36 | 36 | |
37 | - dump((float) $response->getHeaderLine('Retry-After') * 1000); |
|
37 | + dump((float)$response->getHeaderLine('Retry-After') * 1000); |
|
38 | 38 | die(); |
39 | 39 | |
40 | - return (float) $response->getHeaderLine('Retry-After') * 1000; |
|
40 | + return (float)$response->getHeaderLine('Retry-After') * 1000; |
|
41 | 41 | } |
42 | 42 | )); |
43 | 43 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | public function __construct($url, array $params = array()) |
13 | 13 | { |
14 | 14 | if (!empty($params)) { |
15 | - $url .= '?'.http_build_query($params); |
|
15 | + $url .= '?' . http_build_query($params); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | parent::__construct('GET', $url, [ |
@@ -17,7 +17,7 @@ |
||
17 | 17 | } |
18 | 18 | |
19 | 19 | if (!empty($params)) { |
20 | - $url .= '?'.http_build_query($params); |
|
20 | + $url .= '?' . http_build_query($params); |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | $headers = [ |
@@ -12,7 +12,7 @@ |
||
12 | 12 | public function __construct($url, array $params = array()) |
13 | 13 | { |
14 | 14 | if (!empty($params)) { |
15 | - $url .= '?'.http_build_query($params); |
|
15 | + $url .= '?' . http_build_query($params); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | parent::__construct('GET', $url); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | public function __construct($url, array $params = array()) |
13 | 13 | { |
14 | 14 | if (!empty($params)) { |
15 | - $url .= '?'.http_build_query($params); |
|
15 | + $url .= '?' . http_build_query($params); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | parent::__construct('DELETE', $url); |
@@ -17,7 +17,7 @@ |
||
17 | 17 | } |
18 | 18 | |
19 | 19 | if (!empty($params)) { |
20 | - $url .= '?'.http_build_query($params); |
|
20 | + $url .= '?' . http_build_query($params); |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | $headers = [ |
@@ -24,7 +24,7 @@ |
||
24 | 24 | $container->setParameter('codecloud_shopify.api_version', $config['api_version']); |
25 | 25 | |
26 | 26 | foreach ($config['oauth'] as $key => $value) { |
27 | - $container->setParameter('codecloud_shopify.oauth.'.$key, $value); |
|
27 | + $container->setParameter('codecloud_shopify.oauth.' . $key, $value); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | $loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |