@@ -124,17 +124,17 @@ discard block |
||
124 | 124 | */ |
125 | 125 | public function getShopIdFromDomain($domain) |
126 | 126 | { |
127 | - if (empty($domain)) { |
|
128 | - return false; |
|
129 | - } |
|
127 | + if (empty($domain)) { |
|
128 | + return false; |
|
129 | + } |
|
130 | 130 | |
131 | - $query = $this->shops->findByMyshopifyDomain([$domain]); |
|
131 | + $query = $this->shops->findByMyshopifyDomain([$domain]); |
|
132 | 132 | |
133 | - $shopEntity = $query->first(); |
|
133 | + $shopEntity = $query->first(); |
|
134 | 134 | |
135 | - if ($shopEntity->isEmpty()) { |
|
136 | - return false; |
|
137 | - } |
|
135 | + if ($shopEntity->isEmpty()) { |
|
136 | + return false; |
|
137 | + } |
|
138 | 138 | |
139 | 139 | if ($shopEntity->id) { |
140 | 140 | return (int)$shopEntity->id; |
@@ -150,9 +150,9 @@ discard block |
||
150 | 150 | */ |
151 | 151 | public function getShopDataFromAccessToken($accessToken, $apiKey) |
152 | 152 | { |
153 | - if (empty($accessToken) || empty($apiKey)) { |
|
154 | - return false; |
|
155 | - } |
|
153 | + if (empty($accessToken) || empty($apiKey)) { |
|
154 | + return false; |
|
155 | + } |
|
156 | 156 | |
157 | 157 | $query = $this->access_tokens->find(); |
158 | 158 | $query = $query->contain(['Shops']); |
@@ -165,11 +165,11 @@ discard block |
||
165 | 165 | |
166 | 166 | $shopEntity = $query->first(); |
167 | 167 | |
168 | - if ($shopEntity->isEmpty()) { |
|
169 | - return false; |
|
170 | - } |
|
168 | + if ($shopEntity->isEmpty()) { |
|
169 | + return false; |
|
170 | + } |
|
171 | 171 | |
172 | - $shopArray = $shopEntity->toArray(); |
|
172 | + $shopArray = $shopEntity->toArray(); |
|
173 | 173 | |
174 | 174 | if (is_array($shopArray['shop'])) { |
175 | 175 | return $shopArray['shop']; |
@@ -185,9 +185,9 @@ discard block |
||
185 | 185 | */ |
186 | 186 | public function getAccessTokenFromShopDomain($shopDomain, $apiKey) |
187 | 187 | { |
188 | - if (empty($shopDomain) || empty($apiKey)) { |
|
189 | - return false; |
|
190 | - } |
|
188 | + if (empty($shopDomain) || empty($apiKey)) { |
|
189 | + return false; |
|
190 | + } |
|
191 | 191 | |
192 | 192 | $query = $this->access_tokens->find(); |
193 | 193 | $query = $query->contain(['Shops']); |
@@ -200,9 +200,9 @@ discard block |
||
200 | 200 | |
201 | 201 | $accessTokenEntity = $query->first(); |
202 | 202 | |
203 | - if ($accessTokenEntity->isEmpty()) { |
|
204 | - return false; |
|
205 | - } |
|
203 | + if ($accessTokenEntity->isEmpty()) { |
|
204 | + return false; |
|
205 | + } |
|
206 | 206 | |
207 | 207 | if ($accessTokenEntity->token) { |
208 | 208 | return $accessTokenEntity->token; |