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.

Code Duplication    Length = 33-34 lines in 3 locations

tests/ExportTest.php 1 location

@@ 11-43 (lines=33) @@
8
 *
9
 * @package vipnytt\UserAgentParser\Tests
10
 */
11
class ExportTest extends \PHPUnit_Framework_TestCase
12
{
13
    /**
14
     * @dataProvider generateDataForTest
15
     * @param string $userAgent
16
     * @param array $result
17
     */
18
    public function testExport($userAgent, $result)
19
    {
20
        $parser = new UserAgentParser($userAgent);
21
        $this->assertInstanceOf('vipnytt\UserAgentParser', $parser);
22
        $this->assertTrue($parser->export() == $result);
23
    }
24
25
    /**
26
     * Generate test data
27
     * @return array
28
     */
29
    public
30
    function generateDataForTest()
31
    {
32
        return [
33
            [
34
                'googlebot-news/2.1',
35
                [
36
                    'googlebot-news/2.1',
37
                    'googlebot-news',
38
                    'googlebot',
39
                ]
40
            ]
41
        ];
42
    }
43
}
44

tests/MatchTest.php 1 location

@@ 11-44 (lines=34) @@
8
 *
9
 * @package vipnytt\UserAgentParser\Tests
10
 */
11
class MatchTest extends \PHPUnit_Framework_TestCase
12
{
13
    /**
14
     * @dataProvider generateDataForTest
15
     * @param string $userAgent
16
     * @param array $array
17
     */
18
    public function testMatch($userAgent, $array)
19
    {
20
        $parser = new UserAgentParser($userAgent);
21
        $this->assertInstanceOf('vipnytt\UserAgentParser', $parser);
22
        $this->assertNotFalse($parser->match($array));
23
    }
24
25
    /**
26
     * Generate test data
27
     * @return array
28
     */
29
    public
30
    function generateDataForTest()
31
    {
32
        return [
33
            [
34
                'googlebot-news/2.1',
35
                [
36
                    'googlebot-news',
37
                    'googlebot-images',
38
                    'googlebot-news/2.0',
39
                    'googlebot',
40
                ]
41
            ]
42
        ];
43
    }
44
}
45

tests/VersionTest.php 1 location

@@ 11-43 (lines=33) @@
8
 *
9
 * @package vipnytt\UserAgentParser\Tests
10
 */
11
class VersionTest extends \PHPUnit_Framework_TestCase
12
{
13
    /**
14
     * @dataProvider generateDataForTest
15
     * @param string $userAgent
16
     * @param string $result
17
     */
18
    public function testVersion($userAgent, $result)
19
    {
20
        $parser = new UserAgentParser($userAgent);
21
        $this->assertInstanceOf('vipnytt\UserAgentParser', $parser);
22
        $this->assertTrue($parser->stripVersion() == $result);
23
    }
24
25
    /**
26
     * Generate test data
27
     * @return array
28
     */
29
    public
30
    function generateDataForTest()
31
    {
32
        return [
33
            [
34
                'googlebot/2.1',
35
                'googlebot',
36
            ],
37
            [
38
                'bingbot/2.0',
39
                'bingbot',
40
            ]
41
        ];
42
    }
43
}
44