diff --git a/src/Analysis/Problem/Bukkit/AmbiguousPluginNameProblem.php b/src/Analysis/Problem/Bukkit/AmbiguousPluginNameProblem.php index f3f74f4a..f82d7f38 100644 --- a/src/Analysis/Problem/Bukkit/AmbiguousPluginNameProblem.php +++ b/src/Analysis/Problem/Bukkit/AmbiguousPluginNameProblem.php @@ -13,8 +13,8 @@ */ class AmbiguousPluginNameProblem extends PluginProblem { - protected ?string $firstPluginPath = null; - protected ?string $secondPluginPath = null; + protected string $firstPluginPath; + protected string $secondPluginPath; /** * Get a human-readable message diff --git a/src/Analysis/Problem/Bukkit/PluginCommandExceptionProblem.php b/src/Analysis/Problem/Bukkit/PluginCommandExceptionProblem.php index 8bdbb69d..33f188ad 100644 --- a/src/Analysis/Problem/Bukkit/PluginCommandExceptionProblem.php +++ b/src/Analysis/Problem/Bukkit/PluginCommandExceptionProblem.php @@ -14,7 +14,7 @@ */ class PluginCommandExceptionProblem extends PluginProblem { - protected ?string $command = null; + protected string $command; /** * Get a human-readable message diff --git a/src/Analysis/Problem/Bukkit/PluginDependencyProblem.php b/src/Analysis/Problem/Bukkit/PluginDependencyProblem.php index 828c7425..2f0cd5e3 100644 --- a/src/Analysis/Problem/Bukkit/PluginDependencyProblem.php +++ b/src/Analysis/Problem/Bukkit/PluginDependencyProblem.php @@ -13,7 +13,7 @@ */ class PluginDependencyProblem extends PluginFileProblem { - protected ?string $dependencyPluginName = null; + protected string $dependencyPluginName; /** * @return string|null diff --git a/src/Analysis/Problem/Bukkit/PluginFileProblem.php b/src/Analysis/Problem/Bukkit/PluginFileProblem.php index 296b3d99..863a7884 100644 --- a/src/Analysis/Problem/Bukkit/PluginFileProblem.php +++ b/src/Analysis/Problem/Bukkit/PluginFileProblem.php @@ -18,12 +18,12 @@ */ abstract class PluginFileProblem extends PluginProblem { - protected ?string $pluginFilePath = null; + protected string $pluginFilePath; /** - * @return string|null + * @return string */ - public function getPluginFilePath(): ?string + public function getPluginFilePath(): string { return $this->pluginFilePath; } diff --git a/src/Analysis/Problem/Bukkit/PluginProblem.php b/src/Analysis/Problem/Bukkit/PluginProblem.php index bebd1f62..f0981d36 100644 --- a/src/Analysis/Problem/Bukkit/PluginProblem.php +++ b/src/Analysis/Problem/Bukkit/PluginProblem.php @@ -20,12 +20,12 @@ */ abstract class PluginProblem extends BukkitProblem { - protected ?string $pluginName = null; + protected string $pluginName; /** - * @return string|null + * @return string */ - public function getPluginName(): ?string + public function getPluginName(): string { return $this->pluginName; } diff --git a/src/Analysis/Problem/Bukkit/UnsupportedApiVersionProblem.php b/src/Analysis/Problem/Bukkit/UnsupportedApiVersionProblem.php index e7945618..a4d21e2a 100644 --- a/src/Analysis/Problem/Bukkit/UnsupportedApiVersionProblem.php +++ b/src/Analysis/Problem/Bukkit/UnsupportedApiVersionProblem.php @@ -7,12 +7,12 @@ class UnsupportedApiVersionProblem extends PluginFileProblem { - protected ?string $apiVersion = null; + protected string $apiVersion; /** - * @return string|null + * @return string */ - public function getApiVersion(): ?string + public function getApiVersion(): string { return $this->apiVersion; } diff --git a/src/Analysis/Problem/Bukkit/WorldDuplicateProblem.php b/src/Analysis/Problem/Bukkit/WorldDuplicateProblem.php index ca303129..9496be25 100644 --- a/src/Analysis/Problem/Bukkit/WorldDuplicateProblem.php +++ b/src/Analysis/Problem/Bukkit/WorldDuplicateProblem.php @@ -12,12 +12,12 @@ */ class WorldDuplicateProblem extends BukkitProblem { - protected ?string $worldName = null; + protected string $worldName; /** - * @return string|null + * @return string */ - public function getWorldName(): ?string + public function getWorldName(): string { return $this->worldName; } diff --git a/src/Analysis/Problem/CrashReport/TickingEntityProblem.php b/src/Analysis/Problem/CrashReport/TickingEntityProblem.php index 68d4d69d..40a17326 100644 --- a/src/Analysis/Problem/CrashReport/TickingEntityProblem.php +++ b/src/Analysis/Problem/CrashReport/TickingEntityProblem.php @@ -32,7 +32,7 @@ public function getMessage(): string { return Translator::getInstance()->getTranslation("ticking-entity-problem", [ "name" => $this->getName(), - "location" => $this->getLocationX() . ", " . $this->getLocationY() . ", " . $this->getLocationZ() + "location" => sprintf("%s, %s, %s", $this->getLocationX(), $this->getLocationY(), $this->getLocationZ()) ]); } diff --git a/src/Analysis/Problem/Fabric/FabricIncompatibleModsProblem.php b/src/Analysis/Problem/Fabric/FabricIncompatibleModsProblem.php index 04050cc9..6e44906f 100644 --- a/src/Analysis/Problem/Fabric/FabricIncompatibleModsProblem.php +++ b/src/Analysis/Problem/Fabric/FabricIncompatibleModsProblem.php @@ -7,7 +7,7 @@ class FabricIncompatibleModsProblem extends FabricModProblem { - protected ?string $secondModName = null; + protected string $secondModName; public function getMessage(): string { @@ -18,9 +18,9 @@ public function getMessage(): string } /** - * @return string|null + * @return string */ - public function getSecondModName(): ?string + public function getSecondModName(): string { return $this->secondModName; } diff --git a/src/Analysis/Problem/Fabric/FabricModProblem.php b/src/Analysis/Problem/Fabric/FabricModProblem.php index 360514d6..388f55cc 100644 --- a/src/Analysis/Problem/Fabric/FabricModProblem.php +++ b/src/Analysis/Problem/Fabric/FabricModProblem.php @@ -16,12 +16,12 @@ abstract class FabricModProblem extends FabricProblem protected static string $modNamePattern = "(?:'([^\']+)' \((?:[^\)]+)\)|([\w-]+))"; protected static string $modIDPattern = "([^ ,]+)"; - protected ?string $modName = null; + protected string $modName; /** - * @return string|null + * @return string */ - public function getModName(): ?string + public function getModName(): string { return $this->modName; } diff --git a/src/Analysis/Problem/Forge/ModDuplicateProblem.php b/src/Analysis/Problem/Forge/ModDuplicateProblem.php index 8294ef45..c336df92 100644 --- a/src/Analysis/Problem/Forge/ModDuplicateProblem.php +++ b/src/Analysis/Problem/Forge/ModDuplicateProblem.php @@ -13,8 +13,8 @@ */ class ModDuplicateProblem extends ModProblem { - protected ?string $firstModPath = null; - protected ?string $secondModPath = null; + protected string $firstModPath; + protected string $secondModPath; /** * Get a human-readable message @@ -78,17 +78,17 @@ public function isEqual(InsightInterface $insight): bool } /** - * @return string|null + * @return string */ - public function getFirstModPath(): ?string + public function getFirstModPath(): string { return $this->firstModPath; } /** - * @return string|null + * @return string */ - public function getSecondModPath(): ?string + public function getSecondModPath(): string { return $this->secondModPath; } diff --git a/src/Analysis/Problem/Forge/ModFatalProblem.php b/src/Analysis/Problem/Forge/ModFatalProblem.php index bb7b3a28..4113d581 100644 --- a/src/Analysis/Problem/Forge/ModFatalProblem.php +++ b/src/Analysis/Problem/Forge/ModFatalProblem.php @@ -14,9 +14,10 @@ */ class ModFatalProblem extends ModProblem { + protected string $modId; + protected ?string $modFileName = null; protected ?string $modVersion = null; - protected ?string $modId = null; /** * Get a human-readable message @@ -87,9 +88,9 @@ public function getModVersion(): ?string } /** - * @return string|null + * @return string */ - public function getModId(): ?string + public function getModId(): string { return $this->modId; } diff --git a/src/Analysis/Problem/Forge/ModProblem.php b/src/Analysis/Problem/Forge/ModProblem.php index fa54aaa9..23a1a9b6 100644 --- a/src/Analysis/Problem/Forge/ModProblem.php +++ b/src/Analysis/Problem/Forge/ModProblem.php @@ -11,7 +11,7 @@ */ abstract class ModProblem extends ForgeProblem { - protected ?string $modName = null; + protected string $modName; /** * @return string diff --git a/src/Analysis/Problem/Forge/ModWrongMinecraftVersionProblem.php b/src/Analysis/Problem/Forge/ModWrongMinecraftVersionProblem.php index 01be8ea4..3df936ba 100644 --- a/src/Analysis/Problem/Forge/ModWrongMinecraftVersionProblem.php +++ b/src/Analysis/Problem/Forge/ModWrongMinecraftVersionProblem.php @@ -13,7 +13,7 @@ */ class ModWrongMinecraftVersionProblem extends ModProblem { - protected ?string $minecraftVersion = null; + protected string $minecraftVersion; /** * @return string diff --git a/src/Analysis/Problem/Forge/MultipleModulesExportProblem.php b/src/Analysis/Problem/Forge/MultipleModulesExportProblem.php index 81376715..42accf1a 100644 --- a/src/Analysis/Problem/Forge/MultipleModulesExportProblem.php +++ b/src/Analysis/Problem/Forge/MultipleModulesExportProblem.php @@ -12,7 +12,7 @@ */ class MultipleModulesExportProblem extends ModProblem { - protected ?string $secondModName = null; + protected string $secondModName; /** * @return string diff --git a/src/Analysis/Problem/Forge/WorldModVersionProblem.php b/src/Analysis/Problem/Forge/WorldModVersionProblem.php index 2fa5da7c..a1c2ee81 100644 --- a/src/Analysis/Problem/Forge/WorldModVersionProblem.php +++ b/src/Analysis/Problem/Forge/WorldModVersionProblem.php @@ -13,8 +13,8 @@ */ class WorldModVersionProblem extends ModProblem { - protected ?string $currentVersion = null; - protected ?string $expectedVersion = null; + protected string $currentVersion; + protected string $expectedVersion; /** * Get a human-readable message @@ -60,17 +60,17 @@ public function setMatches(array $matches, mixed $patternKey): void } /** - * @return string|null + * @return string */ - public function getCurrentVersion(): ?string + public function getCurrentVersion(): string { return $this->currentVersion; } /** - * @return string|null + * @return string */ - public function getExpectedVersion(): ?string + public function getExpectedVersion(): string { return $this->expectedVersion; } diff --git a/src/Analysis/Problem/Paper/ApiVersionLowerThanAllowedProblem.php b/src/Analysis/Problem/Paper/ApiVersionLowerThanAllowedProblem.php index 3c72bed3..32466f6f 100644 --- a/src/Analysis/Problem/Paper/ApiVersionLowerThanAllowedProblem.php +++ b/src/Analysis/Problem/Paper/ApiVersionLowerThanAllowedProblem.php @@ -13,7 +13,7 @@ */ class ApiVersionLowerThanAllowedProblem extends PluginFileProblem { - protected ?string $pluginApiVersion = null; + protected string $pluginApiVersion; /** * Get a human-readable message @@ -50,9 +50,9 @@ public function setMatches(array $matches, mixed $patternKey): void } /** - * @return string|null + * @return string */ - public function getPluginApiVersion(): ?string + public function getPluginApiVersion(): string { return $this->pluginApiVersion; } diff --git a/src/Analysis/Problem/Pocketmine/PluginDependencyProblem.php b/src/Analysis/Problem/Pocketmine/PluginDependencyProblem.php index 35b0b339..724d8236 100644 --- a/src/Analysis/Problem/Pocketmine/PluginDependencyProblem.php +++ b/src/Analysis/Problem/Pocketmine/PluginDependencyProblem.php @@ -13,12 +13,12 @@ */ class PluginDependencyProblem extends PluginProblem { - protected ?string $dependencyPluginName = null; + protected string $dependencyPluginName; /** - * @return string|null + * @return string */ - public function getDependencyPluginName(): ?string + public function getDependencyPluginName(): string { return $this->dependencyPluginName; } diff --git a/src/Analysis/Problem/Pocketmine/PluginProblem.php b/src/Analysis/Problem/Pocketmine/PluginProblem.php index ec9607c8..5e19285f 100644 --- a/src/Analysis/Problem/Pocketmine/PluginProblem.php +++ b/src/Analysis/Problem/Pocketmine/PluginProblem.php @@ -11,12 +11,12 @@ */ abstract class PluginProblem extends PocketmineProblem { - protected ?string $pluginName = null; + protected string $pluginName; /** - * @return string|null + * @return string */ - public function getPluginName(): ?string + public function getPluginName(): string { return $this->pluginName; } diff --git a/src/Analysis/Problem/Pocketmine/PluginRuntimeProblem.php b/src/Analysis/Problem/Pocketmine/PluginRuntimeProblem.php index a6362568..8f535a9d 100644 --- a/src/Analysis/Problem/Pocketmine/PluginRuntimeProblem.php +++ b/src/Analysis/Problem/Pocketmine/PluginRuntimeProblem.php @@ -13,7 +13,7 @@ */ class PluginRuntimeProblem extends PluginProblem { - protected ?string $pluginPath = null; + protected string $pluginPath; /** * Get a human-readable message @@ -50,9 +50,9 @@ public function setMatches(array $matches, $patternKey): void } /** - * @return string|null + * @return string */ - public function getPluginPath(): ?string + public function getPluginPath(): string { return $this->pluginPath; }