FilterBasedSatisfaction   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
filter() 0 1 ?
A satisfies() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace RulerZ\Executor\Polyfill;
6
7
use RulerZ\Context\ExecutionContext;
8
9
trait FilterBasedSatisfaction
10
{
11
    /**
12
     * {@inheritdoc}
13
     */
14
    abstract public function filter($target, array $parameters, array $operators, ExecutionContext $context);
15
16
    /**
17
     * {@inheritdoc}
18
     */
19
    public function satisfies($target, array $parameters, array $operators, ExecutionContext $context): bool
20
    {
21
        return count($this->filter($target, $parameters, $operators, $context)) !== 0;
22
    }
23
}
24