LteqOperator::executeComparison()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 2
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Copyright © 2018 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
/**
11
 * Class LteqOperator
12
 *
13
 * The LESS THAN EQUAL:
14
 * The output is "true" if $expr1 is less than or equal to $expr2.
15
 */
16
final class LteqOperator extends AbstractCompareTwo
17
{
18
    public const CODE = 'lteq';
19
20
    /**
21
     * {@inheritdoc}
22
     */
23
    public function executeComparison($expr1, $expr2): bool
24
    {
25
        return $expr1 <= $expr2;
26
    }
27
}
28