ReverseComparatorTests   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 2
dl 0
loc 21
rs 10
c 0
b 0
f 0

2 Methods

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