8000 Code cleaning. · symfony/symfony@005cd26 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 005cd26

Browse files
committed
Code cleaning.
1 parent 744d651 commit 005cd26

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Symfony/Component/PasswordHasher/Hasher/PasswordHasherFactory.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ private function createHasher(array $config, bool $isExtra = false): PasswordHas
104104
return new MigratingPasswordHasher($hasher, ...$extrapasswordHashers);
105105
}
106106

107-
private function createHasherUsingAdapter($hasherKey)
107+
private function createHasherUsingAdapter(string $hasherKey): PasswordHasherInterface
108108
{
109109
if (!$this->passwordHashers[$hasherKey] instanceof PasswordHasherInterface) {
110110
$this->passwordHashers[$hasherKey] = $this->passwordHashers[$hasherKey] instanceof PasswordEncoderInterface
@@ -147,10 +147,8 @@ private function getHasherConfigFromAlgorithm(array $config): array
147147
$hasherChain = [$this->createHasher($config, true)];
148148

149149
foreach ($frompasswordHashers as $name) {
150-
if ($hasher = $this->passwordHashers[$name] ?? false) {
150+
if (isset($this->passwordHashers[$name])) {
151151
$hasher = $this->createHasherUsingAdapter($name);
152-
153-
$hasher = $hasher instanceof PasswordHasherInterface ? $hasher : $this->createHasher($hasher, true);
154152
} else {
155153
$hasher = $this->createHasher(['algorithm' => $name], true);
156154
}

0 commit comments

Comments
 (0)
0