Skip to content

Commit 82f6f2e

Browse files
author
tchapi
committed
Linting
1 parent d65db84 commit 82f6f2e

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

src/Services/BasicAuth.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ protected function validateUserPass($username, $password): bool
3939
if ('$2y$' === substr($user->getPassword(), 0, 4)) {
4040
// Use password_verify with secure passwords
4141
return password_verify($password, $user->getPassword());
42-
} else {
43-
// Use unsecure legacy password hashing (from legacy sabre/dav implementation)
44-
return $user->getPassword() === $this->utils->hashPassword($username, $password);
4542
}
43+
44+
// Use unsecure legacy password hashing (from legacy sabre/dav implementation)
45+
return $user->getPassword() === $this->utils->hashPassword($username, $password);
4646
}
4747
}

tests/Functional/Controllers/ApiControllerTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,10 @@ private function getCalendarId($client, int $userId, bool $default = true): int
8282
$this->assertMatchesRegularExpression('/^\d+$/', $data['data']['user_calendars'][0]['id']);
8383

8484
return $data['data']['user_calendars'][0]['id'];
85-
} else {
86-
$this->assertMatchesRegularExpression('/^\d+$/', $data['data']['user_calendars'][1]['id']);
87-
88-
return $data['data']['user_calendars'][1]['id'];
8985
}
86+
$this->assertMatchesRegularExpression('/^\d+$/', $data['data']['user_calendars'][1]['id']);
87+
88+
return $data['data']['user_calendars'][1]['id'];
9089
}
9190

9291
/*

0 commit comments

Comments
 (0)