Passed
Pull Request — master (#108)
by
unknown
05:52
created
config/saml2.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -159,8 +159,8 @@  discard block
 block discarded – undo
159 159
         |
160 160
         */
161 161
 
162
-        'x509cert' => env('SAML2_SP_CERT_x509',''),
163
-        'privateKey' => env('SAML2_SP_CERT_PRIVATEKEY',''),
162
+        'x509cert' => env('SAML2_SP_CERT_x509', ''),
163
+        'privateKey' => env('SAML2_SP_CERT_PRIVATEKEY', ''),
164 164
 
165 165
         /*
166 166
         |--------------------------------------------------------------------------
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
         |
172 172
         */
173 173
 
174
-        'entityId' => env('SAML2_SP_ENTITYID',''),
174
+        'entityId' => env('SAML2_SP_ENTITYID', ''),
175 175
 
176 176
         /*
177 177
         |--------------------------------------------------------------------------
Please login to merge, or discard this patch.
src/Saml2User.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -108,11 +108,11 @@  discard block
 block discarded – undo
108 108
      */
109 109
     public function parseUserAttribute($samlAttribute = null, $propertyName = null)
110 110
     {
111
-        if(empty($samlAttribute)) {
111
+        if (empty($samlAttribute)) {
112 112
             return null;
113 113
         }
114 114
 
115
-        if(empty($propertyName)) {
115
+        if (empty($propertyName)) {
116 116
             return $this->getAttribute($samlAttribute);
117 117
         }
118 118
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
      */
129 129
     public function parseAttributes($attributes = [])
130 130
     {
131
-        foreach($attributes as $propertyName => $samlAttribute) {
131
+        foreach ($attributes as $propertyName => $samlAttribute) {
132 132
             $this->parseUserAttribute($samlAttribute, $propertyName);
133 133
         }
134 134
     }
Please login to merge, or discard this patch.
src/Auth.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@
 block discarded – undo
156 156
      */
157 157
     public function sls($retrieveParametersFromServer = false)
158 158
     {
159
-        $this->base->processSLO(false, null, $retrieveParametersFromServer, function () {
159
+        $this->base->processSLO(false, null, $retrieveParametersFromServer, function() {
160 160
             event(new SignedOut());
161 161
         });
162 162
 
Please login to merge, or discard this patch.
src/ServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
      */
38 38
     protected function bootRoutes()
39 39
     {
40
-        if($this->app['config']['saml2.useRoutes'] == true) {
40
+        if ($this->app['config']['saml2.useRoutes'] == true) {
41 41
             include __DIR__ . '/Http/routes.php';
42 42
         }
43 43
     }
Please login to merge, or discard this patch.
src/Http/routes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 Route::group([
6 6
     'prefix' => config('saml2.routesPrefix'),
7 7
     'middleware' => array_merge(['saml2.resolveIdp'], config('saml2.routesMiddleware')),
8
-], function () {
8
+], function() {
9 9
     Route::get('/{key}/logout', array(
10 10
         'as' => 'saml.logout',
11 11
         'uses' => 'Slides\Saml2\Http\Controllers\Saml2Controller@logout',
Please login to merge, or discard this patch.
src/Http/Middleware/ResolveIdp.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
         if(!$idp = config("saml2.idps.$key")) {
83 83
             if (config('saml2.debug')) {
84 84
                 Log::debug('[Saml2] Unknown IdP requested', [
85
-                  'key' => $key
85
+                    'key' => $key
86 86
                 ]);
87 87
             }
88 88
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      */
42 42
     public function handle($request, \Closure $next)
43 43
     {
44
-        if(!$idp = $this->resolveIdp($request)) {
44
+        if (!$idp = $this->resolveIdp($request)) {
45 45
             throw new NotFoundHttpException();
46 46
         }
47 47
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      */
70 70
     protected function resolveIdp($request)
71 71
     {
72
-        if(!$key = $request->route('key')) {
72
+        if (!$key = $request->route('key')) {
73 73
             if (config('saml2.debug')) {
74 74
                 Log::debug('[Saml2] IdP key is not present in the URL so cannot be resolved', [
75 75
                     'url' => $request->fullUrl()
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
             return null;
80 80
         }
81 81
 
82
-        if(!$idp = config("saml2.idps.$key")) {
82
+        if (!$idp = config("saml2.idps.$key")) {
83 83
             if (config('saml2.debug')) {
84 84
                 Log::debug('[Saml2] Unknown IdP requested', [
85 85
                   'key' => $key
Please login to merge, or discard this patch.
src/OneLoginBuilder.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
             OneLoginUtils::setProxyVars(true);
66 66
         }
67 67
 
68
-        $this->app->singleton('OneLogin_Saml2_Auth', function ($app) {
68
+        $this->app->singleton('OneLogin_Saml2_Auth', function($app) {
69 69
             $config = $app['config']['saml2'];
70 70
             // Supply only what is needed.
71 71
             unset($config['idps']);
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
             return new OneLoginAuth($oneLoginConfig);
82 82
         });
83 83
 
84
-        $this->app->singleton('Slides\Saml2\Auth', function ($app) {
84
+        $this->app->singleton('Slides\Saml2\Auth', function($app) {
85 85
             return new \Slides\Saml2\Auth($app['OneLogin_Saml2_Auth'], $this->idp);
86 86
         });
87 87
     }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     protected function setConfigDefaultValues(array &$config)
97 97
     {
98 98
         foreach ($this->configDefaultValues() as $key => $default) {
99
-            if(!Arr::get($config, $key)) {
99
+            if (!Arr::get($config, $key)) {
100 100
                 Arr::set($config, $key, $default);
101 101
             }
102 102
         }
Please login to merge, or discard this patch.
src/helpers.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
     {
17 17
         $target = \Illuminate\Support\Facades\URL::to($path, $parameters, $secure);
18 18
 
19
-        if(!$key) {
20
-            if(!$key = saml_idp_key()) {
19
+        if (!$key) {
20
+            if (!$key = saml_idp_key()) {
21 21
                 return $target;
22 22
             }
23 23
         }
@@ -41,8 +41,8 @@  discard block
 block discarded – undo
41 41
     {
42 42
         $target = \Illuminate\Support\Facades\URL::route($name, $parameters, true);
43 43
 
44
-        if(!$key) {
45
-            if(!$key = saml_idp_key()) {
44
+        if (!$key) {
45
+            if (!$key = saml_idp_key()) {
46 46
                 return $target;
47 47
             }
48 48
         }
Please login to merge, or discard this patch.