Test Failed
Push — master ( 135f34...8b25c6 )
by Chris
33:49
created

Field   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 8
dl 0
loc 18
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A defineDataManagerFactory() 0 6 1
A defineFormFieldFactory() 0 6 1
1
<?php
2
3
namespace Leonidas\Library\Admin\Field\Factory;
4
5
use WebTheory\Saveyour\Contracts\Factory\FieldDataManagerResolverFactoryInterface;
6
use WebTheory\Saveyour\Contracts\Factory\FormFieldResolverFactoryInterface;
7
use WebTheory\Saveyour\Factory\SimpleFieldFactory;
8
9
class Field extends SimpleFieldFactory
10
{
11
    protected $controller = WpAdminField::class;
0 ignored issues
show
Bug introduced by
The type Leonidas\Library\Admin\Field\Factory\WpAdminField was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
12
13
    protected function defineFormFieldFactory(array $options): FormFieldResolverFactoryInterface
14
    {
15
        $namespaces = $options['namespaces'] ?? [];
16
        $fields = $options['fields'] ?? [];
17
18
        return new FormField($namespaces, $fields);
19
    }
20
21
    protected function defineDataManagerFactory(array $options): FieldDataManagerResolverFactoryInterface
22
    {
23
        $namespaces = $options['namespaces'] ?? [];
24
        $managers = $options['managers'] ?? [];
25
26
        return new DataManager($namespaces, $managers);
27
    }
28
}
29