Merge branch 'master' into log_detail_page

This commit is contained in:
Jan Böhmer 2023-04-29 22:46:38 +02:00
commit 4c6ceab8e8
291 changed files with 1994 additions and 1621 deletions

View file

@ -101,12 +101,12 @@ class EventLogger
return true;
}
//If the normal log function does not added the log entry, we just do nothing
//If the normal log function does not get added to the log entry, we just do nothing
return false;
}
/**
* Adds the given log entry to the Log, if the entry fullfills the global configured criterias and flush afterwards.
* Adds the given log entry to the Log, if the entry fulfills the global configured criteria and flush afterward.
*
* @return bool returns true, if the event was added to log
*/
@ -129,12 +129,12 @@ class EventLogger
$blacklist = $blacklist ?? $this->blacklist;
$whitelist = $whitelist ?? $this->whitelist;
//Dont add the entry if it does not reach the minimum level
//Don't add the entry if it does not reach the minimum level
if ($logEntry->getLevel() > $minimum_log_level) {
return false;
}
//Check if the event type is black listed
//Check if the event type is blacklisted
if (!empty($blacklist) && $this->isObjectClassInArray($logEntry, $blacklist)) {
return false;
}
@ -144,7 +144,7 @@ class EventLogger
return false;
}
// By default all things should be added
// By default, all things should be added
return true;
}

View file

@ -91,7 +91,7 @@ class EventUndoHelper
}
/**
* Clear the currently the set undone event.
* Clear the currently set undone event.
*/
public function clearUndoneEvent(): void
{
@ -99,7 +99,7 @@ class EventUndoHelper
}
/**
* Check if a event is undone.
* Check if an event is undone.
*/
public function isUndo(): bool
{

View file

@ -58,7 +58,7 @@ class LogEntryExtraFormatter
}
/**
* Return an user viewable representation of the extra data in a log entry, styled for console output.
* Return a user viewable representation of the extra data in a log entry, styled for console output.
*/
public function formatConsole(AbstractLogEntry $logEntry): string
{
@ -81,7 +81,7 @@ class LogEntryExtraFormatter
}
/**
* Return a HTML formatted string containing a user viewable form of the Extra data.
* Return an HTML formatted string containing a user viewable form of the Extra data.
*/
public function format(AbstractLogEntry $context): string
{

View file

@ -35,10 +35,8 @@ use Brick\Math\BigDecimal;
use DateTime;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Mapping\ClassMetadata;
use Doctrine\ORM\Mapping\ClassMetadataInfo;
use Doctrine\ORM\Mapping\MappingException;
use DoctrineExtensions\Query\Mysql\Date;
use Exception;
use InvalidArgumentException;
use ReflectionClass;
@ -138,7 +136,7 @@ class TimeTravel
continue;
}
//Revert many to one association (one element in property)
//Revert many-to-one association (one element in property)
if (
ClassMetadataInfo::MANY_TO_ONE === $mapping['type']
|| ClassMetadataInfo::ONE_TO_ONE === $mapping['type']
@ -158,7 +156,7 @@ class TimeTravel
}
foreach ($target_elements as $target_element) {
if (null !== $target_element && $element->getLastModified() >= $timestamp) {
//Remove the element from collection, if it did not existed at $timestamp
//Remove the element from collection, if it did not exist at $timestamp
if (!$this->repo->getElementExistedAtTimestamp(
$target_element,
$timestamp