Test Failed
Branch master (c1f513)
by Rutger
03:30
created
sample/widgets/Alert.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
                 continue;
60 60
             }
61 61
 
62
-            foreach ((array) $flash as $i => $message) {
62
+            foreach ((array)$flash as $i => $message) {
63 63
                 echo \yii\bootstrap4\Alert::widget([
64 64
                     'body' => $message,
65 65
                     'closeButton' => $this->closeButton,
Please login to merge, or discard this patch.
sample/config/bootstrap.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,9 +5,9 @@
 block discarded – undo
5 5
 $sampleRoot = dirname(__DIR__, 1);
6 6
 $projectRoot = dirname(__DIR__, 2);
7 7
 
8
-Yii::setAlias('@rhertogh/Yii2Oauth2Server',  $projectRoot . '/src');
9
-Yii::setAlias('@vendor',  $projectRoot . '/vendor');
8
+Yii::setAlias('@rhertogh/Yii2Oauth2Server', $projectRoot . '/src');
9
+Yii::setAlias('@vendor', $projectRoot . '/vendor');
10 10
 
11
-Yii::setAlias('@sample',  $sampleRoot);
11
+Yii::setAlias('@sample', $sampleRoot);
12 12
 
13 13
 Json::$prettyPrint = YII_DEBUG;
Please login to merge, or discard this patch.
sample/dev/giiant/generators/model/templates/model.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -65,14 +65,14 @@  discard block
 block discarded – undo
65 65
     //public static $tableName = '<?= $tableName ?>';
66 66
 
67 67
 <?php
68
-if(!empty($enum)){
68
+if (!empty($enum)) {
69 69
 ?>
70 70
     /**
71 71
     * ENUM field values
72 72
     */
73 73
 <?php
74
-    foreach($enum as $column_name => $column_data){
75
-        foreach ($column_data['values'] as $enum_value){
74
+    foreach ($enum as $column_name => $column_data) {
75
+        foreach ($column_data['values'] as $enum_value) {
76 76
             echo '    const ' . $enum_value['const_name'] . ' = \'' . $enum_value['value'] . '\';' . PHP_EOL;
77 77
         }
78 78
     }
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 <?php endif; ?>
172 172
 <?php foreach ($relations as $name => $relation): ?>
173 173
     <?php
174
-    $queryInterfaceClassFullName =  '\\' . $generator->queryInterfaceNs . '\\' . $relation[1] . 'QueryInterface';
174
+    $queryInterfaceClassFullName = '\\' . $generator->queryInterfaceNs . '\\' . $relation[1] . 'QueryInterface';
175 175
     ?>
176 176
 
177 177
     /**
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 
196 196
 <?php if ($queryClassName): ?>
197 197
     <?php
198
-        $queryInterfaceClassFullName =  '\\' . $generator->queryInterfaceNs . '\\' . $queryClassName . 'Interface';
198
+        $queryInterfaceClassFullName = '\\' . $generator->queryInterfaceNs . '\\' . $queryClassName . 'Interface';
199 199
     ?>
200 200
 
201 201
     /**
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 <?php endif; ?>
210 210
 
211 211
 <?php
212
-    foreach($enum as $column_name => $column_data){
212
+    foreach ($enum as $column_name => $column_data) {
213 213
 ?>
214 214
 
215 215
     /**
@@ -233,8 +233,8 @@  discard block
 block discarded – undo
233 233
     {
234 234
         return [
235 235
 <?php
236
-        foreach($column_data['values'] as $k => $value){
237
-            echo '            '.'self::' . $value['const_name'] . ' => ' . $generator->generateString($value['label']) . ",\n";
236
+        foreach ($column_data['values'] as $k => $value) {
237
+            echo '            ' . 'self::' . $value['const_name'] . ' => ' . $generator->generateString($value['label']) . ",\n";
238 238
         }
239 239
 ?>
240 240
         ];
Please login to merge, or discard this patch.
sample/dev/giiant/generators/model/Generator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
      */
44 44
     public function generateRules($table)
45 45
     {
46
-        $rules =  parent::generateRules($table);
46
+        $rules = parent::generateRules($table);
47 47
 
48 48
         foreach ($rules as $key => $rule) {
49 49
             foreach ($this->ignoreRules as $ignoreRule) {
Please login to merge, or discard this patch.
src/components/server/grants/Oauth2RefreshTokenGrant.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
 
44 44
                 $user = $this->module->getUserRepository()->getUserEntityByIdentifier($oldRefreshToken['user_id']);
45 45
                 if (empty($user)) {
46
-                    throw new NotFoundHttpException( Yii::t('oauth2', 'Unable to find user with id "' . $oldRefreshToken['user_id'] . '".'));
46
+                    throw new NotFoundHttpException(Yii::t('oauth2', 'Unable to find user with id "' . $oldRefreshToken['user_id'] . '".'));
47 47
                 }
48 48
                 if (!($user instanceof Oauth2OidcUserSessionStatusInterface)) {
49 49
                     throw new InvalidConfigException('In order to support OpenId Connect Refresh Tokens without offline_access scope '
Please login to merge, or discard this patch.
src/models/traits/Oauth2ExpiryDateTimeTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,6 +19,6 @@
 block discarded – undo
19 19
      */
20 20
     public function setExpiryDateTime(DateTimeImmutable $dateTime)
21 21
     {
22
-        $this->expiry_date_time =$dateTime;
22
+        $this->expiry_date_time = $dateTime;
23 23
     }
24 24
 }
Please login to merge, or discard this patch.
src/models/queries/traits/Oauth2EnabledQueryTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,14 +14,14 @@
 block discarded – undo
14 14
     {
15 15
         /** @var ActiveQuery $this */
16 16
         if (!is_null($enabled)) {
17
-            if (is_null($this->from)){
17
+            if (is_null($this->from)) {
18 18
                 /** @var Oauth2ActiveRecordInterface $modelClass */
19 19
                 $modelClass = $this->modelClass;
20 20
                 $table = $modelClass::tableName();
21 21
             } else {
22 22
                 $table = array_key_first($this->from);
23 23
             }
24
-            $this->andWhere([ "$table.enabled" => $enabled]);
24
+            $this->andWhere(["$table.enabled" => $enabled]);
25 25
         }
26 26
 
27 27
         return $this;
Please login to merge, or discard this patch.
src/controllers/web/server/Oauth2AuthorizeAction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@
 block discarded – undo
115 115
                 $maxAge = $this->getRequestParam($request, OidcAuthRequestInterface::REQUEST_PARAMETER_MAX_AGE);
116 116
                 if ($maxAge === '') {
117 117
                     $maxAge = null;
118
-                } elseif($maxAge !== null) {
118
+                } elseif ($maxAge !== null) {
119 119
                     $maxAge = (int)$maxAge;
120 120
                 }
121 121
 
Please login to merge, or discard this patch.
src/controllers/web/openidconnect/Oauth2OidcUserinfoAction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
             $response->data = $this->generateOpenIdConnectUserClaims($identity, $module, $nonce);
58 58
             return $response;
59 59
 
60
-        } elseif($userInfoAlg == 'RS256') {
60
+        } elseif ($userInfoAlg == 'RS256') {
61 61
 
62 62
             $response->format = Response::FORMAT_RAW;
63 63
             $response->headers->add('Content-Type', 'application/jwt');
Please login to merge, or discard this patch.