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

provideSelectionsData()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Leonidas\Library\Admin\Field\Selection;
4
5
use Leonidas\Library\System\Schema\Term\TermCollection;
6
use WebTheory\Saveyour\Contracts\Field\Selection\SelectionProviderInterface;
7
use WP_Term;
0 ignored issues
show
Bug introduced by
The type WP_Term 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...
8
9
abstract class AbstractTermCollectionSelection extends AbstractTermSelectionProvider implements SelectionProviderInterface
10
{
11
    protected TermCollection $collection;
12
13
    public function __construct(TermCollection $collection)
14
    {
15
        $this->collection = $collection;
16
    }
17
18
    /**
19
     * @return WP_Term[]
20
     */
21
    public function provideSelectionsData(): array
22
    {
23
        return $this->collection->getTerms();
24
    }
25
}
26