mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-16 14:13:02 +00:00
change error identifier
This commit is contained in:
parent
2291546610
commit
95284bc9de
@ -20,7 +20,7 @@ parameters:
|
||||
|
||||
-
|
||||
message: '#^Dynamic new is not allowed\.$#'
|
||||
identifier: pocketmine.new.noDynamic
|
||||
identifier: pocketmine.new.dynamic
|
||||
count: 1
|
||||
path: ../../../src/Server.php
|
||||
|
||||
@ -62,7 +62,7 @@ parameters:
|
||||
|
||||
-
|
||||
message: '#^Dynamic new is not allowed\.$#'
|
||||
identifier: pocketmine.new.noDynamic
|
||||
identifier: pocketmine.new.dynamic
|
||||
count: 1
|
||||
path: ../../../src/block/Block.php
|
||||
|
||||
@ -524,7 +524,7 @@ parameters:
|
||||
|
||||
-
|
||||
message: '#^Dynamic new is not allowed\.$#'
|
||||
identifier: pocketmine.new.noDynamic
|
||||
identifier: pocketmine.new.dynamic
|
||||
count: 1
|
||||
path: ../../../src/block/tile/TileFactory.php
|
||||
|
||||
@ -956,7 +956,7 @@ parameters:
|
||||
|
||||
-
|
||||
message: '#^Dynamic new is not allowed\.$#'
|
||||
identifier: pocketmine.new.noDynamic
|
||||
identifier: pocketmine.new.dynamic
|
||||
count: 1
|
||||
path: ../../../src/plugin/PluginManager.php
|
||||
|
||||
@ -1274,7 +1274,7 @@ parameters:
|
||||
|
||||
-
|
||||
message: '#^Dynamic new is not allowed\.$#'
|
||||
identifier: pocketmine.new.noDynamic
|
||||
identifier: pocketmine.new.dynamic
|
||||
count: 1
|
||||
path: ../../../src/world/generator/GeneratorRegisterTask.php
|
||||
|
||||
|
@ -45,7 +45,7 @@ final class DisallowDynamicNewRule implements Rule{
|
||||
return [
|
||||
RuleErrorBuilder::message("Dynamic new is not allowed.")
|
||||
->tip("For factories, use closures instead. Closures can implement custom logic, are statically analyzable, and don't restrict the constructor signature.")
|
||||
->identifier("pocketmine.new.noDynamic")
|
||||
->identifier("pocketmine.new.dynamic")
|
||||
->build()
|
||||
];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user