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 filesBrowse files
committed
Code cleaning.
1 parent 744d651 commit 005cd26
Copy full SHA for 005cd26

File tree

1 file changed

+2
-4
lines changed
Filter options

1 file changed

+2
-4
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/PasswordHasher/Hasher/PasswordHasherFactory.php
+2-4Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.