GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 9491ea...0cd9cc )
by Jasper
02:21
created

EquatableAssertionCapabilities::assertNotEquals()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 11

Duplication

Lines 15
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 15
loc 15
rs 9.4285
cc 1
eloc 11
nc 1
nop 7
1
<?php
2
3
/**
4
 * @license https://github.com/f500/equatable/blob/master/LICENSE MIT
5
 */
6
7
namespace F500\Equatable\PHPUnit;
8
9
use F500\Equatable\PHPUnit\Constraint\IsEqual;
10
use PHPUnit_Framework_Assert;
11
12
/**
13
 * @copyright Copyright (c) 2015 Future500 B.V.
14
 * @author    Jasper N. Brouwer <[email protected]>
15
 */
16
trait EquatableAssertionCapabilities
17
{
18
    /**
19
     * @inheritdoc
20
     */
21 View Code Duplication
    public static function assertEquals(
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
22
        $expected,
23
        $actual,
24
        $message = '',
25
        $delta = 0.0,
26
        $maxDepth = 10,
27
        $canonicalize = false,
28
        $ignoreCase = false
29
    ) {
30
        $constraint = self::equalTo($expected, $delta, $maxDepth, $canonicalize, $ignoreCase);
31
32
        PHPUnit_Framework_Assert::assertThat($actual, $constraint, $message);
33
    }
34
35
    /**
36
     * @inheritdoc
37
     */
38 View Code Duplication
    public static function assertNotEquals(
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
39
        $expected,
40
        $actual,
41
        $message = '',
42
        $delta = 0.0,
43
        $maxDepth = 10,
44
        $canonicalize = false,
45
        $ignoreCase = false
46
    ) {
47
        $constraint = new \PHPUnit_Framework_Constraint_Not(
48
            self::equalTo($expected, $delta, $maxDepth, $canonicalize, $ignoreCase)
49
        );
50
51
        PHPUnit_Framework_Assert::assertThat($actual, $constraint, $message);
52
    }
53
54
    /**
55
     * @inheritdoc
56
     */
57
    public static function equalTo($value, $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false)
58
    {
59
        return new IsEqual(
60
            $value,
61
            $delta,
62
            $maxDepth,
63
            $canonicalize,
64
            $ignoreCase
65
        );
66
    }
67
68
    /**
69
     * @inheritdoc
70
     */
71
    public static function attributeEqualTo(
72
        $attributeName,
73
        $value,
74
        $delta = 0.0,
75
        $maxDepth = 10,
76
        $canonicalize = false,
77
        $ignoreCase = false
78
    ) {
79
        return PHPUnit_Framework_Assert::attribute(
80
            self::equalTo($value, $delta, $maxDepth, $canonicalize, $ignoreCase),
81
            $attributeName
82
        );
83
    }
84
}
85