SatisfiesTrait::satisfies()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
nc 2
nop 4
dl 0
loc 6
rs 10
c 0
b 0
f 0
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