Completed
Push — master ( 4c1687...5a81ac )
by Albert
02:16
created
src/Repositories/UpdatesRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
 	 **/
76 76
 	public function config($property)
77 77
 	{
78
-		if(config()->has("core.{$property}")){
78
+		if (config()->has("core.{$property}")) {
79 79
 			return config()->get("core.{$property}");
80 80
 		}
81 81
 		throw new \Exception("Property {$property} does not exist", 1);	
Please login to merge, or discard this patch.
src/Traits/VerifiesPurchase.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,11 +20,11 @@  discard block
 block discarded – undo
20 20
 	public function verifyPurchase()
21 21
 	{
22 22
 		$this->getCustomer();
23
-		if(null != $this->customer)
23
+		if (null != $this->customer)
24 24
 			return $this->validKeyResponse();
25 25
 
26 26
 		$response = app()->envatoapi->verifyPurchase(request('code'));
27
-		if('error' == $response['status'])
27
+		if ('error' == $response['status'])
28 28
 			return $this->invalidKeyResponse();
29 29
 		// If we are here then the key is valid
30 30
 		// We now create a new customer record from the envato api response
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	 **/
51 51
 	protected function getCustomer()
52 52
 	{
53
-		$this->customer = $this->customers->findCustomer('purchaseKey',request()->get('code'));
53
+		$this->customer = $this->customers->findCustomer('purchaseKey', request()->get('code'));
54 54
 	}
55 55
 
56 56
 	/**
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,12 +20,14 @@
 block discarded – undo
20 20
 	public function verifyPurchase()
21 21
 	{
22 22
 		$this->getCustomer();
23
-		if(null != $this->customer)
24
-			return $this->validKeyResponse();
23
+		if(null != $this->customer) {
24
+					return $this->validKeyResponse();
25
+		}
25 26
 
26 27
 		$response = app()->envatoapi->verifyPurchase(request('code'));
27
-		if('error' == $response['status'])
28
-			return $this->invalidKeyResponse();
28
+		if('error' == $response['status']) {
29
+					return $this->invalidKeyResponse();
30
+		}
29 31
 		// If we are here then the key is valid
30 32
 		// We now create a new customer record from the envato api response
31 33
 		$this->customer = $this->customers->createCustomer($response['response']);
Please login to merge, or discard this patch.
src/ElimuswiftCoreServiceProvider.php 2 patches
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -6,48 +6,48 @@
 block discarded – undo
6 6
 class ElimuswiftCoreServiceProvider extends ServiceProvider
7 7
 {
8 8
 
9
-    /**
10
-     * Bootstrap the application services.
11
-     *
12
-     * @return void
13
-     */
14
-    public function boot()
15
-    {
16
-        $this->loadFiles();
17
-    }
18
-
19
-
20
-    /**
21
-     * Register the application services.
22
-     *
23
-     * @return void
24
-     */
25
-    public function register()
26
-    {
27
-        $this->mergeConfigFrom(
28
-            __DIR__.'/config/core.php', 'core'
29
-        );
30
-
31
-        $this->app->singleton('envatoapi', function(){
32
-            return new EnvatoApi(env('ENVATO_SECRET'));
33
-        });
34
-
35
-        $this->app->bind('Elimuswift\Core\Repositories\Contracts\RepositoryContract', 'Elimuswift\Core\Repositories\UpdatesRepository');
36
-    }
37
-
38
-    /**
39
-     * Load and publish app migration files
40
-     *
41
-     * @return void
42
-     *
43
-     **/
44
-    protected function loadFiles()
45
-    {
46
-         $this->publishes([
47
-            __DIR__.'config/core.php' => config_path('core.php'),
48
-        ]);
49
-        $this->loadMigrationsFrom(__DIR__.'/Migrations');
50
-        $this->loadRoutesFrom(__DIR__.'/routes.php');
51
-    }
9
+	/**
10
+	 * Bootstrap the application services.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function boot()
15
+	{
16
+		$this->loadFiles();
17
+	}
18
+
19
+
20
+	/**
21
+	 * Register the application services.
22
+	 *
23
+	 * @return void
24
+	 */
25
+	public function register()
26
+	{
27
+		$this->mergeConfigFrom(
28
+			__DIR__.'/config/core.php', 'core'
29
+		);
30
+
31
+		$this->app->singleton('envatoapi', function(){
32
+			return new EnvatoApi(env('ENVATO_SECRET'));
33
+		});
34
+
35
+		$this->app->bind('Elimuswift\Core\Repositories\Contracts\RepositoryContract', 'Elimuswift\Core\Repositories\UpdatesRepository');
36
+	}
37
+
38
+	/**
39
+	 * Load and publish app migration files
40
+	 *
41
+	 * @return void
42
+	 *
43
+	 **/
44
+	protected function loadFiles()
45
+	{
46
+		 $this->publishes([
47
+			__DIR__.'config/core.php' => config_path('core.php'),
48
+		]);
49
+		$this->loadMigrationsFrom(__DIR__.'/Migrations');
50
+		$this->loadRoutesFrom(__DIR__.'/routes.php');
51
+	}
52 52
 
53 53
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
             __DIR__.'/config/core.php', 'core'
29 29
         );
30 30
 
31
-        $this->app->singleton('envatoapi', function(){
31
+        $this->app->singleton('envatoapi', function() {
32 32
             return new EnvatoApi(env('ENVATO_SECRET'));
33 33
         });
34 34
 
Please login to merge, or discard this patch.
src/Controllers/InstallManagerController.php 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@
 block discarded – undo
12 12
 class InstallManagerController extends Controller
13 13
 {
14 14
 	/**
15
-	* When including this trait make sure you inject RepositoryContract as $repository 
16
-	* and CustomersRepository as $customers to the constructor
17
-	*/
15
+	 * When including this trait make sure you inject RepositoryContract as $repository 
16
+	 * and CustomersRepository as $customers to the constructor
17
+	 */
18 18
 	use VerifiesPurchase;
19 19
 	
20 20
 	/**
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,10 +51,10 @@
 block discarded – undo
51 51
 	public function getInstaller($version)
52 52
 	{
53 53
 		$response = $this->verifyPurchase();
54
-		if(null == $this->customer)
54
+		if (null == $this->customer)
55 55
 			return $this->invalidKeyResponse();
56 56
 		$install = $this->repository->config('install.resourcePath')."/install_{$version}.zip";
57
-		if(file_exists($install)){
57
+		if (file_exists($install)) {
58 58
 			return response()->download($install);
59 59
 		}
60 60
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,9 @@
 block discarded – undo
51 51
 	public function getInstaller($version)
52 52
 	{
53 53
 		$response = $this->verifyPurchase();
54
-		if(null == $this->customer)
55
-			return $this->invalidKeyResponse();
54
+		if(null == $this->customer) {
55
+					return $this->invalidKeyResponse();
56
+		}
56 57
 		$install = $this->repository->config('install.resourcePath')."/install_{$version}.zip";
57 58
 		if(file_exists($install)){
58 59
 			return response()->download($install);
Please login to merge, or discard this patch.
src/Controllers/UpdateManagerController.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,10 +48,10 @@
 block discarded – undo
48 48
 	public function fetchUpdate($version)
49 49
 	{
50 50
 		$this->getCustomer();
51
-		if(null == $this->customer)
51
+		if (null == $this->customer)
52 52
 			return $this->invalidKeyResponse();
53 53
 		$update = $this->repository->config('updates.updatesPath')."/update_{$version}.zip";
54
-		if(file_exists($update)){
54
+		if (file_exists($update)) {
55 55
 			return response()->download($update);
56 56
 		}
57 57
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,8 +48,9 @@
 block discarded – undo
48 48
 	public function fetchUpdate($version)
49 49
 	{
50 50
 		$this->getCustomer();
51
-		if(null == $this->customer)
52
-			return $this->invalidKeyResponse();
51
+		if(null == $this->customer) {
52
+					return $this->invalidKeyResponse();
53
+		}
53 54
 		$update = $this->repository->config('updates.updatesPath')."/update_{$version}.zip";
54 55
 		if(file_exists($update)){
55 56
 			return response()->download($update);
Please login to merge, or discard this patch.