StandardDeviationTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 13
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A itCalculatesStandardDeviations() 0 7 1
1
<?php
2
3
namespace Undemanding\Difference\Test\Calculation;
4
5
use Undemanding\Difference\Calculation\StandardDeviation;
6
use Undemanding\Difference\Test\Test;
7
8
class StandardDeviationTest extends Test
9
{
10
    /**
11
     * @test
12
     */
13
    public function itCalculatesStandardDeviations()
14
    {
15
        $calculation = new StandardDeviation();
16
17
        $this->assertEquals(0.5, $calculation([[0, 1], [0, 0]], 2, 2, 0.25));
18
        $this->assertEquals(0.58, round($calculation([[0, 1], [1, 0]], 2, 2, 0.5), 2));
19
    }
20
}
21