mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
Remove PHPStan rules (no longer needed)
this is enforced by php-cs-fixer now instead.
This commit is contained in:
parent
32db27af78
commit
345ac75aac
@ -1,6 +1,5 @@
|
||||
includes:
|
||||
- tests/phpstan/configs/actual-problems.neon
|
||||
- tests/phpstan/configs/and-or-logical.neon
|
||||
- tests/phpstan/configs/gc-hacks.neon
|
||||
- tests/phpstan/configs/impossible-generics.neon
|
||||
- tests/phpstan/configs/php-bugs.neon
|
||||
@ -13,8 +12,6 @@ includes:
|
||||
|
||||
rules:
|
||||
- pocketmine\phpstan\rules\DisallowEnumComparisonRule
|
||||
- pocketmine\phpstan\rules\DisallowLogicalAndOperatorRule
|
||||
- pocketmine\phpstan\rules\DisallowLogicalOrOperatorRule
|
||||
- pocketmine\phpstan\rules\UnsafeForeachArrayOfStringRule
|
||||
# - pocketmine\phpstan\rules\ThreadedSupportedTypesRule
|
||||
|
||||
|
@ -1,577 +0,0 @@
|
||||
parameters:
|
||||
ignoreErrors:
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 6
|
||||
path: ../../../src/MemoryManager.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 3
|
||||
path: ../../../src/MemoryManager.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/PocketMine.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 10
|
||||
path: ../../../src/Server.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 5
|
||||
path: ../../../src/Server.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/crafting/CraftingGrid.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/crafting/ShapedRecipe.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 5
|
||||
path: ../../../src/crafting/ShapedRecipe.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/crafting/ShapelessRecipe.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 2
|
||||
path: ../../../src/crash/CrashDump.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/data/bedrock/LegacyToStringBidirectionalIdMap.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/entity/Attribute.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 4
|
||||
path: ../../../src/entity/Attribute.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/entity/AttributeMap.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 29
|
||||
path: ../../../src/entity/Entity.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 19
|
||||
path: ../../../src/entity/Entity.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/entity/EntityDataHelper.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 2
|
||||
path: ../../../src/entity/EntityDataHelper.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 3
|
||||
path: ../../../src/entity/ExperienceManager.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 6
|
||||
path: ../../../src/entity/Human.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 4
|
||||
path: ../../../src/entity/HungerManager.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 3
|
||||
path: ../../../src/entity/HungerManager.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 9
|
||||
path: ../../../src/entity/Living.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 6
|
||||
path: ../../../src/entity/Living.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 2
|
||||
path: ../../../src/entity/Location.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/entity/Skin.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/entity/Squid.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/entity/Villager.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 2
|
||||
path: ../../../src/entity/effect/EffectInstance.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 3
|
||||
path: ../../../src/entity/effect/EffectManager.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/entity/effect/EffectManager.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/entity/effect/PoisonEffect.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 5
|
||||
path: ../../../src/entity/object/ExperienceOrb.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 2
|
||||
path: ../../../src/entity/object/ExperienceOrb.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/entity/object/FallingBlock.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 3
|
||||
path: ../../../src/entity/object/FallingBlock.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 7
|
||||
path: ../../../src/entity/object/ItemEntity.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 2
|
||||
path: ../../../src/entity/object/ItemEntity.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/entity/object/Painting.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/entity/object/Painting.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 2
|
||||
path: ../../../src/entity/object/PrimedTNT.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 3
|
||||
path: ../../../src/entity/projectile/Arrow.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/entity/projectile/Arrow.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 7
|
||||
path: ../../../src/entity/projectile/Projectile.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 3
|
||||
path: ../../../src/entity/projectile/SplashPotion.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 2
|
||||
path: ../../../src/event/HandlerList.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 2
|
||||
path: ../../../src/event/HandlerList.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 2
|
||||
path: ../../../src/event/HandlerListManager.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 2
|
||||
path: ../../../src/event/RegisteredListener.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 4
|
||||
path: ../../../src/inventory/BaseInventory.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/inventory/BaseInventory.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/inventory/PlayerInventory.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 2
|
||||
path: ../../../src/inventory/transaction/CraftingTransaction.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 2
|
||||
path: ../../../src/item/Armor.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/item/Bow.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 2
|
||||
path: ../../../src/item/Bow.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/item/Bucket.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/item/ChorusFruit.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 3
|
||||
path: ../../../src/item/ChorusFruit.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 2
|
||||
path: ../../../src/item/Durable.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 7
|
||||
path: ../../../src/item/Item.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 6
|
||||
path: ../../../src/item/Item.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 2
|
||||
path: ../../../src/item/ItemFactory.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/item/ItemFactory.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/item/ItemIdentifier.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/item/WrittenBook.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/item/enchantment/ProtectionEnchantment.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 5
|
||||
path: ../../../src/lang/Language.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 7
|
||||
path: ../../../src/lang/Language.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/network/Network.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/network/mcpe/InventoryManager.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/network/mcpe/InventoryManager.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 6
|
||||
path: ../../../src/network/mcpe/NetworkSession.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 5
|
||||
path: ../../../src/network/mcpe/NetworkSession.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 2
|
||||
path: ../../../src/network/mcpe/auth/ProcessLoginTask.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/network/mcpe/cache/ChunkCache.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/network/mcpe/compression/ZlibCompressor.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/network/mcpe/convert/ItemTranslator.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 2
|
||||
path: ../../../src/network/mcpe/convert/TypeConverter.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 8
|
||||
path: ../../../src/network/mcpe/handler/InGamePacketHandler.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 4
|
||||
path: ../../../src/network/mcpe/handler/InGamePacketHandler.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/network/mcpe/handler/LoginPacketHandler.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/network/mcpe/handler/ResourcePacksPacketHandler.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/network/mcpe/raklib/RakLibInterface.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/network/mcpe/raklib/RakLibServer.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/network/query/QueryHandler.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/network/query/QueryInfo.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/permission/BanEntry.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/permission/PermissibleInternal.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 2
|
||||
path: ../../../src/player/OfflinePlayer.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 51
|
||||
path: ../../../src/player/Player.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 15
|
||||
path: ../../../src/player/Player.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/player/SurvivalBlockBreakHandler.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/plugin/ApiVersion.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/plugin/PharPluginLoader.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 2
|
||||
path: ../../../src/plugin/PluginBase.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/plugin/PluginBase.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/plugin/PluginDescription.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/plugin/PluginLoadabilityChecker.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 2
|
||||
path: ../../../src/plugin/PluginLoadabilityChecker.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 4
|
||||
path: ../../../src/plugin/PluginManager.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 3
|
||||
path: ../../../src/plugin/PluginManager.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/plugin/ScriptPluginLoader.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/resourcepacks/ZippedResourcePack.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 2
|
||||
path: ../../../src/resourcepacks/ZippedResourcePack.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 2
|
||||
path: ../../../src/scheduler/AsyncPool.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 3
|
||||
path: ../../../src/scheduler/AsyncPool.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/scheduler/AsyncTask.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 3
|
||||
path: ../../../src/scheduler/AsyncTask.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/scheduler/Task.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/scheduler/TaskScheduler.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 2
|
||||
path: ../../../src/thread/ThreadManager.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/updater/UpdateCheckTask.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"and\" operator is discouraged\\. Use && instead\\.$#"
|
||||
count: 2
|
||||
path: ../../../src/updater/UpdateChecker.php
|
||||
|
||||
-
|
||||
message: "#^Use of the \"or\" operator is discouraged\\. Use \\|\\| instead\\.$#"
|
||||
count: 2
|
||||
path: ../../../src/wizard/SetupWizard.php
|
||||
|
@ -1,44 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\phpstan\rules;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr\BinaryOp\LogicalAnd;
|
||||
use PHPStan\Analyser\Scope;
|
||||
use PHPStan\Rules\Rule;
|
||||
use PHPStan\Rules\RuleErrorBuilder;
|
||||
|
||||
/**
|
||||
* @phpstan-implements Rule<LogicalAnd>
|
||||
*/
|
||||
final class DisallowLogicalAndOperatorRule implements Rule{
|
||||
|
||||
public function getNodeType() : string{
|
||||
return LogicalAnd::class;
|
||||
}
|
||||
|
||||
public function processNode(Node $node, Scope $scope) : array{
|
||||
return [RuleErrorBuilder::message('Use of the "and" operator is discouraged. Use && instead.')->build()];
|
||||
}
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\phpstan\rules;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr\BinaryOp\LogicalOr;
|
||||
use PHPStan\Analyser\Scope;
|
||||
use PHPStan\Rules\Rule;
|
||||
use PHPStan\Rules\RuleErrorBuilder;
|
||||
|
||||
/**
|
||||
* @phpstan-implements Rule<LogicalOr>
|
||||
*/
|
||||
final class DisallowLogicalOrOperatorRule implements Rule{
|
||||
|
||||
public function getNodeType() : string{
|
||||
return LogicalOr::class;
|
||||
}
|
||||
|
||||
public function processNode(Node $node, Scope $scope) : array{
|
||||
return [RuleErrorBuilder::message('Use of the "or" operator is discouraged. Use || instead.')->build()];
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user