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

DecimalIntBench::benchIsPrime()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 4
rs 10
1
<?php
2
3
namespace Samsara\Fermat\Values;
4
5
use Samsara\Fermat\Types\Decimal;
6
7
class DecimalIntBench
8
{
9
10
    public function benchFactorial()
11
    {
12
        $five = new ImmutableDecimal(5);
13
        $five->factorial();
14
    }
15
16
    public function benchSubFactorial()
17
    {
18
        $five = new ImmutableDecimal(5);
19
        $five->subFactorial();
20
    }
21
22
    public function benchDoubleFactorial()
23
    {
24
        $five = new ImmutableDecimal(5);
25
        $five->doubleFactorial();
26
    }
27
28
    public function benchSemiFactorial()
29
    {
30
        $five = new ImmutableDecimal(5);
31
        $five->semiFactorial();
32
    }
33
34
    public function benchLCM()
35
    {
36
        $num = new ImmutableDecimal(6);
37
        $num->getLeastCommonMultiple(8);
38
    }
39
40
    public function benchGCD()
41
    {
42
        $num = new ImmutableDecimal(24);
43
        $num->getGreatestCommonDivisor(16);
44
    }
45
46
    public function benchIsPrime()
47
    {
48
        $num = new ImmutableDecimal(83);
49
        $num->isPrime();
50
    }
51
52
}