Passed
Push — master ( b4f91d...b5810c )
by Bas
07:20 queued 04:57
created

ValidatesOperators::isLogicalOperator()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php
2
3
namespace LaravelFreelancerNL\FluentAQL\Traits;
4
5
trait ValidatesOperators
6
{
7
    /**
8
     * @param mixed $operator
9
     * @return bool
10
     */
11
    public function isLogicalOperator($operator): bool
12
    {
13
        return isset($this->logicalOperators[strtoupper($operator)]);
14
    }
15
16
    /**
17
     * @param mixed $operator
18
     * @return bool
19
     */
20 4
    public function isComparisonOperator($operator): bool
21
    {
22 4
        return isset($this->comparisonOperators[strtoupper($operator)]);
23
    }
24
25
    /**
26
     * @param mixed $operator
27
     * @return bool
28
     */
29
    public function isArithmeticOperator($operator): bool
30
    {
31
        return isset($this->arithmeticOperators[$operator]);
32
    }
33
}
34