@@ -108,7 +108,7 @@ |
||
| 108 | 108 | |
| 109 | 109 | $this->render('validate'); |
| 110 | 110 | |
| 111 | - } elseif (!empty($this->request->data['shop_domain']) && !$this->error) { |
|
| 111 | + } elseif (!empty($this->request->data['shop_domain']) && !$this->error) { |
|
| 112 | 112 | |
| 113 | 113 | $valid_domain = $this->ShopifyAPI->validDomain( |
| 114 | 114 | $this->request->data['shop_domain'] |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | * Initialize AppController |
| 25 | 25 | * |
| 26 | 26 | * @return void |
| 27 | - */ |
|
| 27 | + */ |
|
| 28 | 28 | public function initialize() |
| 29 | 29 | { |
| 30 | 30 | parent::initialize(); |
@@ -17,16 +17,14 @@ |
||
| 17 | 17 | |
| 18 | 18 | use App\Controller\AppController as BaseController; |
| 19 | 19 | |
| 20 | -class AppController extends BaseController |
|
| 21 | -{ |
|
| 20 | +class AppController extends BaseController { |
|
| 22 | 21 | |
| 23 | 22 | /** |
| 24 | 23 | * Initialize AppController |
| 25 | 24 | * |
| 26 | 25 | * @return void |
| 27 | 26 | */ |
| 28 | - public function initialize() |
|
| 29 | - { |
|
| 27 | + public function initialize() { |
|
| 30 | 28 | parent::initialize(); |
| 31 | 29 | $this->loadComponent('Flash'); |
| 32 | 30 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | $this->api_key = ((isset($config['api_key'])) ? $config['api_key'] : Configure::read('Shopify.api_key')); |
| 38 | 38 | $this->shared_secret = ((isset($config['shared_secret'])) ? $config['shared_secret'] : Configure::read('Shopify.shared_secret')); |
| 39 | 39 | $this->scope = ((isset($config['scope'])) ? $config['scope'] : Configure::read('Shopify.scope')); |
| 40 | - $this->is_private_app = ((isset($config['is_private_app'])) ? $config['is_private_app'] : Configure::read('Shopify.is_private_app')); |
|
| 40 | + $this->is_private_app = ((isset($config['is_private_app'])) ? $config['is_private_app'] : Configure::read('Shopify.is_private_app')); |
|
| 41 | 41 | $this->private_app_password = ((isset($config['private_app_password'])) ? $config['private_app_password'] : Configure::read('Shopify.private_app_password')); |
| 42 | 42 | |
| 43 | 43 | } |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | return false; |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | - } |
|
| 133 | + } |
|
| 134 | 134 | |
| 135 | 135 | public function setNonce($shop_domain) { |
| 136 | 136 | |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | $string = implode("&", $dataString); |
| 178 | 178 | return $query['hmac'] == hash_hmac('sha256', $string, $this->shared_secret); |
| 179 | 179 | |
| 180 | - } |
|
| 180 | + } |
|
| 181 | 181 | |
| 182 | 182 | private function _urlEncode($url) { |
| 183 | 183 | |
@@ -68,8 +68,7 @@ |
||
| 68 | 68 | * @property bool $setup_required |
| 69 | 69 | * @property bool $force_ssl |
| 70 | 70 | */ |
| 71 | -class Shop extends Entity |
|
| 72 | -{ |
|
| 71 | +class Shop extends Entity { |
|
| 73 | 72 | |
| 74 | 73 | /** |
| 75 | 74 | * Fields that can be mass assigned using newEntity() or patchEntity(). |
@@ -27,8 +27,7 @@ |
||
| 27 | 27 | * @property \Cake\I18n\Time $updated_at |
| 28 | 28 | * @property \Cake\I18n\Time $expired_at |
| 29 | 29 | */ |
| 30 | -class AccessToken extends Entity |
|
| 31 | -{ |
|
| 30 | +class AccessToken extends Entity { |
|
| 32 | 31 | |
| 33 | 32 | /** |
| 34 | 33 | * Fields that can be mass assigned using newEntity() or patchEntity(). |
@@ -31,8 +31,7 @@ discard block |
||
| 31 | 31 | * @method \Shopify\Model\Entity\AccessToken[] patchEntities($entities, array $data, array $options = []) |
| 32 | 32 | * @method \Shopify\Model\Entity\AccessToken findOrCreate($search, callable $callback = null) |
| 33 | 33 | */ |
| 34 | -class AccessTokensTable extends Table |
|
| 35 | -{ |
|
| 34 | +class AccessTokensTable extends Table { |
|
| 36 | 35 | |
| 37 | 36 | /** |
| 38 | 37 | * Initialize method |
@@ -40,8 +39,7 @@ discard block |
||
| 40 | 39 | * @param array $config The configuration for the Table. |
| 41 | 40 | * @return void |
| 42 | 41 | */ |
| 43 | - public function initialize(array $config) |
|
| 44 | - { |
|
| 42 | + public function initialize(array $config) { |
|
| 45 | 43 | parent::initialize($config); |
| 46 | 44 | |
| 47 | 45 | //$this->table('access_tokens'); |
@@ -58,8 +56,7 @@ discard block |
||
| 58 | 56 | * @param \Cake\Validation\Validator $validator Validator instance. |
| 59 | 57 | * @return \Cake\Validation\Validator |
| 60 | 58 | */ |
| 61 | - public function validationDefault(Validator $validator) |
|
| 62 | - { |
|
| 59 | + public function validationDefault(Validator $validator) { |
|
| 63 | 60 | $validator |
| 64 | 61 | ->integer('id') |
| 65 | 62 | ->allowEmpty('id', 'create'); |
@@ -101,8 +98,7 @@ discard block |
||
| 101 | 98 | * @param \Cake\ORM\RulesChecker $rules The rules object to be modified. |
| 102 | 99 | * @return \Cake\ORM\RulesChecker |
| 103 | 100 | */ |
| 104 | - public function buildRules(RulesChecker $rules) |
|
| 105 | - { |
|
| 101 | + public function buildRules(RulesChecker $rules) { |
|
| 106 | 102 | $rules->add($rules->isUnique(['token'])); |
| 107 | 103 | |
| 108 | 104 | return $rules; |
@@ -31,8 +31,7 @@ discard block |
||
| 31 | 31 | * @method \App\Model\Entity\Shop[] patchEntities($entities, array $data, array $options = []) |
| 32 | 32 | * @method \App\Model\Entity\Shop findOrCreate($search, callable $callback = null) |
| 33 | 33 | */ |
| 34 | -class ShopsTable extends Table |
|
| 35 | -{ |
|
| 34 | +class ShopsTable extends Table { |
|
| 36 | 35 | |
| 37 | 36 | /** |
| 38 | 37 | * Initialize method |
@@ -40,8 +39,7 @@ discard block |
||
| 40 | 39 | * @param array $config The configuration for the Table. |
| 41 | 40 | * @return void |
| 42 | 41 | */ |
| 43 | - public function initialize(array $config) |
|
| 44 | - { |
|
| 42 | + public function initialize(array $config) { |
|
| 45 | 43 | parent::initialize($config); |
| 46 | 44 | |
| 47 | 45 | //$this->table('shops'); |
@@ -60,8 +58,7 @@ discard block |
||
| 60 | 58 | * @param \Cake\Validation\Validator $validator Validator instance. |
| 61 | 59 | * @return \Cake\Validation\Validator |
| 62 | 60 | */ |
| 63 | - public function validationDefault(Validator $validator) |
|
| 64 | - { |
|
| 61 | + public function validationDefault(Validator $validator) { |
|
| 65 | 62 | $validator |
| 66 | 63 | ->integer('id') |
| 67 | 64 | ->allowEmpty('id', 'create'); |
@@ -258,8 +255,7 @@ discard block |
||
| 258 | 255 | * @param \Cake\ORM\RulesChecker $rules The rules object to be modified. |
| 259 | 256 | * @return \Cake\ORM\RulesChecker |
| 260 | 257 | */ |
| 261 | - public function buildRules(RulesChecker $rules) |
|
| 262 | - { |
|
| 258 | + public function buildRules(RulesChecker $rules) { |
|
| 263 | 259 | $rules->add($rules->isUnique(['email'])); |
| 264 | 260 | |
| 265 | 261 | return $rules; |
@@ -18,11 +18,9 @@ |
||
| 18 | 18 | use Cake\Console\Shell; |
| 19 | 19 | use Cake\Console\Helper; |
| 20 | 20 | |
| 21 | -class TableHelper extends Helper |
|
| 22 | -{ |
|
| 21 | +class TableHelper extends Helper { |
|
| 23 | 22 | |
| 24 | - public function output($data, $columns = 10, $terminal_width = 80) |
|
| 25 | - { |
|
| 23 | + public function output($data, $columns = 10, $terminal_width = 80) { |
|
| 26 | 24 | while((count($data)%$columns != 0) && ($columns > 5)) { |
| 27 | 25 | $columns--; |
| 28 | 26 | } |
@@ -17,10 +17,8 @@ |
||
| 17 | 17 | |
| 18 | 18 | use Cake\Console\Helper; |
| 19 | 19 | |
| 20 | -class HeaderHelper extends Helper |
|
| 21 | -{ |
|
| 22 | - public function output($args = null) |
|
| 23 | - { |
|
| 20 | +class HeaderHelper extends Helper { |
|
| 21 | + public function output($args = null) { |
|
| 24 | 22 | $this->_io->out("\n\n"); |
| 25 | 23 | $this->_io->styles('header', ['text' => 'green']); |
| 26 | 24 | $this->_io->out('<header> _____ __ ______ ____ ____________ __</header>'); |