Skip to content

Commit d7b40c3

Browse files
committed
style(PHP): adjust to updated cs-fixer
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
1 parent 578f7df commit d7b40c3

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

lib/AppInfo/Application.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,9 @@ public function boot(IBootContext $context): void {
148148

149149
// All requests that are not authenticated and match against the "/login" route are
150150
// redirected to the SAML login endpoint
151-
if (!$isCLI &&
152-
!$userSession->isLoggedIn() &&
153-
($request->getPathInfo() === '/login')) {
151+
if (!$isCLI
152+
&& !$userSession->isLoggedIn()
153+
&& ($request->getPathInfo() === '/login')) {
154154
try {
155155
$params = $request->getParams();
156156
} catch (\LogicException) {

lib/Controller/SAMLController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,8 +431,8 @@ public function assertionConsumerService(): Http\RedirectResponse {
431431
* @throws Error
432432
*/
433433
public function singleLogoutService(): Http\RedirectResponse {
434-
$isFromGS = ($this->config->getSystemValueBool('gs.enabled', false) &&
435-
$this->config->getSystemValueString('gss.mode', '') === 'master');
434+
$isFromGS = ($this->config->getSystemValueBool('gs.enabled', false)
435+
&& $this->config->getSystemValueString('gss.mode', '') === 'master');
436436

437437
// Some IDPs send the SLO request via POST, but OneLogin php-saml only handles GET.
438438
// To hack around this issue we copy the request from _POST to _GET.

lib/DavPlugin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ public function initialize(Server $server) {
3535

3636
public function beforeMethod(RequestInterface $request, ResponseInterface $response) {
3737
if (
38-
$this->config->getAppValue('user_saml', 'type') === 'environment-variable' &&
39-
!$this->session->exists('user_saml.samlUserData')
38+
$this->config->getAppValue('user_saml', 'type') === 'environment-variable'
39+
&& !$this->session->exists('user_saml.samlUserData')
4040
) {
4141
$uidMapping = $this->samlSettings->get(1)['general-uid_mapping'];
4242
if (isset($this->auth[$uidMapping])) {

lib/GroupManager.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,8 @@ protected function hasGroupForeignMembers(IGroup $group): bool {
273273
* allowed only for groups owned by the SAML backend.
274274
*/
275275
protected function mayModifyGroup(?IGroup $group): bool {
276-
$isInTransition =
277-
$group !== null
276+
$isInTransition
277+
= $group !== null
278278
&& $group->getGID() !== 'admin'
279279
&& in_array('Database', $group->getBackendNames())
280280
&& $this->isGroupInTransitionList($group->getGID());

tests/unit/UserBackendTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ public function testUpdateAttributesWithoutAttributes() {
106106
$user = $this->createMock(IUser::class);
107107

108108
$this->config->method('getAppValue')
109-
->willReturnCallback(fn (string $appId, string $key, string $default) =>
109+
->willReturnCallback(fn (string $appId, string $key, string $default)
110110
// Unused parameters are intentionally kept for clarity
111-
$default);
111+
=> $default);
112112

113113
$this->userManager
114114
->expects($this->once())
@@ -138,9 +138,9 @@ public function testUpdateAttributesWithoutValidUser() {
138138
$this->getMockedBuilder();
139139

140140
$this->config->method('getAppValue')
141-
->willReturnCallback(fn (string $appId, string $key, string $default) =>
141+
->willReturnCallback(fn (string $appId, string $key, string $default)
142142
// Unused parameters are intentionally kept for clarity
143-
$default);
143+
=> $default);
144144

145145
$this->userManager
146146
->expects($this->once())
@@ -227,9 +227,9 @@ public function testUpdateAttributesQuotaDefaultFallback() {
227227
$attributes = ['email' => 'new@example.com', 'displayname' => 'New Displayname', 'quota' => ''];
228228

229229
$this->config->method('getAppValue')
230-
->willReturnCallback(fn (string $appId, string $key, string $default) =>
230+
->willReturnCallback(fn (string $appId, string $key, string $default)
231231
// Unused $appId parameter is intentionally kept for clarity
232-
match ($key) {
232+
=> match ($key) {
233233
'saml-attribute-mapping-email_mapping' => 'email',
234234
'saml-attribute-mapping-displayName_mapping' => 'displayname',
235235
'saml-attribute-mapping-quota_mapping' => 'quota',

0 commit comments

Comments
 (0)