@@ -60,7 +60,7 @@ |
||
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | $storageService = $this->provider->getStorageServiceForEntity($metadata->name); |
| 63 | - \assert($storageService instanceof StorageService); // helps PHPStan |
|
| 63 | + \assert($storageService instanceof StorageService); // helps PHPStan |
|
| 64 | 64 | $connection = $storageService->getEntityManager()->getConnection(); |
| 65 | 65 | $storageSchemaManager = $connection->getSchemaManager(); |
| 66 | 66 | $fromSchema = $storageSchemaManager->createSchema(); |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | { |
| 38 | 38 | parent::registerAuditingService($service); |
| 39 | 39 | |
| 40 | - \assert($service instanceof AuditingService); // helps PHPStan |
|
| 40 | + \assert($service instanceof AuditingService); // helps PHPStan |
|
| 41 | 41 | $entityManager = $service->getEntityManager(); |
| 42 | 42 | $evm = $entityManager->getEventManager(); |
| 43 | 43 | |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | public function getAuditingServiceForEntity(string $entity): AuditingServiceInterface |
| 59 | 59 | { |
| 60 | 60 | foreach ($this->auditingServices as $name => $service) { |
| 61 | - \assert($service instanceof AuditingService); // helps PHPStan |
|
| 61 | + \assert($service instanceof AuditingService); // helps PHPStan |
|
| 62 | 62 | |
| 63 | 63 | try { |
| 64 | 64 | // entity is managed by the entity manager of this service |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | { |
| 77 | 77 | $this->checkStorageMapper(); |
| 78 | 78 | |
| 79 | - \assert($this->configuration instanceof Configuration); // helps PHPStan |
|
| 79 | + \assert($this->configuration instanceof Configuration); // helps PHPStan |
|
| 80 | 80 | $storageMapper = $this->configuration->getStorageMapper(); |
| 81 | 81 | |
| 82 | 82 | if (null === $storageMapper || 1 === \count($this->getStorageServices())) { |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | { |
| 136 | 136 | $class = DoctrineHelper::getRealClassName($entity); |
| 137 | 137 | // is $entity part of audited entities? |
| 138 | - \assert($this->configuration instanceof Configuration); // helps PHPStan |
|
| 138 | + \assert($this->configuration instanceof Configuration); // helps PHPStan |
|
| 139 | 139 | if (!\array_key_exists($class, $this->configuration->getEntities())) { |
| 140 | 140 | // no => $entity is not audited |
| 141 | 141 | return false; |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | public function isAuditedField($entity, string $field): bool |
| 188 | 188 | { |
| 189 | 189 | // is $field is part of globally ignored columns? |
| 190 | - \assert($this->configuration instanceof Configuration); // helps PHPStan |
|
| 190 | + \assert($this->configuration instanceof Configuration); // helps PHPStan |
|
| 191 | 191 | if (\in_array($field, $this->configuration->getIgnoredColumns(), true)) { |
| 192 | 192 | // yes => $field is not audited |
| 193 | 193 | return false; |
@@ -229,13 +229,13 @@ discard block |
||
| 229 | 229 | |
| 230 | 230 | public function setStorageMapper(callable $storageMapper): void |
| 231 | 231 | { |
| 232 | - \assert($this->configuration instanceof Configuration); // helps PHPStan |
|
| 232 | + \assert($this->configuration instanceof Configuration); // helps PHPStan |
|
| 233 | 233 | $this->configuration->setStorageMapper($storageMapper); |
| 234 | 234 | } |
| 235 | 235 | |
| 236 | 236 | private function loadAnnotations(EntityManagerInterface $entityManager): self |
| 237 | 237 | { |
| 238 | - \assert($this->configuration instanceof Configuration); // helps PHPStan |
|
| 238 | + \assert($this->configuration instanceof Configuration); // helps PHPStan |
|
| 239 | 239 | $annotationLoader = new AnnotationLoader($entityManager); |
| 240 | 240 | $this->configuration->setEntities(array_merge( |
| 241 | 241 | $this->configuration->getEntities(), |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | |
| 248 | 248 | private function checkStorageMapper(): self |
| 249 | 249 | { |
| 250 | - \assert($this->configuration instanceof Configuration); // helps PHPStan |
|
| 250 | + \assert($this->configuration instanceof Configuration); // helps PHPStan |
|
| 251 | 251 | if (null === $this->configuration->getStorageMapper() && $this->isStorageMapperRequired()) { |
| 252 | 252 | throw new ProviderException('You must provide a mapper function to map audits to storage.'); |
| 253 | 253 | } |