Passed
Push — master ( 9c47c9...297c37 )
by Damien
04:39
created
src/Provider/Doctrine/DoctrineProvider.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
         $this->configuration = $configuration;
33 33
         $this->transactionManager = new TransactionManager($this);
34 34
 
35
-        \assert($this->configuration instanceof Configuration);    // helps PHPStan
35
+        \assert($this->configuration instanceof Configuration); // helps PHPStan
36 36
         $this->configuration->setProvider($this);
37 37
     }
38 38
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     {
41 41
         parent::registerAuditingService($service);
42 42
 
43
-        \assert($service instanceof AuditingService);    // helps PHPStan
43
+        \assert($service instanceof AuditingService); // helps PHPStan
44 44
         $entityManager = $service->getEntityManager();
45 45
         $evm = $entityManager->getEventManager();
46 46
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     public function getAuditingServiceForEntity(string $entity): AuditingServiceInterface
60 60
     {
61 61
         foreach ($this->auditingServices as $name => $service) {
62
-            \assert($service instanceof AuditingService);   // helps PHPStan
62
+            \assert($service instanceof AuditingService); // helps PHPStan
63 63
 
64 64
             try {
65 65
                 // entity is managed by the entity manager of this service
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     {
78 78
         $this->checkStorageMapper();
79 79
 
80
-        \assert($this->configuration instanceof Configuration);   // helps PHPStan
80
+        \assert($this->configuration instanceof Configuration); // helps PHPStan
81 81
         $storageMapper = $this->configuration->getStorageMapper();
82 82
 
83 83
         if (null === $storageMapper || 1 === \count($this->getStorageServices())) {
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
     {
137 137
         $class = DoctrineHelper::getRealClassName($entity);
138 138
         // is $entity part of audited entities?
139
-        \assert($this->configuration instanceof Configuration);   // helps PHPStan
139
+        \assert($this->configuration instanceof Configuration); // helps PHPStan
140 140
         if (!\array_key_exists($class, $this->configuration->getEntities())) {
141 141
             // no => $entity is not audited
142 142
             return false;
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
     public function isAuditedField($entity, string $field): bool
189 189
     {
190 190
         // is $field is part of globally ignored columns?
191
-        \assert($this->configuration instanceof Configuration);   // helps PHPStan
191
+        \assert($this->configuration instanceof Configuration); // helps PHPStan
192 192
         if (\in_array($field, $this->configuration->getIgnoredColumns(), true)) {
193 193
             // yes => $field is not audited
194 194
             return false;
@@ -230,13 +230,13 @@  discard block
 block discarded – undo
230 230
 
231 231
     public function setStorageMapper(callable $storageMapper): void
232 232
     {
233
-        \assert($this->configuration instanceof Configuration);   // helps PHPStan
233
+        \assert($this->configuration instanceof Configuration); // helps PHPStan
234 234
         $this->configuration->setStorageMapper($storageMapper);
235 235
     }
236 236
 
237 237
     public function loadAnnotations(EntityManagerInterface $entityManager, ?array $entities = null): self
238 238
     {
239
-        \assert($this->configuration instanceof Configuration);   // helps PHPStan
239
+        \assert($this->configuration instanceof Configuration); // helps PHPStan
240 240
         $annotationLoader = new AnnotationLoader($entityManager);
241 241
         $this->configuration->setEntities(array_merge(
242 242
             null === $entities ? $this->configuration->getEntities() : $entities,
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 
249 249
     private function checkStorageMapper(): self
250 250
     {
251
-        \assert($this->configuration instanceof Configuration);   // helps PHPStan
251
+        \assert($this->configuration instanceof Configuration); // helps PHPStan
252 252
         if (null === $this->configuration->getStorageMapper() && $this->isStorageMapperRequired()) {
253 253
             throw new ProviderException('You must provide a mapper function to map audits to storage.');
254 254
         }
Please login to merge, or discard this patch.