Fixed typos

This commit is contained in:
Jan Böhmer 2023-04-15 23:14:53 +02:00
parent 63df16a369
commit d04d743520
144 changed files with 263 additions and 265 deletions

View file

@ -47,12 +47,12 @@ use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
use Symfony\Component\Serializer\SerializerInterface;
/**
* This event subscriber write to event log when entities are changed, removed, created.
* This event subscriber writes to the event log when entities are changed, removed, created.
*/
class EventLoggerSubscriber implements EventSubscriber
{
/**
* @var array The given fields will not be saved, because they contain sensitive informations
* @var array The given fields will not be saved, because they contain sensitive information
*/
protected const FIELD_BLACKLIST = [
User::class => ['password', 'need_pw_change', 'googleAuthenticatorSecret', 'backupCodes', 'trustedDeviceCookieVersion', 'pw_reset_token', 'backupCodesGenerationDate'],
@ -128,7 +128,7 @@ class EventLoggerSubscriber implements EventSubscriber
public function postPersist(LifecycleEventArgs $args): void
{
//Create an log entry, we have to do this post persist, cause we have to know the ID
//Create a log entry, we have to do this post persist, because we have to know the ID
/** @var AbstractDBElement $entity */
$entity = $args->getObject();
@ -158,7 +158,7 @@ class EventLoggerSubscriber implements EventSubscriber
{
$em = $args->getObjectManager();
$uow = $em->getUnitOfWork();
// If the we have added any ElementCreatedLogEntries added in postPersist, we flush them here.
// If we have added any ElementCreatedLogEntries added in postPersist, we flush them here.
$uow->computeChangeSets();
if ($uow->hasPendingInsertions() || !empty($uow->getScheduledEntityUpdates())) {
$em->flush();
@ -196,7 +196,7 @@ class EventLoggerSubscriber implements EventSubscriber
}
}
//By default allow every field.
//By default, allow every field.
return true;
}

View file

@ -49,7 +49,7 @@ use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
/**
* Write to event log when a user tries to access an forbidden page and recevies an 403 Access Denied message.
* Write to event log when a user tries to access a forbidden page and receives an 403 Access Denied message.
*/
class LogAccessDeniedSubscriber implements EventSubscriberInterface
{

View file

@ -49,7 +49,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\RequestStack;
/**
* This subscriber writes entries to log if an security related event happens (e.g. the user changes its password).
* This subscriber writes entries to log if a security related event happens (e.g. the user changes its password).
*/
final class SecurityEventLoggerSubscriber implements EventSubscriberInterface
{
@ -133,7 +133,7 @@ final class SecurityEventLoggerSubscriber implements EventSubscriberInterface
$ip = $request->getClientIp() ?? 'unknown';
} else {
$ip = 'Console';
//Dont try to apply IP filter rules to non numeric string
//Don't try to apply IP filter rules to non-numeric string
$anonymize = false;
}