Passed
Push — master ( 62f214...87bb7b )
by Damien
02:13
created
rector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
 use Rector\Set\ValueObject\LevelSetList;
10 10
 use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
11 11
 
12
-return static function (ContainerConfigurator $containerConfigurator): void {
12
+return static function(ContainerConfigurator $containerConfigurator): void {
13 13
     $services = $containerConfigurator->services();
14 14
     $services->set(TypedPropertyRector::class);
15 15
 
Please login to merge, or discard this patch.
src/EventSubscriber/AuditEventSubscriber.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
     {
26 26
         return [
27 27
             LifecycleEvent::class => [
28
-                ['onAuditEvent', -1_000_000],  // should be fired last
28
+                ['onAuditEvent', -1_000_000], // should be fired last
29 29
             ],
30 30
         ];
31 31
     }
Please login to merge, or discard this patch.
src/Provider/Doctrine/DoctrineProvider.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
         return !(!\array_key_exists($class, $this->configuration->getEntities()))
151 151
             // no => $entity is not audited
152 152
 
153
-         ;
153
+            ;
154 154
     }
155 155
 
156 156
     /**
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
             && \in_array($field, $entityOptions['ignored_columns'], true))
222 222
             // yes => $field is not audited
223 223
 
224
-         ;
224
+            ;
225 225
     }
226 226
 
227 227
     public function supportsStorage(): bool
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         $this->configuration = $configuration;
35 35
         $this->transactionManager = new TransactionManager($this);
36 36
 
37
-        \assert($this->configuration instanceof Configuration);    // helps PHPStan
37
+        \assert($this->configuration instanceof Configuration); // helps PHPStan
38 38
         $this->configuration->setProvider($this);
39 39
     }
40 40
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     {
43 43
         parent::registerAuditingService($service);
44 44
 
45
-        \assert($service instanceof AuditingService);    // helps PHPStan
45
+        \assert($service instanceof AuditingService); // helps PHPStan
46 46
         $entityManager = $service->getEntityManager();
47 47
         $evm = $entityManager->getEventManager();
48 48
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     public function getAuditingServiceForEntity(string $entity): AuditingServiceInterface
62 62
     {
63 63
         foreach ($this->auditingServices as $name => $service) {
64
-            \assert($service instanceof AuditingService);   // helps PHPStan
64
+            \assert($service instanceof AuditingService); // helps PHPStan
65 65
 
66 66
             try {
67 67
                 // entity is managed by the entity manager of this service
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     {
80 80
         $this->checkStorageMapper();
81 81
 
82
-        \assert($this->configuration instanceof Configuration);   // helps PHPStan
82
+        \assert($this->configuration instanceof Configuration); // helps PHPStan
83 83
         $storageMapper = $this->configuration->getStorageMapper();
84 84
 
85 85
         if (null === $storageMapper || 1 === \count($this->getStorageServices())) {
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
             return array_values($this->getStorageServices())[0];
88 88
         }
89 89
 
90
-        \assert(\is_callable($storageMapper));   // helps PHPStan
90
+        \assert(\is_callable($storageMapper)); // helps PHPStan
91 91
 
92 92
         return $storageMapper($entity, $this->getStorageServices());
93 93
     }
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
     {
146 146
         $class = DoctrineHelper::getRealClassName($entity);
147 147
         // is $entity part of audited entities?
148
-        \assert($this->configuration instanceof Configuration);   // helps PHPStan
148
+        \assert($this->configuration instanceof Configuration); // helps PHPStan
149 149
 
150 150
         return !(!\array_key_exists($class, $this->configuration->getEntities()))
151 151
             // no => $entity is not audited
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
     public function isAuditedField($entity, string $field): bool
197 197
     {
198 198
         // is $field is part of globally ignored columns?
199
-        \assert($this->configuration instanceof Configuration);   // helps PHPStan
199
+        \assert($this->configuration instanceof Configuration); // helps PHPStan
200 200
         if (\in_array($field, $this->configuration->getIgnoredColumns(), true)) {
201 201
             // yes => $field is not audited
202 202
             return false;
@@ -236,13 +236,13 @@  discard block
 block discarded – undo
236 236
 
237 237
     public function setStorageMapper(callable $storageMapper): void
238 238
     {
239
-        \assert($this->configuration instanceof Configuration);   // helps PHPStan
239
+        \assert($this->configuration instanceof Configuration); // helps PHPStan
240 240
         $this->configuration->setStorageMapper($storageMapper);
241 241
     }
242 242
 
243 243
     public function loadAnnotations(EntityManagerInterface $entityManager, ?array $entities = null): self
244 244
     {
245
-        \assert($this->configuration instanceof Configuration);   // helps PHPStan
245
+        \assert($this->configuration instanceof Configuration); // helps PHPStan
246 246
         $annotationLoader = new AnnotationLoader($entityManager);
247 247
         $this->configuration->setEntities(array_merge(
248 248
             $entities ?? $this->configuration->getEntities(),
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 
255 255
     private function checkStorageMapper(): self
256 256
     {
257
-        \assert($this->configuration instanceof Configuration);   // helps PHPStan
257
+        \assert($this->configuration instanceof Configuration); // helps PHPStan
258 258
         if (null === $this->configuration->getStorageMapper() && $this->isStorageMapperRequired()) {
259 259
             throw new ProviderException('You must provide a mapper function to map audits to storage.');
260 260
         }
Please login to merge, or discard this patch.
src/Provider/Doctrine/Auditing/Transaction/AuditTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
         switch ($type->getName()) {
76 76
             case DoctrineHelper::getDoctrineType('BIGINT'):
77
-                $convertedValue = (string) $value;  // @phpstan-ignore-line
77
+                $convertedValue = (string) $value; // @phpstan-ignore-line
78 78
 
79 79
                 break;
80 80
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
             case 'uuid':
97 97
             case 'ulid':
98 98
                 // Ramsey UUID / Symfony UID (UUID/ULID)
99
-                $convertedValue = (string) $value;  // @phpstan-ignore-line
99
+                $convertedValue = (string) $value; // @phpstan-ignore-line
100 100
 
101 101
                 break;
102 102
 
Please login to merge, or discard this patch.
src/Provider/Doctrine/Persistence/Helper/PlatformHelper.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         }
41 41
 
42 42
         return (bool) (!$mariadb && version_compare(self::getOracleMysqlVersionNumber($version), '5.7.7', '<'))
43
-         ;
43
+            ;
44 44
     }
45 45
 
46 46
     public static function getServerVersion(Connection $connection): ?string
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
             // @see https://mariadb.com/kb/en/json-data-type/
69 69
 
70 70
         // Assume JSON is supported
71
-         ;
71
+            ;
72 72
     }
73 73
 
74 74
     /**
Please login to merge, or discard this patch.
src/Model/Transaction.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -17,11 +17,11 @@
 block discarded – undo
17 17
 
18 18
     private ?string $transaction_hash = null;
19 19
 
20
-    private array $inserted = [];     // [$source, $changeset]
21
-    private array $updated = [];      // [$source, $changeset]
22
-    private array $removed = [];      // [$source, $id]
23
-    private array $associated = [];   // [$source, $target, $mapping]
24
-    private array $dissociated = [];  // [$source, $target, $id, $mapping]
20
+    private array $inserted = []; // [$source, $changeset]
21
+    private array $updated = []; // [$source, $changeset]
22
+    private array $removed = []; // [$source, $id]
23
+    private array $associated = []; // [$source, $target, $mapping]
24
+    private array $dissociated = []; // [$source, $target, $id, $mapping]
25 25
 
26 26
     /**
27 27
      * Returns transaction hash.
Please login to merge, or discard this patch.
src/Model/Entry.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@
 block discarded – undo
159 159
      */
160 160
     public function getDiffs(bool $includeMedadata = false): ?array
161 161
     {
162
-        $diffs = $this->sort(json_decode($this->diffs, true, 512, JSON_THROW_ON_ERROR));  // @phpstan-ignore-line
162
+        $diffs = $this->sort(json_decode($this->diffs, true, 512, JSON_THROW_ON_ERROR)); // @phpstan-ignore-line
163 163
         if (!$includeMedadata) {
164 164
             unset($diffs['@source']);
165 165
         }
Please login to merge, or discard this patch.