Completed
Pull Request — master (#124)
by Enrico
04:01 queued 01:12
created

SmallerTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 22
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A buildExpression() 0 4 1
A operator() 0 4 1
1
<?php
2
3
namespace Tests\PHPSA\Compiler\Expression\Operators\Comparison;
4
5
use PhpParser\Node;
6
use PHPSA\CompiledExpression;
7
use PHPSA\Compiler\Expression;
8
9
/**
10
 * Class SmallerTest
11
 * @package Tests\PHPSA\Expression\Operators\Comparison
12
 *
13
 * @see PHPSA\Compiler\Expression\Operators\Comparison\Smaller
14
 */
15
class SmallerTest extends BaseTestCase
16
{
17
    /**
18
     * @param \PhpParser\Node\Scalar $a
19
     * @param \PhpParser\Node\Scalar $b
20
     * @return Node\Expr\BinaryOp\Smaller
21
     */
22
    protected function buildExpression($a, $b)
23
    {
24
        return new Node\Expr\BinaryOp\Smaller($a, $b);
25
    }
26
27
    /**
28
     * @param $a
29
     * @param $b
30
     * @return bool
31
     */
32
    protected function operator($a, $b)
33
    {
34
        return $a < $b;
35
    }
36
}
37