Skip to content

Commit

Permalink
updated codex + imports
Browse files Browse the repository at this point in the history
  • Loading branch information
matthi4s committed Aug 16, 2022
1 parent 7065ca6 commit 0e8a75f
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 16 deletions.
8 changes: 4 additions & 4 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/Analysis/Information/Quilt/QuiltInformation.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

namespace Aternos\Codex\Minecraft\Analysis\Information\Quilt;

use Aternos\Codex\Minecraft\Analysis\Information\Vanilla\VanillaInformation;

/**
* Class QuiltInformation
*
* @package Aternos\Codex\Minecraft\Analysis\Information\Quilt
*/
abstract class QuiltInformation extends \Aternos\Codex\Minecraft\Analysis\Information\Vanilla\VanillaInformation
abstract class QuiltInformation extends VanillaInformation
{

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

namespace Aternos\Codex\Minecraft\Analysis\Information\Quilt;

use Aternos\Codex\Minecraft\Analysis\Information\Vanilla\VanillaVersionInformation;

/**
* Class QuiltVanillaVersionInformation
*
* @package Aternos\Codex\Minecraft\Analysis\Information\Quilt
*/
class QuiltVanillaVersionInformation extends \Aternos\Codex\Minecraft\Analysis\Information\Vanilla\VanillaVersionInformation
class QuiltVanillaVersionInformation extends VanillaVersionInformation
{
/**
* @inheritDoc
Expand Down
4 changes: 3 additions & 1 deletion src/Analysis/Problem/CrashReport/CrashReportProblem.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

namespace Aternos\Codex\Minecraft\Analysis\Problem\CrashReport;

use Aternos\Codex\Minecraft\Analysis\Problem\MinecraftProblem;

/**
* Class CrashReportProblem
*
* @package Aternos\Codex\Minecraft\Analysis\Problem\CrashReport
*/
abstract class CrashReportProblem extends \Aternos\Codex\Minecraft\Analysis\Problem\MinecraftProblem
abstract class CrashReportProblem extends MinecraftProblem
{
}
4 changes: 3 additions & 1 deletion src/Analysis/Solution/CrashReport/CrashReportSolution.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

namespace Aternos\Codex\Minecraft\Analysis\Solution\CrashReport;

use Aternos\Codex\Minecraft\Analysis\Solution\MinecraftSolution;

/**
* Class CrashReportSolution
*
* @package Aternos\Codex\Minecraft\Analysis\Solution\CrashReport
*/
abstract class CrashReportSolution extends \Aternos\Codex\Minecraft\Analysis\Solution\MinecraftSolution
abstract class CrashReportSolution extends MinecraftSolution
{

}
4 changes: 2 additions & 2 deletions src/Log/Minecraft/MinecraftLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
use Aternos\Codex\Analyser\AnalyserInterface;
use Aternos\Codex\Analyser\PatternAnalyser;
use Aternos\Codex\Analysis\InformationInterface;
use Aternos\Codex\Analysis\InsightInterface;
use Aternos\Codex\Detective\LinePatternDetector;
use Aternos\Codex\Log\AnalysableLog;
use Aternos\Codex\Log\DetectableLogInterface;
use Aternos\Codex\Minecraft\Log\Type\ClientLogTypeInterface;
use Aternos\Codex\Minecraft\Log\Type\ContentLogTypeInterface;
Expand All @@ -21,7 +21,7 @@
*
* @package Aternos\Codex\Minecraft\Log\Minecraft
*/
class MinecraftLog extends \Aternos\Codex\Log\AnalysableLog implements DetectableLogInterface
class MinecraftLog extends AnalysableLog implements DetectableLogInterface
{
protected static string $pattern;

Expand Down
4 changes: 3 additions & 1 deletion src/Log/Minecraft/Vanilla/Fabric/FabricServerLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

namespace Aternos\Codex\Minecraft\Log\Minecraft\Vanilla\Fabric;

use Aternos\Codex\Minecraft\Log\Type\ServerLogTypeInterface;

/**
* Class FabricServerLog
*
* @package Aternos\Codex\Minecraft\Log\Minecraft\Fabric
*/
class FabricServerLog extends FabricLog implements \Aternos\Codex\Minecraft\Log\Type\ServerLogTypeInterface
class FabricServerLog extends FabricLog implements ServerLogTypeInterface
{
}
1 change: 0 additions & 1 deletion src/Log/Minecraft/Vanilla/Quilt/QuiltLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Aternos\Codex\Minecraft\Analyser\QuiltAnalyser;
use Aternos\Codex\Minecraft\Analysis\Information\Vanilla\VanillaVersionInformation;
use Aternos\Codex\Minecraft\Log\Minecraft\Vanilla\VanillaLog;
use Aternos\Codex\Minecraft\Log\Minecraft\Vanilla\VanillaServerLog;

/**
* Class QuiltLog
Expand Down
2 changes: 1 addition & 1 deletion src/Parser/CrashReportLevel.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* @package Aternos\Codex\Minecraft\Log\CrashReport
*/
enum CrashReportLevel: int implements \Aternos\Codex\Log\LevelInterface
enum CrashReportLevel: int implements LevelInterface
{
case WARNING = 4;
case INFO = 6;
Expand Down
8 changes: 5 additions & 3 deletions src/Translator/Translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace Aternos\Codex\Minecraft\Translator;

use InvalidArgumentException;

/**
* Class Translator
*
Expand Down Expand Up @@ -64,7 +66,7 @@ public function getLanguage(): string
public function setLanguage(string $language = self::DEFAULT_LANGUAGE): static
{
if (!$this->checkTranslationFile($language)) {
throw new \InvalidArgumentException("Language file for language '" . $language . "' not found.");
throw new InvalidArgumentException("Language file for language '" . $language . "' not found.");
}
$this->language = $language;
return $this;
Expand All @@ -87,7 +89,7 @@ public function getTranslation(string $variable, array $replacements = []): stri
if ($this->getLanguage() !== static::DEFAULT_LANGUAGE) {
return static::getFallbackInstance()->getTranslation($variable, $replacements);
}
throw new \InvalidArgumentException("Translation variable '" . $variable . "' not found.");
throw new InvalidArgumentException("Translation variable '" . $variable . "' not found.");
}

$value = $translations[$variable];
Expand Down Expand Up @@ -133,7 +135,7 @@ protected function loadTranslations(): array
$content = file_get_contents($file);
$translations = json_decode($content, true);
if (!is_array($translations)) {
throw new \InvalidArgumentException("Could not parse JSON translation file: " . $file);
throw new InvalidArgumentException("Could not parse JSON translation file: " . $file);
}

$this->translations[$this->language] = $translations;
Expand Down

0 comments on commit 0e8a75f

Please sign in to comment.