CallbackComparatorTests   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A defaultConstructorArguments() 0 6 1
A compareDataProvider() 0 8 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
/**
14
 * Callback Comparator Tests class.
15
 *
16
 * @author Ivannis Suárez Jerez <[email protected]>
17
 * @author Karel Osorio Ramírez <[email protected]>
18
 */
19
class CallbackComparatorTests extends ComparatorTestCase
20
{
21
    /**
22
     * {@inheritdoc}
23
     */
24
    protected function defaultConstructorArguments()
25
    {
26
        return array(function () {
27
            return -1;
28
        });
29
    }
30
31
    /**
32
     * {@inheritdoc}
33
     */
34
    protected function compareDataProvider()
35
    {
36
        return array(
37
            array(1, 2, -1),
38
            array(1, 3, -1),
39
            array(4, 1, -1),
40
        );
41
    }
42
}
43