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

DecimalIntBench   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 15
c 1
b 0
f 0
dl 0
loc 43
rs 10
wmc 7

7 Methods

Rating   Name   Duplication   Size   Complexity  
A benchFactorial() 0 4 1
A benchSemiFactorial() 0 4 1
A benchDoubleFactorial() 0 4 1
A benchSubFactorial() 0 4 1
A benchLCM() 0 4 1
A benchGCD() 0 4 1
A benchIsPrime() 0 4 1
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
}