Add AdminGrantedAccessInformation insight
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace IndifferentKetchup\Codex\Analysis\ProjectZomboid;
|
||||
|
||||
use IndifferentKetchup\Codex\Analysis\Information;
|
||||
use IndifferentKetchup\Codex\Analysis\PatternInsightInterface;
|
||||
use IndifferentKetchup\Codex\Pattern\ProjectZomboid\AdminPattern;
|
||||
|
||||
class AdminGrantedAccessInformation extends Information implements PatternInsightInterface
|
||||
{
|
||||
public static function getPatterns(): array
|
||||
{
|
||||
return [AdminPattern::GRANTED_ACCESS_ENTRY];
|
||||
}
|
||||
|
||||
public function setMatches(array $matches, mixed $patternKey): void
|
||||
{
|
||||
$this->setLabel('Admin granted access');
|
||||
$this->setValue(sprintf(
|
||||
'%s granted %s to %s',
|
||||
$matches['admin'],
|
||||
$matches['level'],
|
||||
$matches['target']
|
||||
));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user