diff --git a/src/Analysis/Problem/Bukkit/PluginDependencyProblem.php b/src/Analysis/Problem/Bukkit/PluginDependencyProblem.php index 5e99f2af..aac0217c 100644 --- a/src/Analysis/Problem/Bukkit/PluginDependencyProblem.php +++ b/src/Analysis/Problem/Bukkit/PluginDependencyProblem.php @@ -11,9 +11,9 @@ class PluginDependencyProblem extends PluginFileProblem 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/Bukkit/UnsupportedClassVersionProblem.php b/src/Analysis/Problem/Bukkit/UnsupportedClassVersionProblem.php index 23e8223d..bab42df9 100644 --- a/src/Analysis/Problem/Bukkit/UnsupportedClassVersionProblem.php +++ b/src/Analysis/Problem/Bukkit/UnsupportedClassVersionProblem.php @@ -44,7 +44,10 @@ public function setMatches(array $matches, mixed $patternKey): void $this->classFileVersion = intval($matches[3]); } - $this->addSolution(new UpdateJavaSolution($this->getJavaVersion())); + $javaVersion = $this->getJavaVersion(); + if ($javaVersion !== null) { + $this->addSolution(new UpdateJavaSolution($javaVersion)); + } } diff --git a/src/Analysis/Problem/MinecraftProblem.php b/src/Analysis/Problem/MinecraftProblem.php index 81b9dd15..d52b25f4 100644 --- a/src/Analysis/Problem/MinecraftProblem.php +++ b/src/Analysis/Problem/MinecraftProblem.php @@ -22,6 +22,6 @@ abstract class MinecraftProblem extends Problem implements PatternInsightInterfa */ public function isEqual(InsightInterface $insight): bool { - return get_class($this) === get_class($insight); + return $insight instanceof static; } } \ No newline at end of file diff --git a/src/Detective/Detective.php b/src/Detective/Detective.php index 3c778ceb..87d9d2a4 100644 --- a/src/Detective/Detective.php +++ b/src/Detective/Detective.php @@ -77,7 +77,7 @@ class Detective extends \Aternos\Codex\Detective\Detective BedrockContentLog::class, FabricServerLog::class, BungeeCordProxyLog::class, - WaterfallProxyLog::class, + WaterFallProxyLog::class, VelocityProxyLog::class, GeyserProxyLog::class, GlowstoneServerLog::class,