Fixed some inspection issues.

This commit is contained in:
Jan Böhmer 2022-08-14 19:32:53 +02:00
parent eef26f7ae6
commit 639829f5c5
97 changed files with 305 additions and 185 deletions

View file

@ -27,6 +27,7 @@ use App\Entity\Base\AbstractDBElement;
use App\Entity\UserSystem\User;
use App\Events\SecurityEvents;
use Doctrine\ORM\Mapping as ORM;
use InvalidArgumentException;
use Symfony\Component\HttpFoundation\IpUtils;
/**
@ -60,7 +61,7 @@ class SecurityEventLogEntry extends AbstractLogEntry
public function setTargetElement(?AbstractDBElement $element): AbstractLogEntry
{
if (!$element instanceof User) {
throw new \InvalidArgumentException('Target element must be a User object!');
throw new InvalidArgumentException('Target element must be a User object!');
}
return parent::setTargetElement($element);
@ -75,7 +76,7 @@ class SecurityEventLogEntry extends AbstractLogEntry
{
$key = array_search($type, static::SECURITY_TYPE_MAPPING, true);
if (false === $key) {
throw new \InvalidArgumentException('Given event type is not existing!');
throw new InvalidArgumentException('Given event type is not existing!');
}
$this->extra['e'] = $key;