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