Skip to content

Commit abc0db3

Browse files
author
Prosper Otemuyiwa
authored
Merge pull request #12 from sparkdevio/remove-flip
Remove the flip altogether
2 parents d1e77f8 + 48bfc55 commit abc0db3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/DumbPasswordServiceProvider.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,10 @@ class DumbPasswordServiceProvider extends ServiceProvider
2929
public function boot()
3030
{
3131
$path = realpath(__DIR__.'/../resources/config/passwordlist.txt');
32-
$dumbPasswords = collect(explode("\n", file_get_contents($path)));
33-
$data = $dumbPasswords->flip();
32+
$data = collect(explode("\n", file_get_contents($path)));
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)