Completed
Pull Request — master (#304)
by Enrico
03:09
created

DivTest::divDoubleToDoubleResultDataProvider()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 10
nc 1
nop 0
dl 0
loc 13
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Tests\PHPSA\Compiler\Expression\Operators\Arithmetical;
4
5
use PhpParser\Node;
6
use PHPSA\CompiledExpression;
7
use PHPSA\Compiler\Expression;
8
9
class DivTest extends AbstractDivMod
10
{
11
    /**
12
     * @param $a
13
     * @param $b
14
     * @return float
15
     */
16
    protected function process($a, $b)
17
    {
18
        return $a / $b;
19
    }
20
21
    /**
22
     * @param Node\Scalar $a
23
     * @param Node\Scalar $b
24
     * @return Node\Expr\BinaryOp\Div
25
     */
26
    protected function buildExpression($a, $b)
27
    {
28
        return new Node\Expr\BinaryOp\Div($a, $b);
29
    }
30
31
    protected function getAssertType()
32
    {
33
        return CompiledExpression::DOUBLE;
34
    }
35
}
36