Conditions | 3 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3.1406 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | 2 | public function initializeSlug(?array $options = null): void |
|
29 | { |
||
30 | 2 | $options ??= $this->getOptionsManager()->get('slug') ?? []; |
|
31 | |||
32 | 2 | $field = $options['field'] ?? 'slug'; |
|
33 | |||
34 | 2 | $this->setSlugBehavior(new Transformable([ |
|
35 | 2 | 'beforeValidation' => [ |
|
36 | 2 | $field => function (Model $model, string $field) { |
|
37 | $value = $model->readAttribute($field); |
||
38 | return $value && is_string($value) ? \Zemit\Support\Slug::generate($value) : $value; |
||
39 | 2 | }, |
|
62 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.