@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | |
105 | 105 | $shopEntity = $this->shops->findByMyshopifyDomain($domain)->first(); |
106 | 106 | if ($shopEntity->id) { |
107 | - return (int)$shopEntity->id; |
|
107 | + return (int) $shopEntity->id; |
|
108 | 108 | } else { |
109 | 109 | return false; |
110 | 110 | } |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | $query = $this->access_tokens->find(); |
117 | 117 | $query = $query->contain(['Shops']); |
118 | 118 | $query = $query->where(['api_key' => $apiKey, 'token' => $accessToken]); |
119 | - $query = $query->where(function ($exp, $q) { |
|
119 | + $query = $query->where(function($exp, $q) { |
|
120 | 120 | return $exp->isNull('expired_at'); |
121 | 121 | }); |
122 | 122 | |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | $query = $this->access_tokens->find(); |
136 | 136 | $query = $query->contain(['Shops']); |
137 | 137 | $query = $query->where(['api_key' => $apiKey, 'Shops.myshopify_domain' => $shopDomain]); |
138 | - $query = $query->where(function ($exp, $q) { |
|
138 | + $query = $query->where(function($exp, $q) { |
|
139 | 139 | return $exp->isNull('expired_at'); |
140 | 140 | }); |
141 | 141 |
@@ -110,7 +110,8 @@ discard block |
||
110 | 110 | $query = $this->access_tokens->find(); |
111 | 111 | $query = $query->contain(['Shops']); |
112 | 112 | $query = $query->where(['api_key' => $apiKey, 'token' => $accessToken]); |
113 | - $query = $query->where(function ($exp, $q) { |
|
113 | + $query = $query->where(function ($exp, $q) |
|
114 | + { |
|
114 | 115 | return $exp->isNull('expired_at'); |
115 | 116 | }); |
116 | 117 | |
@@ -128,7 +129,8 @@ discard block |
||
128 | 129 | $query = $this->access_tokens->find(); |
129 | 130 | $query = $query->contain(['Shops']); |
130 | 131 | $query = $query->where(['api_key' => $apiKey, 'Shops.myshopify_domain' => $shopDomain]); |
131 | - $query = $query->where(function ($exp, $q) { |
|
132 | + $query = $query->where(function ($exp, $q) |
|
133 | + { |
|
132 | 134 | return $exp->isNull('expired_at'); |
133 | 135 | }); |
134 | 136 |
@@ -147,7 +147,7 @@ |
||
147 | 147 | { |
148 | 148 | $params = explode("/", $this->response->getHeaderLine('http_x_shopify_shop_api_call_limit')); |
149 | 149 | |
150 | - return (int)$params[$index]; |
|
150 | + return (int) $params[$index]; |
|
151 | 151 | } |
152 | 152 | |
153 | 153 | public function getAuthorizeUrl($shopDomain, $redirectUrl) |
@@ -175,7 +175,7 @@ |
||
175 | 175 | /** |
176 | 176 | * @param string $shopDomain |
177 | 177 | * @param string $redirectUrl |
178 | - * @return int |
|
178 | + * @return string |
|
179 | 179 | */ |
180 | 180 | public function getAuthorizeUrl($shopDomain, $redirectUrl) |
181 | 181 | { |
@@ -64,7 +64,7 @@ |
||
64 | 64 | } |
65 | 65 | $scope = array_map('trim', $scope); |
66 | 66 | $scope = array_map('strtolower', $scope); |
67 | - array_walk($scope, function (&$value) { |
|
67 | + array_walk($scope, function(&$value) { |
|
68 | 68 | $value = str_replace(" ", "_", $value); |
69 | 69 | }); |
70 | 70 |
@@ -64,7 +64,8 @@ |
||
64 | 64 | } |
65 | 65 | $scope = array_map('trim', $scope); |
66 | 66 | $scope = array_map('strtolower', $scope); |
67 | - array_walk($scope, function (&$value) { |
|
67 | + array_walk($scope, function (&$value) |
|
68 | + { |
|
68 | 69 | $value = str_replace(" ", "_", $value); |
69 | 70 | }); |
70 | 71 |