Add AdminAddedXpInformation insight
This commit is contained in:
27
src/Analysis/ProjectZomboid/AdminAddedXpInformation.php
Normal file
27
src/Analysis/ProjectZomboid/AdminAddedXpInformation.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace IndifferentKetchup\Codex\Analysis\ProjectZomboid;
|
||||
|
||||
use IndifferentKetchup\Codex\Analysis\Information;
|
||||
use IndifferentKetchup\Codex\Analysis\PatternInsightInterface;
|
||||
use IndifferentKetchup\Codex\Pattern\ProjectZomboid\AdminPattern;
|
||||
|
||||
class AdminAddedXpInformation extends Information implements PatternInsightInterface
|
||||
{
|
||||
public static function getPatterns(): array
|
||||
{
|
||||
return [AdminPattern::ADDED_XP_ENTRY];
|
||||
}
|
||||
|
||||
public function setMatches(array $matches, mixed $patternKey): void
|
||||
{
|
||||
$this->setLabel('Admin added xp');
|
||||
$this->setValue(sprintf(
|
||||
'%s added %s %s xp to %s',
|
||||
$matches['admin'],
|
||||
$matches['amount'],
|
||||
$matches['skill'],
|
||||
$matches['target']
|
||||
));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user