Skip to content

Commit 8e697ff

Browse files
committed
Add trailing commas
1 parent af7ab25 commit 8e697ff

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

src/Controller/ConsentController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public function getconsent(Request $request)
158158
}
159159
}
160160
$para = [
161-
'attributes' => &$attributes
161+
'attributes' => &$attributes,
162162
];
163163

164164
// Reorder attributes according to attributepresentation hooks

tests/src/Auth/Process/ConsentTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,13 @@ public function testAttributeHashIsConsistentWhenOrderOfValuesChange(): void
137137
{
138138
$attributes1 = [
139139
'attribute1' => ['val1', 'val2'],
140-
'attribute2' => ['val1', 'val2']
140+
'attribute2' => ['val1', 'val2'],
141141
];
142142
$attributeHash1 = Consent::getAttributeHash($attributes1, true);
143143

144144
$attributes2 = [
145145
'attribute1' => ['val1', 'val2'],
146-
'attribute2' => ['val2', 'val1']
146+
'attribute2' => ['val2', 'val1'],
147147
];
148148
$attributeHash2 = Consent::getAttributeHash($attributes2, true);
149149

@@ -157,20 +157,20 @@ public function testAttributeHashIsConsistentWhenOrderOfAttributesChange(): void
157157
{
158158
$attributes1 = [
159159
'attribute2' => ['val1', 'val2'],
160-
'attribute1' => ['val1', 'val2']
160+
'attribute1' => ['val1', 'val2'],
161161
];
162162
$attributeHash1 = Consent::getAttributeHash($attributes1, true);
163163

164164
$attributes2 = [
165165
'attribute1' => ['val1', 'val2'],
166-
'attribute2' => ['val1', 'val2']
166+
'attribute2' => ['val1', 'val2'],
167167
];
168168
$attributeHash2 = Consent::getAttributeHash($attributes2, true);
169169

170170
$this->assertEquals(
171171
$attributeHash1,
172172
$attributeHash2,
173-
"Hash is not the same when the order of the attributes changes"
173+
"Hash is not the same when the order of the attributes changes",
174174
);
175175
}
176176

@@ -181,20 +181,20 @@ public function testAttributeHashIsConsistentWithoutValuesWhenOrderOfAttributesC
181181
{
182182
$attributes1 = [
183183
'attribute2' => ['val1', 'val2'],
184-
'attribute1' => ['val1', 'val2']
184+
'attribute1' => ['val1', 'val2'],
185185
];
186186
$attributeHash1 = Consent::getAttributeHash($attributes1);
187187

188188
$attributes2 = [
189189
'attribute1' => ['val1', 'val2'],
190-
'attribute2' => ['val1', 'val2']
190+
'attribute2' => ['val1', 'val2'],
191191
];
192192
$attributeHash2 = Consent::getAttributeHash($attributes2);
193193

194194
$this->assertEquals(
195195
$attributeHash1,
196196
$attributeHash2,
197-
"Hash is not the same when the order of the attributes changes and the values are not included"
197+
"Hash is not the same when the order of the attributes changes and the values are not included",
198198
);
199199
}
200200

@@ -241,7 +241,7 @@ public function testConstructorSetsInstancePrivateVars(): void
241241
$this->assertEquals($instanceVars['noconsentattributes']->getValue($testcase), $config['attributes.exclude']);
242242
$this->assertEquals(
243243
$instanceVars['showNoConsentAboutService']->getValue($testcase),
244-
$config['showNoConsentAboutService']
244+
$config['showNoConsentAboutService'],
245245
);
246246
}
247247
}

tests/src/Controller/ConsentControllerTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public static function loadState(string $id, string $stage, bool $allowMissing =
8484
'entityid' => 'urn:some:sp',
8585
],
8686
'Source' => [
87-
'entityid' => 'urn:some:idp'
87+
'entityid' => 'urn:some:idp',
8888
],
8989
'Attributes' => ['uid' => 'jdoe'],
9090
'consent:store.userId' => 'jdoe@example.org',
@@ -119,7 +119,7 @@ public function testGetconsentDecline(): void
119119
$request = Request::create(
120120
'/getconsent',
121121
'GET',
122-
['no' => '', 'StateId' => 'someStateId']
122+
['no' => '', 'StateId' => 'someStateId'],
123123
);
124124

125125
$c = new Controller\ConsentController(self::$config, self::$session);
@@ -135,8 +135,8 @@ public static function loadState(string $id, string $stage, bool $allowMissing =
135135
'Source' => [
136136
'entityid' => 'urn:some:idp',
137137
'UIInfo' => [
138-
'PrivacyStatementURL' => ['https://example.org/privacy']
139-
]
138+
'PrivacyStatementURL' => ['https://example.org/privacy'],
139+
],
140140
],
141141
'Attributes' => ['uid' => 'jdoe', 'filteredAttribute' => 'this attribute should be filtered'],
142142
'consent:noconsentattributes' => ['filteredAttribute'],
@@ -160,7 +160,7 @@ public function testNoconsent(): void
160160
$request = Request::create(
161161
'/noconsent',
162162
'GET',
163-
['StateId' => 'someStateId']
163+
['StateId' => 'someStateId'],
164164
);
165165

166166
$c = new Controller\ConsentController(self::$config, self::$session);
@@ -193,15 +193,15 @@ public function testLogout(): void
193193
$request = Request::create(
194194
'/logout',
195195
'GET',
196-
['StateId' => 'someStateId']
196+
['StateId' => 'someStateId'],
197197
);
198198
199199
$c = new Controller\ConsentController(self::$config, self::$session);
200200
$c->setAuthState(new class () extends State {
201201
public static function loadState(string $id, string $stage, bool $allowMissing = false): ?array
202202
{
203203
return [
204-
'core:IdP' => 'saml2:something'
204+
'core:IdP' => 'saml2:something',
205205
];
206206
}
207207
});
@@ -233,7 +233,7 @@ public function testMissingStateId(string $controller): void
233233
$_SERVER['REQUEST_URI'] = '/module.php/consent/' . $controller;
234234
$request = Request::create(
235235
'/' . $controller,
236-
'GET'
236+
'GET',
237237
);
238238

239239
$c = new Controller\ConsentController(self::$config, self::$session);
@@ -256,7 +256,7 @@ public function testNoState(string $controller): void
256256
$request = Request::create(
257257
'/' . $controller,
258258
'GET',
259-
['StateId' => 'someStateId']
259+
['StateId' => 'someStateId'],
260260
);
261261

262262
$c = new Controller\ConsentController(self::$config, self::$session);

0 commit comments

Comments
 (0)