ComparatorTestCase   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A compareDataProvider() 0 9 1
A newDefaultOtherwiseComparator() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of the Cubiche package.
5
 *
6
 * Copyright (c) Cubiche
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
namespace Cubiche\Core\Comparable\Tests\Units;
12
13
use Cubiche\Core\Comparable\Comparator;
14
use Cubiche\Core\Comparable\Tests\Fixtures\Value;
15
16
/**
17
 * Comparator Test Case Class.
18
 *
19
 * @author Ivannis Suárez Jerez <[email protected]>
20
 * @author Karel Osorio Ramírez <[email protected]>
21
 */
22
abstract class ComparatorTestCase extends ComparatorInterfaceTestCase
23
{
24
    /**
25
     * {@inheritdoc}
26
     */
27
    protected function compareDataProvider()
28
    {
29
        return array(
30
            array(1, 2, -1),
31
            array(new Value(1), 1, 0),
32
            array(1, new Value(0), 1),
33
            array(new Value(1), new Value(2), -1),
34
        );
35
    }
36
37
    /**
38
     * {@inheritdoc}
39
     */
40
    protected function newDefaultOtherwiseComparator()
41
    {
42
        return new Comparator();
43
    }
44
}
45