Skip to content

Commit cd4ffd1

Browse files
authored
Merge pull request gnikyt#152 from ohmybrew/analysis-8LVyvo
Apply fixes from StyleCI
2 parents 68e71eb + 3b7ded9 commit cd4ffd1

39 files changed

+113
-137
lines changed

src/ShopifyApp/Jobs/AppUninstalledJob.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
use Illuminate\Foundation\Bus\Dispatchable;
88
use Illuminate\Queue\InteractsWithQueue;
99
use Illuminate\Queue\SerializesModels;
10+
use Illuminate\Support\Facades\Config;
1011
use OhMyBrew\ShopifyApp\Models\Charge;
1112
use OhMyBrew\ShopifyApp\Models\Shop;
12-
use Illuminate\Support\Facades\Config;
1313

1414
/**
1515
* Webhook job responsible for handling when the app is uninstalled.

src/ShopifyApp/Middleware/AuthShop.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
use Closure;
66
use Illuminate\Http\Request;
77
use Illuminate\Http\Response;
8+
use Illuminate\Support\Facades\Config;
89
use Illuminate\Support\Facades\Redirect;
910
use Illuminate\Support\Facades\Session;
10-
use Illuminate\Support\Facades\Config;
1111
use OhMyBrew\ShopifyApp\Facades\ShopifyApp;
1212

1313
/**

src/ShopifyApp/Models/Charge.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
namespace OhMyBrew\ShopifyApp\Models;
44

55
use Exception;
6-
use Illuminate\Support\Carbon;
76
use Illuminate\Database\Eloquent\Model;
87
use Illuminate\Database\Eloquent\SoftDeletes;
9-
use OhMyBrew\ShopifyApp\Models\Shop;
10-
use OhMyBrew\ShopifyApp\Models\Plan;
8+
use Illuminate\Support\Carbon;
119

1210
/**
1311
* Responsible for reprecenting a charge record.

src/ShopifyApp/Models/Plan.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace OhMyBrew\ShopifyApp\Models;
44

55
use Illuminate\Database\Eloquent\Model;
6-
use OhMyBrew\ShopifyApp\Models\Charge;
76

87
/**
98
* Responsible for reprecenting a plan record.

src/ShopifyApp/Requests/AuthShop.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22

33
namespace OhMyBrew\ShopifyApp\Requests;
44

5-
use Illuminate\Support\Collection;
6-
use Illuminate\Validation\Validator;
75
use Illuminate\Foundation\Http\FormRequest;
8-
use OhMyBrew\ShopifyApp\Facades\ShopifyApp;
6+
use Illuminate\Validation\Validator;
97
use OhMyBrew\ShopifyApp\Services\AuthShopHandler;
108

119
/**
@@ -16,7 +14,7 @@ class AuthShop extends FormRequest
1614
/**
1715
* Configure the validator instance.
1816
*
19-
* @param \Illuminate\Validation\Validator $validator
17+
* @param \Illuminate\Validation\Validator $validator
2018
*
2119
* @return void
2220
*/

src/ShopifyApp/Requests/StoreUsageCharge.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22

33
namespace OhMyBrew\ShopifyApp\Requests;
44

5-
use Illuminate\Validation\Validator;
65
use Illuminate\Foundation\Http\FormRequest;
7-
use Illuminate\Support\Collection;
6+
use Illuminate\Validation\Validator;
87
use OhMyBrew\ShopifyApp\Facades\ShopifyApp;
98

109
/**
@@ -15,7 +14,7 @@ class StoreUsageCharge extends FormRequest
1514
/**
1615
* Configure the validator instance.
1716
*
18-
* @param \Illuminate\Validation\Validator $validator
17+
* @param \Illuminate\Validation\Validator $validator
1918
*
2019
* @return void
2120
*/

src/ShopifyApp/Services/AuthShopHandler.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
namespace OhMyBrew\ShopifyApp\Services;
44

