EmptyOperator   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 3
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
/**
11
 * The EMPTY:
12
 * The output is "true" if $expression is empty
13
 */
14
final class EmptyOperator extends AbstractCompareOne
15
{
16
    public const CODE = 'empty';
17
18
    public function executeComparison($expression): bool
19
    {
20
        return empty($expression);
21
    }
22
}
23