Failed Conditions
Push — master ( 528b1f...8f64a3 )
by Jonathan
09:23 queued 02:28
created

ClassMethodUsageTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 10
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testGetFile() 0 3 1
A testGetLine() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace UsageFinder\Tests;
6
7
use PHPUnit\Framework\TestCase;
8
use UsageFinder\ClassMethodUsage;
9
10
final class ClassMethodUsageTest extends TestCase
11
{
12
    public function testGetFile() : void
13
    {
14
        self::assertSame('src/Test.php', (new ClassMethodUsage('src/Test.php', 1))->getFile());
0 ignored issues
show
Bug introduced by
'src/Test.php' of type string is incompatible with the type PHPUnit\Framework\T expected by parameter $expected of PHPUnit\Framework\Assert::assertSame(). ( Ignorable by Annotation )

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

14
        self::assertSame(/** @scrutinizer ignore-type */ 'src/Test.php', (new ClassMethodUsage('src/Test.php', 1))->getFile());
Loading history...
Bug Best Practice introduced by
The method PHPUnit\Framework\Assert::assertSame() is not static, but was called statically. ( Ignorable by Annotation )

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

14
        self::/** @scrutinizer ignore-call */ 
15
              assertSame('src/Test.php', (new ClassMethodUsage('src/Test.php', 1))->getFile());
Loading history...
15
    }
16
17
    public function testGetLine() : void
18
    {
19
        self::assertSame(1, (new ClassMethodUsage('src/Test.php', 1))->getLine());
0 ignored issues
show
Bug Best Practice introduced by
The method PHPUnit\Framework\Assert::assertSame() is not static, but was called statically. ( Ignorable by Annotation )

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

19
        self::/** @scrutinizer ignore-call */ 
20
              assertSame(1, (new ClassMethodUsage('src/Test.php', 1))->getLine());
Loading history...
Bug introduced by
1 of type integer is incompatible with the type PHPUnit\Framework\T expected by parameter $expected of PHPUnit\Framework\Assert::assertSame(). ( Ignorable by Annotation )

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

19
        self::assertSame(/** @scrutinizer ignore-type */ 1, (new ClassMethodUsage('src/Test.php', 1))->getLine());
Loading history...
20
    }
21
}
22