mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-10 10:24:31 +02:00
Fixed some inspection issues
This commit is contained in:
parent
a5cbe59a7c
commit
ba5ae35809
20 changed files with 35 additions and 36 deletions
|
@ -124,7 +124,7 @@ final class GlobalProviders implements PlaceholderProviderInterface
|
|||
}
|
||||
|
||||
if ('[[INSTANCE_URL]]' === $placeholder) {
|
||||
return $this->url_generator->generate('homepage', [], UrlGenerator::ABSOLUTE_URL);
|
||||
return $this->url_generator->generate('homepage', [], UrlGeneratorInterface::ABSOLUTE_URL);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
|
@ -36,6 +36,7 @@ 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;
|
||||
|
@ -139,16 +140,16 @@ class TimeTravel
|
|||
|
||||
//Revert many to one association (one element in property)
|
||||
if (
|
||||
ClassMetadata::MANY_TO_ONE === $mapping['type']
|
||||
|| ClassMetadata::ONE_TO_ONE === $mapping['type']
|
||||
ClassMetadataInfo::MANY_TO_ONE === $mapping['type']
|
||||
|| ClassMetadataInfo::ONE_TO_ONE === $mapping['type']
|
||||
) {
|
||||
$target_element = $this->getField($element, $field);
|
||||
if (null !== $target_element && $element->getLastModified() > $timestamp) {
|
||||
$this->revertEntityToTimestamp($target_element, $timestamp, $reverted_elements);
|
||||
}
|
||||
} elseif ( //Revert *_TO_MANY associations (collection properties)
|
||||
(ClassMetadata::MANY_TO_MANY === $mapping['type']
|
||||
|| ClassMetadata::ONE_TO_MANY === $mapping['type'])
|
||||
(ClassMetadataInfo::MANY_TO_MANY === $mapping['type']
|
||||
|| ClassMetadataInfo::ONE_TO_MANY === $mapping['type'])
|
||||
&& false === $mapping['isOwningSide']
|
||||
) {
|
||||
$target_elements = $this->getField($element, $field);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue