Passed
Pull Request — master (#25)
by Florian
12:55 queued 04:06
created
src/Provider/Doctrine/Persistence/Reader/Reader.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,10 +91,10 @@
 block discarded – undo
91 91
             ->setAllowedTypes('page', ['null', 'int'])
92 92
             ->setAllowedTypes('page_size', ['null', 'int'])
93 93
             ->setAllowedTypes('strict', ['null', 'bool'])
94
-            ->setAllowedValues('page', static function ($value) {
94
+            ->setAllowedValues('page', static function($value) {
95 95
                 return null === $value || $value >= 1;
96 96
             })
97
-            ->setAllowedValues('page_size', static function ($value) {
97
+            ->setAllowedValues('page_size', static function($value) {
98 98
                 return null === $value || $value >= 1;
99 99
             })
100 100
         ;
Please login to merge, or discard this patch.
src/Provider/Doctrine/Persistence/Command/UpdateSchemaCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
             $progressBar = new ProgressBar($output, \count($sqls));
99 99
             $progressBar->start();
100 100
 
101
-            $updateManager->updateAuditSchema($sqls, static function (array $progress) use ($progressBar): void {
101
+            $updateManager->updateAuditSchema($sqls, static function(array $progress) use ($progressBar): void {
102 102
                 $progressBar->advance();
103 103
             });
104 104
 
Please login to merge, or discard this patch.
src/Provider/Doctrine/Persistence/Schema/SchemaManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
                 $repository[$key][$entity] = $tableName;
94 94
             }
95 95
         }
96
-        $findEntityByTablename = static function (string $tableName) use ($repository): ?string {
96
+        $findEntityByTablename = static function(string $tableName) use ($repository): ?string {
97 97
             foreach ($repository as $emName => $map) {
98 98
                 $result = array_search($tableName, $map, true);
99 99
                 if (false !== $result) {
Please login to merge, or discard this patch.
src/Provider/Doctrine/Auditing/Event/DoctrineSubscriber.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 
42 42
         // extend the SQL logger
43 43
         $this->loggerBackup = $entityManager->getConnection()->getConfiguration()->getSQLLogger();
44
-        $auditLogger = new Logger(function () use ($entityManager, $transaction): void {
44
+        $auditLogger = new Logger(function() use ($entityManager, $transaction): void {
45 45
             // flushes pending data
46 46
             $entityManager->getConnection()->getConfiguration()->setSQLLogger($this->loggerBackup);
47 47
             $this->transactionManager->process($transaction);
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
@@ -18,27 +18,27 @@
 block discarded – undo
18 18
     /**
19 19
      * @var array
20 20
      */
21
-    private $inserted = [];     // [$source, $changeset]
21
+    private $inserted = []; // [$source, $changeset]
22 22
 
23 23
     /**
24 24
      * @var array
25 25
      */
26
-    private $updated = [];      // [$source, $changeset]
26
+    private $updated = []; // [$source, $changeset]
27 27
 
28 28
     /**
29 29
      * @var array
30 30
      */
31
-    private $removed = [];      // [$source, $id]
31
+    private $removed = []; // [$source, $id]
32 32
 
33 33
     /**
34 34
      * @var array
35 35
      */
36
-    private $associated = [];   // [$source, $target, $mapping]
36
+    private $associated = []; // [$source, $target, $mapping]
37 37
 
38 38
     /**
39 39
      * @var array
40 40
      */
41
-    private $dissociated = [];  // [$source, $target, $id, $mapping]
41
+    private $dissociated = []; // [$source, $target, $id, $mapping]
42 42
 
43 43
     /**
44 44
      * Returns transaction hash.
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
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
     {
24 24
         return [
25 25
             LifecycleEvent::class => [
26
-                ['onAuditEvent', -1000000],  // should be fired last
26
+                ['onAuditEvent', -1000000], // should be fired last
27 27
             ],
28 28
         ];
29 29
     }
Please login to merge, or discard this patch.
src/Provider/Doctrine/DoctrineProvider.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Provider/Doctrine/Persistence/Event/CreateSchemaListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
         }
64 64
 
65 65
         $storageService = $this->provider->getStorageServiceForEntity($metadata->name);
66
-        \assert($storageService instanceof StorageService);     // helps PHPStan
66
+        \assert($storageService instanceof StorageService); // helps PHPStan
67 67
 
68 68
         // execute schema updates directly if entity manager has no metadata.
69 69
         // doctrine:schema:update will exit early, as no mapping is configured.
Please login to merge, or discard this patch.