Skip to content

Commit

Permalink
Merge pull request #39 from jeroensmit/dont-rely-on-facade
Browse files Browse the repository at this point in the history
Remove the need for the Str facade
  • Loading branch information
schuppo authored Feb 24, 2020
2 parents 70ee699 + 0c4e643 commit b1deef2
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Illuminate\Contracts\Validation\Factory;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Str;
use Illuminate\Translation\Translator;

class PasswordStrengthServiceProvider extends ServiceProvider
Expand Down Expand Up @@ -35,7 +36,7 @@ public function boot(Factory $validator)
$translator = app('passwordStrength.translationProvider')->get($validator);

foreach(['letters', 'numbers', 'caseDiff', 'symbols'] as $rule) {
$snakeCasedRule = \Str::snake($rule);
$snakeCasedRule = Str::snake($rule);

$validator->extend($rule, function ($_, $value, $__) use ($passwordStrength, $rule) {
$capitalizedRule = ucfirst($rule);
Expand Down

0 comments on commit b1deef2

Please sign in to comment.