| @@ -113,7 +113,7 @@ discard block | ||
| 113 | 113 | $query = $query->contain(['Shops']); | 
| 114 | 114 | $query = $query->where(['api_key' => $apiKey, 'token' => $accessToken]); | 
| 115 | 115 | $query = $query->where( | 
| 116 | -            function ($exp, $q) { | |
| 116 | +            function($exp, $q) { | |
| 117 | 117 |                  return $exp->isNull('expired_at'); | 
| 118 | 118 | } | 
| 119 | 119 | ); | 
| @@ -133,7 +133,7 @@ discard block | ||
| 133 | 133 | $query = $query->contain(['Shops']); | 
| 134 | 134 | $query = $query->where(['api_key' => $apiKey, 'Shops.myshopify_domain' => $shopDomain]); | 
| 135 | 135 | $query = $query->where( | 
| 136 | -            function ($exp, $q) { | |
| 136 | +            function($exp, $q) { | |
| 137 | 137 |                  return $exp->isNull('expired_at'); | 
| 138 | 138 | } | 
| 139 | 139 | ); | 
| @@ -113,7 +113,8 @@ discard block | ||
| 113 | 113 | $query = $query->contain(['Shops']); | 
| 114 | 114 | $query = $query->where(['api_key' => $apiKey, 'token' => $accessToken]); | 
| 115 | 115 | $query = $query->where( | 
| 116 | -            function ($exp, $q) { | |
| 116 | + function ($exp, $q) | |
| 117 | +            { | |
| 117 | 118 |                  return $exp->isNull('expired_at'); | 
| 118 | 119 | } | 
| 119 | 120 | ); | 
| @@ -133,7 +134,8 @@ discard block | ||
| 133 | 134 | $query = $query->contain(['Shops']); | 
| 134 | 135 | $query = $query->where(['api_key' => $apiKey, 'Shops.myshopify_domain' => $shopDomain]); | 
| 135 | 136 | $query = $query->where( | 
| 136 | -            function ($exp, $q) { | |
| 137 | + function ($exp, $q) | |
| 138 | +            { | |
| 137 | 139 |                  return $exp->isNull('expired_at'); | 
| 138 | 140 | } | 
| 139 | 141 | ); | 
| @@ -66,7 +66,8 @@ | ||
| 66 | 66 |                  $scope = array_map('strtolower', $scope); | 
| 67 | 67 | array_walk( | 
| 68 | 68 | $scope, | 
| 69 | -                    function (&$value) { | |
| 69 | + function (&$value) | |
| 70 | +                    { | |
| 70 | 71 |                          $value = str_replace(" ", "_", $value); | 
| 71 | 72 | } | 
| 72 | 73 | ); | 
| @@ -51,24 +51,24 @@ | ||
| 51 | 51 | |
| 52 | 52 | $scopeArray = | 
| 53 | 53 | ['read_content', | 
| 54 | - 'write_content', | |
| 55 | - 'read_themes', | |
| 56 | - 'write_themes', | |
| 57 | - 'read_products', | |
| 58 | - 'write_products', | |
| 59 | - 'read_customers', | |
| 60 | - 'write_customers', | |
| 61 | - 'read_orders', | |
| 62 | - 'write_orders', | |
| 63 | - 'read_script_tags', | |
| 64 | - 'write_script_tags', | |
| 65 | - 'read_fulfillments', | |
| 66 | - 'write_fulfillments', | |
| 67 | - 'read_shipping', | |
| 68 | - 'write_shipping', | |
| 69 | - 'read_analytics', | |
| 70 | - 'read_users', | |
| 71 | - 'write_users']; | |
| 54 | + 'write_content', | |
| 55 | + 'read_themes', | |
| 56 | + 'write_themes', | |
| 57 | + 'read_products', | |
| 58 | + 'write_products', | |
| 59 | + 'read_customers', | |
| 60 | + 'write_customers', | |
| 61 | + 'read_orders', | |
| 62 | + 'write_orders', | |
| 63 | + 'read_script_tags', | |
| 64 | + 'write_script_tags', | |
| 65 | + 'read_fulfillments', | |
| 66 | + 'write_fulfillments', | |
| 67 | + 'read_shipping', | |
| 68 | + 'write_shipping', | |
| 69 | + 'read_analytics', | |
| 70 | + 'read_users', | |
| 71 | + 'write_users']; | |
| 72 | 72 | |
| 73 | 73 |              $this->out('Enter your application\'s scope here.', 2); | 
| 74 | 74 |              $this->out('Valid scope options:', 2); | 
| @@ -37,7 +37,7 @@ discard block | ||
| 37 | 37 |          $firstRun = ((Configure::check('Multidimensional/Cakephpify')) ? false : true); | 
| 38 | 38 | |
| 39 | 39 | //Activate Plugin | 
| 40 | -        if ((($firstRun) ? (strtolower($this->in('Install Shopify Plugin?', ['y', 'n'])) == 'y'): (strtolower($this->in('Update Configuration?', ['y', 'n'])) == 'y')) | |
| 40 | +        if ((($firstRun) ? (strtolower($this->in('Install Shopify Plugin?', ['y', 'n'])) == 'y') : (strtolower($this->in('Update Configuration?', ['y', 'n'])) == 'y')) | |
| 41 | 41 |          ) { | 
| 42 | 42 | $this->out(); | 
| 43 | 43 |              $this->out('Please enter your API credentials from your Shopify App page.', 2); | 
| @@ -88,7 +88,7 @@ discard block | ||
| 88 | 88 |                  $scope = array_map('strtolower', $scope); | 
| 89 | 89 | array_walk( | 
| 90 | 90 | $scope, | 
| 91 | -                    function (&$value) { | |
| 91 | +                    function(&$value) { | |
| 92 | 92 |                          $value = str_replace(" ", "_", $value); | 
| 93 | 93 | } | 
| 94 | 94 | ); | 
| @@ -73,7 +73,7 @@ discard block | ||
| 73 | 73 | /** | 
| 74 | 74 | * @param Request $request | 
| 75 | 75 | * @param Response $response | 
| 76 | - * @return null|Response | |
| 76 | + * @return null|string | |
| 77 | 77 | */ | 
| 78 | 78 | public function unauthenticated(Request $request, Response $response) | 
| 79 | 79 |      { | 
| @@ -184,7 +184,7 @@ discard block | ||
| 184 | 184 | } | 
| 185 | 185 | |
| 186 | 186 | /** | 
| 187 | - * @return Router | |
| 187 | + * @return string | |
| 188 | 188 | */ | 
| 189 | 189 | private function _generateLoginUrl() | 
| 190 | 190 |      { |