Test Failed
Pull Request — master (#127)
by Jordan
06:46
created

DecimalArithmeticBench   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 13
c 1
b 0
f 0
dl 0
loc 37
rs 10
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A benchMultiplySimple() 0 4 1
A benchDivideSimple() 0 4 1
A benchAddSimple() 0 4 1
A benchSubtractSimple() 0 4 1
A benchSqrtSimple() 0 4 1
A benchPowSimple() 0 4 1
1
<?php
2
3
namespace Samsara\Fermat\Values;
4
5
class DecimalArithmeticBench
6
{
7
8
    public function benchAddSimple()
9
    {
10
        $obj = new ImmutableDecimal(1);
11
        $obj->add(2);
12
    }
13
14
    public function benchSubtractSimple()
15
    {
16
        $obj = new ImmutableDecimal(1);
17
        $obj->subtract(2);
18
    }
19
20
    public function benchMultiplySimple()
21
    {
22
        $obj = new ImmutableDecimal(1);
23
        $obj->multiply(2);
24
    }
25
26
    public function benchDivideSimple()
27
    {
28
        $obj = new ImmutableDecimal(1);
29
        $obj->divide(2);
30
    }
31
32
    public function benchPowSimple()
33
    {
34
        $obj = new ImmutableDecimal(3);
35
        $obj->pow(2);
36
    }
37
38
    public function benchSqrtSimple()
39
    {
40
        $obj = new ImmutableDecimal(2);
41
        $obj->sqrt();
42
    }
43
44
}