Skip to content

Commit 8bc3b46

Browse files
authored
remove the flip altogether
on second hand, we don't need the flip at all, can just swap `has` with `contains` instead, and good to go.
1 parent d1e77f8 commit 8bc3b46

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/DumbPasswordServiceProvider.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,9 @@ public function boot()
3030
{
3131
$path = realpath(__DIR__.'/../resources/config/passwordlist.txt');
3232
$dumbPasswords = collect(explode("\n", file_get_contents($path)));
33-
$data = $dumbPasswords->flip();
3433

3534
Validator::extend('dumbpwd', function ($attribute, $value, $parameters, $validator) use ($data) {
36-
return !$data->has($value);
35+
return !$data->contains($value);
3736
}, $this->message);
3837
}
3938

0 commit comments

Comments
 (0)