55
use Exception;
6-
use Illuminate\Support\Facades\URL;
7-
use OhMyBrew\ShopifyApp\Models\Shop;
86
use Illuminate\Support\Facades\Config;
97
use Illuminate\Support\Facades\Session;
8+
use Illuminate\Support\Facades\URL;
109
use OhMyBrew\ShopifyApp\Facades\ShopifyApp;
11-
use OhMyBrew\ShopifyApp\Jobs\WebhookInstaller;
1210
use OhMyBrew\ShopifyApp\Jobs\ScripttagInstaller;
11+
use OhMyBrew\ShopifyApp\Jobs\WebhookInstaller;
12+
use OhMyBrew\ShopifyApp\Models\Shop;
1313

1414
/**
1515
* Responsible for handling how to authenticate a shop.
@@ -83,7 +83,7 @@ public function buildAuthUrl()
8383
*
8484
* @param array $request The request parameters.
8585
*
86-
* @return boolean
86+
* @return bool
8787
*/
8888
public function verifyRequest(array $request)
8989
{
@@ -104,7 +104,7 @@ public function storeAccessToken(string $code)
104104
$this->shop->restore();
105105
$this->shop->charges()->restore();
106106
}
107-
107+
108108
// Save the token to the shop
109109
$this->shop->shopify_token = $this->api->requestAccessToken($code);
110110
$this->shop->save();
@@ -113,7 +113,7 @@ public function storeAccessToken(string $code)
113113
/**
114114
* Dispatches the jobs that happen after authentication.
115115
*
116-
* @return boolean
116+
* @return bool
117117
*/
118118
public function dispatchJobs()
119119
{

src/ShopifyApp/Services/BillingPlan.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
namespace OhMyBrew\ShopifyApp\Services;
44

55
use Exception;
6-
use OhMyBrew\ShopifyApp\Models\Plan;
7-
use OhMyBrew\ShopifyApp\Models\Shop;
8-
use OhMyBrew\ShopifyApp\Models\Charge;
6+
use Illuminate\Support\Carbon;
97
use Illuminate\Support\Facades\Config;
108
use Illuminate\Support\Facades\URL;
11-
use Illuminate\Support\Carbon;
9+
use OhMyBrew\ShopifyApp\Models\Charge;
10+
use OhMyBrew\ShopifyApp\Models\Plan;
11+
use OhMyBrew\ShopifyApp\Models\Shop;
1212

1313
/**
1414
* Responsible for creating a confirmation URL for a billing plan,
@@ -62,7 +62,7 @@ class BillingPlan
6262
public function __construct(Shop $shop, Plan $plan)
6363
{
6464
$this->shop = $shop;
65-
$this->api = $this->shop->api();
65+
$this->api = $this->shop->api();
6666
$this->plan = $plan;
6767

6868
return $this;
@@ -174,7 +174,7 @@ public function activate()
174174
/**
175175
* Cancels the current charge for the shop, saves the new charge.
176176
*
177-
* @return boolean
177+
* @return bool
178178
*/
179179
public function save()
180180
{

src/ShopifyApp/Services/UsageCharge.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class UsageCharge
4040
protected $response;
4141

4242
/**
43-
* Constructor for usage charge class
43+
* Constructor for usage charge class.
4444
*
4545
* @param \OhMyBrew\ShopifyApp\Models\Shop $shop The shop to target for billing.
4646
* @param array $data The usage charge data.
@@ -50,7 +50,7 @@ class UsageCharge
5050
public function __construct(Shop $shop, array $data)
5151
{
5252
$this->shop = $shop;
53-
$this->api = $this->shop->api();
53+
$this->api = $this->shop->api();
5454
$this->data = $data;
5555

5656
return $this;
@@ -86,7 +86,7 @@ public function activate()
8686
/**
8787
* Saves the usage charge to the database.
8888
*
89-
* @return boolean
89+
* @return bool
9090
*/
9191
public function save()
9292
{

src/ShopifyApp/ShopifyApp.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
namespace OhMyBrew\ShopifyApp;
44

55
use Illuminate\Foundation\Application;
6-
use OhMyBrew\ShopifyApp\Models\Shop;
76
use Illuminate\Support\Facades\Config;
87
use Illuminate\Support\Facades\Session;
8+
use OhMyBrew\ShopifyApp\Models\Shop;
99

1010
/**
1111
* The base "helper" class for this package.

0 commit comments

Comments
 (0)