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.
Passed
Push — master ( 38922b...26dfd6 )
by Simone
07:17
created

StringParserTest   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 45
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A testSplitStringInTokenViaUnderscore() 0 7 1
A setUp() 0 3 1
A testTo() 0 9 1
A testCamelizeSnakeCaseToCamelCase() 0 5 1
A tokens() 0 6 1
1
<?php
2
3
namespace Mado\QueryBundle\Tests\Services;
4
5
use Mado\QueryBundle\Services\StringParser;
6
use PHPUnit\Framework\TestCase;
7
8
class StringParserTest extends TestCase
9
{
10
    public function setUp()
11
    {
12
        $this->parser = new StringParser();
0 ignored issues
show
Bug Best Practice introduced by
The property parser does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
13
    }
14
15
    /** @dataProvider tokens */
16
    public function testSplitStringInTokenViaUnderscore(
17
        int $numberOfTokens,
18
        string $string
19
    ) {
20
        $this->assertEquals(
21
            $numberOfTokens,
22
            $this->parser->numberOfTokens($string)
23
        );
24
    }
25
26
    /** @dataProvider tokens */
27
    public function testTo(
28
        int $numberOfTokens,
0 ignored issues
show
Unused Code introduced by
The parameter $numberOfTokens is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

28
        /** @scrutinizer ignore-unused */ int $numberOfTokens,

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
29
        string $string,
30
        int $tokenPosition,
31
        string $token
32
    ) {
33
        $this->assertEquals(
34
            $token,
35
            $this->parser->tokenize($string, $tokenPosition)
36
        );
37
    }
38
39
    public function tokens()
40
    {
41
        return [
42
            [1, 'foo', 0, 'foo'],
43
            [2, 'foo_bar', 0, 'foo'],
44
            [2, 'foo_bar', 1, 'bar'],
45
        ];
46
    }
47
48
    public function testCamelizeSnakeCaseToCamelCase()
49
    {
50
        $this->assertEquals(
51
            'lowerCamelCase',
52
            $this->parser->camelize('lower_camel_case')
53
        );
54
    }
55
}
56