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 ( a51d8d...661062 )
by Edi
23:20
created

TestCase::createMock()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 13
Code Lines 9

Duplication

Lines 13
Ratio 100 %

Importance

Changes 0
Metric Value
dl 13
loc 13
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 9
nc 2
nop 1
1
<?php
2
3
namespace Netgen\Bundle\SiteAccessRoutesBundle\Tests;
4
5
use PHPUnit_Framework_TestCase;
6
7
/**
8
 * This class is a compatibility layer for using
9
 * PHPUnit 4.8 on PHP 5.5 and PHPUnit 5.5 on PHP >= 5.6.
10
 */
11
class TestCase extends PHPUnit_Framework_TestCase
12
{
13
    /**
14
     * Returns a test double for the specified class.
15
     *
16
     * @param string $originalClassName
17
     *
18
     * @throws \PHPUnit_Framework_Exception
19
     *
20
     * @return \PHPUnit_Framework_MockObject_MockObject
21
     */
22
    protected function createMock($originalClassName)
23
    {
24
        if (method_exists(PHPUnit_Framework_TestCase::class, 'createMock')) {
25
            return parent::createMock($originalClassName);
26
        }
27
28
        return $this
29
            ->getMockBuilder($originalClassName)
30
            ->disableOriginalConstructor()
31
            ->disableOriginalClone()
32
            ->disableArgumentCloning()
33
            ->getMock();
34
    }
35
36
    /**
37
     * Returns a partial test double for the specified class.
38
     *
39
     * @param string $originalClassName
40
     * @param array $methods
41
     *
42
     * @throws \PHPUnit_Framework_Exception
43
     *
44
     * @return \PHPUnit_Framework_MockObject_MockObject
45
     */
46
    protected function createPartialMock($originalClassName, array $methods)
47
    {
48
        if (method_exists(PHPUnit_Framework_TestCase::class, 'createPartialMock')) {
49
            return parent::createPartialMock($originalClassName, $methods);
50
        }
51
52
        return $this
53
            ->getMockBuilder($originalClassName)
54
            ->disableOriginalConstructor()
55
            ->disableOriginalClone()
56
            ->disableArgumentCloning()
57
            ->setMethods($methods)
58
            ->getMock();
59
    }
60
}
61