Skip to content

Commit ca25022

Browse files
committed
use constant from base class PatternParser instead of child class Parser
1 parent f72c381 commit ca25022

File tree

9 files changed

+20
-9
lines changed

9 files changed

+20
-9
lines changed

src/Log/Minecraft/Bedrock/BedrockContentLog.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Aternos\Codex\Minecraft\Log\Type\ContentLogTypeInterface;
77
use Aternos\Codex\Minecraft\Parser\Parser;
88
use Aternos\Codex\Parser\ParserInterface;
9+
use Aternos\Codex\Parser\PatternParser;
910

1011
/**
1112
* Class BedrockContentLog
@@ -23,7 +24,7 @@ public static function getDefaultParser(): ParserInterface
2324
{
2425
return (new Parser())
2526
->setPattern(static::$pattern)
26-
->setMatches([Parser::PREFIX, Parser::LEVEL]);
27+
->setMatches([Parser::PREFIX, PatternParser::LEVEL]);
2728
}
2829

2930
/**

src/Log/Minecraft/Bedrock/BedrockServerLog.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Aternos\Codex\Minecraft\Log\Type\ServerLogTypeInterface;
88
use Aternos\Codex\Minecraft\Parser\Parser;
99
use Aternos\Codex\Parser\ParserInterface;
10+
use Aternos\Codex\Parser\PatternParser;
1011

1112
/**
1213
* Class BedrockServerLog
@@ -26,7 +27,7 @@ public static function getDefaultParser(): ParserInterface
2627
return (new Parser())
2728
->setPattern(static::$pattern)
2829
->setTimeFormat('Y-m-d H:i:s')
29-
->setMatches([Parser::PREFIX, Parser::TIME, Parser::LEVEL]);
30+
->setMatches([Parser::PREFIX, PatternParser::TIME, PatternParser::LEVEL]);
3031
}
3132

3233
/**

src/Log/Minecraft/CustomSkinLoader/CustomSkinLoaderLog.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Aternos\Codex\Minecraft\Analysis\Information\CustomSkinLoader\CustomSkinLoaderVersionInformation;
88
use Aternos\Codex\Minecraft\Log\Minecraft\MinecraftLog;
99
use Aternos\Codex\Minecraft\Parser\Parser;
10+
use Aternos\Codex\Parser\PatternParser;
1011

1112
/**
1213
* Class CustomSkinLoaderLog
@@ -27,7 +28,7 @@ public static function getDefaultParser(): Parser
2728
return (new Parser())
2829
->setPattern(static::$pattern)
2930
->setTimeFormat('Y-m-d H:i:s')
30-
->setMatches([Parser::PREFIX, Parser::TIME, Parser::LEVEL]);
31+
->setMatches([Parser::PREFIX, PatternParser::TIME, PatternParser::LEVEL]);
3132
}
3233

3334
public static function getDefaultAnalyser(): AnalyserInterface

src/Log/Minecraft/MinecraftLog.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use Aternos\Codex\Minecraft\Parser\Parser;
1818
use Aternos\Codex\Minecraft\Translator\Translator;
1919
use Aternos\Codex\Parser\ParserInterface;
20+
use Aternos\Codex\Parser\PatternParser;
2021

2122
/**
2223
* Class MinecraftLog
@@ -45,7 +46,7 @@ public static function getDefaultParser(): ParserInterface
4546
{
4647
return (new Parser())
4748
->setPattern(static::$pattern)
48-
->setMatches([Parser::PREFIX, Parser::LEVEL]);
49+
->setMatches([Parser::PREFIX, PatternParser::LEVEL]);
4950
}
5051

5152
/**

src/Log/Minecraft/Pocketmine/PocketmineLog.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Aternos\Codex\Minecraft\Log\Minecraft\MinecraftLog;
1010
use Aternos\Codex\Minecraft\Parser\Parser;
1111
use Aternos\Codex\Parser\ParserInterface;
12+
use Aternos\Codex\Parser\PatternParser;
1213

1314
/**
1415
* Class PocketmineLog
@@ -28,7 +29,7 @@ public static function getDefaultParser(): ParserInterface
2829
return (new Parser())
2930
->setPattern(static::$pattern)
3031
->setTimeFormat('Y-m-d [H:i:s')
31-
->setMatches([Parser::PREFIX, Parser::TIME, Parser::LEVEL]);
32+
->setMatches([Parser::PREFIX, PatternParser::TIME, PatternParser::LEVEL]);
3233
}
3334

3435
/**

src/Log/Minecraft/Vanilla/Bukkit/Glowstone/GlowstoneLog.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Aternos\Codex\Minecraft\Log\Minecraft\Vanilla\Bukkit\BukkitLog;
66
use Aternos\Codex\Minecraft\Parser\Parser;
77
use Aternos\Codex\Parser\ParserInterface;
8+
use Aternos\Codex\Parser\PatternParser;
89

910
/**
1011
* Class GlowstoneLog
@@ -23,7 +24,7 @@ public static function getDefaultParser(): ParserInterface
2324
return (new Parser())
2425
->setPattern(static::$pattern)
2526
->setTimeFormat('Y/m/d H:i:s')
26-
->setMatches([Parser::PREFIX, Parser::TIME, Parser::LEVEL]);
27+
->setMatches([Parser::PREFIX, PatternParser::TIME, PatternParser::LEVEL]);
2728
}
2829

2930
/**

src/Log/Minecraft/Vanilla/Forge/ForgeLog.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
use Aternos\Codex\Minecraft\Analyser\ForgeAnalyser;
99
use Aternos\Codex\Minecraft\Log\Minecraft\Vanilla\VanillaLog;
1010
use Aternos\Codex\Minecraft\Parser\ForgeParser;
11+
use Aternos\Codex\Minecraft\Parser\Parser;
1112
use Aternos\Codex\Parser\ParserInterface;
13+
use Aternos\Codex\Parser\PatternParser;
1214

1315
/**
1416
* Class ForgeLog
@@ -44,7 +46,7 @@ public static function getDefaultParser(): ParserInterface
4446
{
4547
return (new ForgeParser())
4648
->setPattern(static::$pattern)
47-
->setMatches([ForgeParser::PREFIX, ForgeParser::LEVEL, ForgeParser::CHANNEL]);
49+
->setMatches([Parser::PREFIX, PatternParser::LEVEL, ForgeParser::CHANNEL]);
4850
}
4951

5052
/**

src/Log/Minecraft/Vanilla/NeoForge/NeoForgeLog.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
use Aternos\Codex\Minecraft\Analyser\NeoForgeAnalyser;
99
use Aternos\Codex\Minecraft\Log\Minecraft\Vanilla\VanillaLog;
1010
use Aternos\Codex\Minecraft\Parser\ForgeParser;
11+
use Aternos\Codex\Minecraft\Parser\Parser;
1112
use Aternos\Codex\Parser\ParserInterface;
13+
use Aternos\Codex\Parser\PatternParser;
1214

1315
abstract class NeoForgeLog extends VanillaLog
1416
{
@@ -40,7 +42,7 @@ public static function getDefaultParser(): ParserInterface
4042
{
4143
return (new ForgeParser())
4244
->setPattern(static::$pattern)
43-
->setMatches([ForgeParser::PREFIX, ForgeParser::LEVEL, ForgeParser::CHANNEL]);
45+
->setMatches([Parser::PREFIX, PatternParser::LEVEL, ForgeParser::CHANNEL]);
4446
}
4547

4648
/**

src/Log/Minecraft/Vanilla/OldVanillaLog.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Aternos\Codex\Minecraft\Parser\Parser;
66
use Aternos\Codex\Parser\ParserInterface;
7+
use Aternos\Codex\Parser\PatternParser;
78

89
/**
910
* Class OldVanillaServerLog
@@ -23,6 +24,6 @@ public static function getDefaultParser(): ParserInterface
2324
return (new Parser())
2425
->setPattern(static::$pattern)
2526
->setTimeFormat('Y-m-d H:i:s')
26-
->setMatches([Parser::PREFIX, Parser::TIME, Parser::LEVEL]);
27+
->setMatches([Parser::PREFIX, PatternParser::TIME, PatternParser::LEVEL]);
2728
}
2829
}

0 commit comments

Comments
 (0)