Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Commit

Permalink
StyleCI fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gnikyt committed Sep 28, 2019
1 parent a6b3ccf commit d3b3e4f
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 9 deletions.
75 changes: 75 additions & 0 deletions 8wR9yZ.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
diff --git a/src/ShopifyApp/Exceptions/BaseException.php b/src/ShopifyApp/Exceptions/BaseException.php
index e9c4ee7b95db81f662b66403f885ec0f5b8efe06..457238972c6748f4bf0f31e20e135811be3c0e4a 100644
--- a/src/ShopifyApp/Exceptions/BaseException.php
+++ b/src/ShopifyApp/Exceptions/BaseException.php
@@ -2,11 +2,10 @@

namespace OhMyBrew\ShopifyApp\Exceptions;

-use \Exception;
+use Exception;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Redirect;
-use Illuminate\Http\RedirectResponse;

/**
* Base exception for all exceptions of the package.
diff --git a/src/ShopifyApp/Exceptions/MissingShopDomainException.php b/src/ShopifyApp/Exceptions/MissingShopDomainException.php
index 5599730e5c527718b439d41ebbcefdebc916e7a4..9ba00c68684b6a46975a79cd350de94430e24227 100644
--- a/src/ShopifyApp/Exceptions/MissingShopDomainException.php
+++ b/src/ShopifyApp/Exceptions/MissingShopDomainException.php
@@ -2,8 +2,6 @@

namespace OhMyBrew\ShopifyApp\Exceptions;

-use OhMyBrew\ShopifyApp\Exceptions\BaseException;
-
/**
* Exception for handling a missing shop's myshopify domain.
*/
diff --git a/src/ShopifyApp/Exceptions/SignatureVerificationException.php b/src/ShopifyApp/Exceptions/SignatureVerificationException.php
index 573beed26901213b9bb49e0d4c1d817b03011987..555abe03e841a8cc955a978cfe4b905758415cce 100644
--- a/src/ShopifyApp/Exceptions/SignatureVerificationException.php
+++ b/src/ShopifyApp/Exceptions/SignatureVerificationException.php
@@ -2,8 +2,6 @@

namespace OhMyBrew\ShopifyApp\Exceptions;

-use OhMyBrew\ShopifyApp\Exceptions\BaseException;
-
/**
* Exception for handling a bad signature verification.
*/
diff --git a/tests/TestCase.php b/tests/TestCase.php
index e7cbb001d664ed68205cb7beb413bb980a2a6ac5..9aa385b9f5d6f430fad6ebedec7dbd223549e4c5 100644
--- a/tests/TestCase.php
+++ b/tests/TestCase.php
@@ -2,7 +2,7 @@

namespace OhMyBrew\ShopifyApp\Test;

-use \Closure;
+use Closure;
use Illuminate\Support\Facades\App;
use OhMyBrew\ShopifyApp\Models\Shop;
use OhMyBrew\ShopifyApp\ShopifyAppProvider;
@@ -66,12 +66,16 @@ abstract class TestCase extends OrchestraTestCase
$currentEnv = App::environment();

// Set the environment
- App::detectEnvironment(function() use ($env) { return $env; });
+ App::detectEnvironment(function () use ($env) {
+ return $env;
+ });

// Run the closure
$fn();

// Reset
- App::detectEnvironment(function() use ($currentEnv) { return $currentEnv; });
+ App::detectEnvironment(function () use ($currentEnv) {
+ return $currentEnv;
+ });
}
}
3 changes: 1 addition & 2 deletions src/ShopifyApp/Exceptions/BaseException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

namespace OhMyBrew\ShopifyApp\Exceptions;

use \Exception;
use Exception;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Http\RedirectResponse;

/**
* Base exception for all exceptions of the package.
Expand Down
2 changes: 0 additions & 2 deletions src/ShopifyApp/Exceptions/MissingShopDomainException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace OhMyBrew\ShopifyApp\Exceptions;

use OhMyBrew\ShopifyApp\Exceptions\BaseException;

/**
* Exception for handling a missing shop's myshopify domain.
*/
Expand Down
2 changes: 0 additions & 2 deletions src/ShopifyApp/Exceptions/SignatureVerificationException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace OhMyBrew\ShopifyApp\Exceptions;

use OhMyBrew\ShopifyApp\Exceptions\BaseException;

/**
* Exception for handling a bad signature verification.
*/
Expand Down
10 changes: 7 additions & 3 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace OhMyBrew\ShopifyApp\Test;

use \Closure;
use Closure;
use Illuminate\Support\Facades\App;
use OhMyBrew\ShopifyApp\Models\Shop;
use OhMyBrew\ShopifyApp\ShopifyAppProvider;
Expand Down Expand Up @@ -66,12 +66,16 @@ protected function swapEnvironment(string $env, Closure $fn)
$currentEnv = App::environment();

// Set the environment
App::detectEnvironment(function() use ($env) { return $env; });
App::detectEnvironment(function () use ($env) {
return $env;
});

// Run the closure
$fn();

// Reset
App::detectEnvironment(function() use ($currentEnv) { return $currentEnv; });
App::detectEnvironment(function () use ($currentEnv) {
return $currentEnv;
});
}
}

0 comments on commit d3b3e4f

Please sign in to comment.