Skip to content

Commit

Permalink
Run compare script to see diffs
Browse files Browse the repository at this point in the history
  • Loading branch information
janedbal committed Sep 3, 2024
1 parent c5a5ade commit 19f93f2
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
10 changes: 5 additions & 5 deletions tests/Rule/data/DeadMethodRule/array-map-1.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ public function __construct()
}

public function method1(string $foo): void {} // error: Unused DeadMap\ArrayMapTest::method1
public function method2(): void {}
public function method3(): void {}
public function method4(): void {}
public static function method5(): void {}
public function method2(): void {} // error: Unused DeadMap\ArrayMapTest::method2
public function method3(): void {} // error: Unused DeadMap\ArrayMapTest::method3
public function method4(): void {} // error: Unused DeadMap\ArrayMapTest::method4
public static function method5(): void {} // error: Unused DeadMap\ArrayMapTest::method5
public static function method6(): void {} // error: Unused DeadMap\ArrayMapTest::method6
}

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

}

Expand Down
8 changes: 4 additions & 4 deletions tests/Rule/data/DeadMethodRule/basic.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ abstract class TestParent {

use TestTrait;

public function __construct() // error: Unused DeadBasic\TestParent::__construct
public function __construct()
{
}

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

public function overwrittenParentMethodUsedByChild(): void // error: Unused DeadBasic\TestParent::overwrittenParentMethodUsedByChild
public function overwrittenParentMethodUsedByChild(): void
{

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

trait TestTrait {

public function __construct() // error: Unused DeadBasic\TestTrait::__construct
public function __construct()
{
}

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

}

public function traitMethodUnused(): void // error: Unused DeadBasic\TestTrait::traitMethodUnused
public function traitMethodUnused(): void
{

}
Expand Down
2 changes: 1 addition & 1 deletion tests/Rule/data/DeadMethodRule/class-string.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class ClassWithMethod {

public static function someMethod(): void {}
public static function someMethod(): void {} // error: Unused ClassStringCall\ClassWithMethod::someMethod
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/Rule/data/DeadMethodRule/dead-in-parent-1.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class B extends A
/**
* @inheritDoc
*/
public function __construct() // error: Unused DeadParent\B::__construct
public function __construct()
{
parent::__construct();
}
Expand Down
8 changes: 4 additions & 4 deletions tests/Rule/data/DeadMethodRule/dynamic-method.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

class Test {

public static function a(): void {}
public static function b(): void {}
public static function a(): void {} // error: Unused DynamicMethod\Test::a
public static function b(): void {} // error: Unused DynamicMethod\Test::b

public function c(): void {}
public function d(): void {}
public function c(): void {} // error: Unused DynamicMethod\Test::c
public function d(): void {} // error: Unused DynamicMethod\Test::d
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/Rule/data/DeadMethodRule/entrypoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public function __construct()
{
}

public function someUnused(): void
public function someUnused(): void // error: Unused DeadEntrypoint\Entrypoint::someUnused
{
Dead::usedMethod();
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Rule/data/DeadMethodRule/nullsafe.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public function second(): self {
return $this;
}

public static function secondStatic(): self {
public static function secondStatic(): self { // error: Unused Nullsafe\A::secondStatic
return new self();
}
}
Expand Down

0 comments on commit 19f93f2

Please sign in to comment.