FilterBasedSatisfaction::filter()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 1
c 0
b 0
f 0
nc 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