Skip to content

Commit 95284bc

Browse files
committed
change error identifier
1 parent 2291546 commit 95284bc

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tests/phpstan/configs/actual-problems.neon

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ parameters:
2020

2121
-
2222
message: '#^Dynamic new is not allowed\.$#'
23-
identifier: pocketmine.new.noDynamic
23+
identifier: pocketmine.new.dynamic
2424
count: 1
2525
path: ../../../src/Server.php
2626

@@ -62,7 +62,7 @@ parameters:
6262

6363
-
6464
message: '#^Dynamic new is not allowed\.$#'
65-
identifier: pocketmine.new.noDynamic
65+
identifier: pocketmine.new.dynamic
6666
count: 1
6767
path: ../../../src/block/Block.php
6868

@@ -524,7 +524,7 @@ parameters:
524524

525525
-
526526
message: '#^Dynamic new is not allowed\.$#'
527-
identifier: pocketmine.new.noDynamic
527+
identifier: pocketmine.new.dynamic
528528
count: 1
529529
path: ../../../src/block/tile/TileFactory.php
530530

@@ -956,7 +956,7 @@ parameters:
956956

957957
-
958958
message: '#^Dynamic new is not allowed\.$#'
959-
identifier: pocketmine.new.noDynamic
959+
identifier: pocketmine.new.dynamic
960960
count: 1
961961
path: ../../../src/plugin/PluginManager.php
962962

@@ -1274,7 +1274,7 @@ parameters:
12741274

12751275
-
12761276
message: '#^Dynamic new is not allowed\.$#'
1277-
identifier: pocketmine.new.noDynamic
1277+
identifier: pocketmine.new.dynamic
12781278
count: 1
12791279
path: ../../../src/world/generator/GeneratorRegisterTask.php
12801280

tests/phpstan/rules/DisallowDynamicNewRule.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function processNode(Node $node, Scope $scope) : array{
4545
return [
4646
RuleErrorBuilder::message("Dynamic new is not allowed.")
4747
->tip("For factories, use closures instead. Closures can implement custom logic, are statically analyzable, and don't restrict the constructor signature.")
48-
->identifier("pocketmine.new.noDynamic")
48+
->identifier("pocketmine.new.dynamic")
4949
->build()
5050
];
5151
}

0 commit comments

Comments
 (0)