Skip to content

Commit 19f93f2

Browse files
committed
Run compare script to see diffs
1 parent c5a5ade commit 19f93f2

File tree

7 files changed

+17
-17
lines changed

7 files changed

+17
-17
lines changed

tests/Rule/data/DeadMethodRule/array-map-1.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ public function __construct()
1515
}
1616

1717
public function method1(string $foo): void {} // error: Unused DeadMap\ArrayMapTest::method1
18-
public function method2(): void {}
19-
public function method3(): void {}
20-
public function method4(): void {}
21-
public static function method5(): void {}
18+
public function method2(): void {} // error: Unused DeadMap\ArrayMapTest::method2
19+
public function method3(): void {} // error: Unused DeadMap\ArrayMapTest::method3
20+
public function method4(): void {} // error: Unused DeadMap\ArrayMapTest::method4
21+
public static function method5(): void {} // error: Unused DeadMap\ArrayMapTest::method5
2222
public static function method6(): void {} // error: Unused DeadMap\ArrayMapTest::method6
2323
}
2424

@@ -28,7 +28,7 @@ public function method2(): void {}
2828
public function method3(): void {}
2929
public function method4(): void {}
3030
public static function method5(): void {} // should be reported (https://github.com/phpstan/phpstan-src/pull/3372)
31-
public static function method6(): void {} // error: Unused DeadMap\Child::method6
31+
public static function method6(): void {}
3232

3333
}
3434

tests/Rule/data/DeadMethodRule/basic.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ abstract class TestParent {
6262

6363
use TestTrait;
6464

65-
public function __construct() // error: Unused DeadBasic\TestParent::__construct
65+
public function __construct()
6666
{
6767
}
6868

@@ -72,7 +72,7 @@ public function parentMethodUsed(TestChild $child): void
7272
$this->traitMethodUsed();
7373
}
7474

75-
public function overwrittenParentMethodUsedByChild(): void // error: Unused DeadBasic\TestParent::overwrittenParentMethodUsedByChild
75+
public function overwrittenParentMethodUsedByChild(): void
7676
{
7777

7878
}
@@ -85,7 +85,7 @@ public function parentMethodUnused(): void // error: Unused DeadBasic\TestParen
8585

8686
trait TestTrait {
8787

88-
public function __construct() // error: Unused DeadBasic\TestTrait::__construct
88+
public function __construct()
8989
{
9090
}
9191

@@ -94,7 +94,7 @@ public function traitMethodUsed(): void
9494

9595
}
9696

97-
public function traitMethodUnused(): void // error: Unused DeadBasic\TestTrait::traitMethodUnused
97+
public function traitMethodUnused(): void
9898
{
9999

100100
}

tests/Rule/data/DeadMethodRule/class-string.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
class ClassWithMethod {
66

7-
public static function someMethod(): void {}
7+
public static function someMethod(): void {} // error: Unused ClassStringCall\ClassWithMethod::someMethod
88
}
99

1010
/**

tests/Rule/data/DeadMethodRule/dead-in-parent-1.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class B extends A
2020
/**
2121
* @inheritDoc
2222
*/
23-
public function __construct() // error: Unused DeadParent\B::__construct
23+
public function __construct()
2424
{
2525
parent::__construct();
2626
}

tests/Rule/data/DeadMethodRule/dynamic-method.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
class Test {
66

7-
public static function a(): void {}
8-
public static function b(): void {}
7+
public static function a(): void {} // error: Unused DynamicMethod\Test::a
8+
public static function b(): void {} // error: Unused DynamicMethod\Test::b
99

10-
public function c(): void {}
11-
public function d(): void {}
10+
public function c(): void {} // error: Unused DynamicMethod\Test::c
11+
public function d(): void {} // error: Unused DynamicMethod\Test::d
1212
}
1313

1414
/**

tests/Rule/data/DeadMethodRule/entrypoint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public function __construct()
99
{
1010
}
1111

12-
public function someUnused(): void
12+
public function someUnused(): void // error: Unused DeadEntrypoint\Entrypoint::someUnused
1313
{
1414
Dead::usedMethod();
1515
}

tests/Rule/data/DeadMethodRule/nullsafe.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public function second(): self {
1212
return $this;
1313
}
1414

15-
public static function secondStatic(): self {
15+
public static function secondStatic(): self { // error: Unused Nullsafe\A::secondStatic
1616
return new self();
1717
}
1818
}

0 commit comments

Comments
 (0)