SatisfiesTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 14
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
execute() 0 1 ?
A satisfies() 0 6 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace RulerZ\Executor\ArrayTarget;
6
7
use RulerZ\Context\ExecutionContext;
8
use RulerZ\Context\ObjectContext;
9
10
trait SatisfiesTrait
11
{
12
    abstract protected function execute($target, array $operators, array $parameters);
13
14
    /**
15
     * {@inheritdoc}
16
     */
17
    public function satisfies($target, array $parameters, array $operators, ExecutionContext $context): bool
0 ignored issues
show
Unused Code introduced by
The parameter $context is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
18
    {
19
        $wrappedTarget = is_array($target) ? $target : new ObjectContext($target);
20
21
        return $this->execute($wrappedTarget, $operators, $parameters);
22
    }
23
}
24