Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php namespace Felixkiss\UniqueWithValidator; |
||
12 | public function boot() |
||
13 | { |
||
14 | $this->loadTranslationsFrom( |
||
15 | __DIR__ . '/../../lang', |
||
16 | 'uniquewith-validator' |
||
17 | ); |
||
18 | |||
19 | $message = $this->app->translator->trans('uniquewith-validator::validation.unique_with'); |
||
1 ignored issue
–
show
|
|||
20 | $this->app->validator->extend('unique_with', Validator::class . '@validateUniqueWith', $message); |
||
1 ignored issue
–
show
|
|||
21 | $this->app->validator->replacer('unique_with', function() { |
||
1 ignored issue
–
show
|
|||
22 | $translator = $this->app->translator; |
||
1 ignored issue
–
show
|
|||
23 | return call_user_func_array([new Validator, 'replaceUniqueWith'], array_merge(func_get_args(), [$translator])); |
||
24 | }); |
||
25 | } |
||
26 | |||
37 |
If you access a property on an interface, you most likely code against a concrete implementation of the interface.
Available Fixes
Adding an additional type check:
Changing the type hint: