InOperator   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 2
dl 0
loc 7
rs 10
c 1
b 0
f 1
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A executeComparison() 0 3 1
1
<?php
2
/**
3
 * Copyright © Thomas Klein, All rights reserved.
4
 * See LICENSE bundled with this library for license details.
5
 */
6
declare(strict_types=1);
7
8
namespace LogicTree\Operator\Comparator;
9
10
use function in_array;
11
12
/**
13
 * The IN:
14
 * The output is "true" if $expr1 is in list $expr2 after type juggling.
15
 */
16
final class InOperator extends AbstractCompareTwo
17
{
18
    public const CODE = 'in';
19
20
    public function executeComparison($expr1, $expr2): bool
21
    {
22
        return in_array($expr1, $expr2, false);
23
    }
24
}
25