Passed
Push — feature-FRAM-47-bench ( 315ed6...b19748 )
by Vincent
12:14 queued 06:32
created
src/Sharding/ShardingQuery.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         $count = 0;
114 114
 
115 115
         foreach ($this->execute() as $result) {
116
-            $count += (int)$result['aggregate'];
116
+            $count += (int) $result['aggregate'];
117 117
         }
118 118
 
119 119
         $this->compilerState->invalidate(['columns', 'orders']);
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
     #[ReadOperation]
129 129
     public function count(?string $column = null): int
130 130
     {
131
-        return (int)array_sum($this->aggregate(__FUNCTION__, $column));
131
+        return (int) array_sum($this->aggregate(__FUNCTION__, $column));
132 132
     }
133 133
 
134 134
     /**
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
     {
140 140
         $numbers = $this->aggregate(__FUNCTION__, $column);
141 141
 
142
-        return array_sum($numbers)/count($numbers);
142
+        return array_sum($numbers) / count($numbers);
143 143
     }
144 144
 
145 145
     /**
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
     #[ReadOperation]
167 167
     public function sum(?string $column = null): float
168 168
     {
169
-        return (float)array_sum($this->aggregate(__FUNCTION__, $column));
169
+        return (float) array_sum($this->aggregate(__FUNCTION__, $column));
170 170
     }
171 171
 
172 172
     /**
Please login to merge, or discard this patch.
src/Test/TestPack.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      * @var array{persistent:object[], non-persistent: object[]}
33 33
      */
34 34
     protected $testPacks = [
35
-        'persistent'        => [],  // Entités créées non modifiables
35
+        'persistent'        => [], // Entités créées non modifiables
36 36
         'non-persistent'    => []   // Entités créées et détruites aprés un test
37 37
     ];
38 38
 
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 
161 161
         // On ajoute la classe de l'entité uniquement si elle n'est pas déjà dans le tableau et si le test pack n'a pas démarré de savepoint
162 162
         foreach ($entityClasses as $entityClassName) {
163
-            if (! in_array($entityClassName, $this->entityClasses)) {
163
+            if (!in_array($entityClassName, $this->entityClasses)) {
164 164
                 if ($this->initialized) {
165 165
                     $this->create([$entityClassName]);
166 166
                 } else {
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
      */
221 221
     public function onInit(callable $callback)
222 222
     {
223
-        if (! $this->initialized) {
223
+        if (!$this->initialized) {
224 224
             $this->once('testpack.initialized', $callback);
225 225
         }
226 226
 
Please login to merge, or discard this patch.
src/Mapper/Metadata.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -890,7 +890,7 @@  discard block
 block discarded – undo
890 890
             $attributePath = $attribute;
891 891
             $path          = null;
892 892
         } else {
893
-            $attributePath = $embeddedMeta['path'] . '.' . $attribute;
893
+            $attributePath = $embeddedMeta['path'].'.'.$attribute;
894 894
             $path          = $embeddedMeta['path'];
895 895
         }
896 896
 
@@ -944,7 +944,7 @@  discard block
 block discarded – undo
944 944
         
945 945
         $this->sequence = [
946 946
             'connection' => $sequence['connection'] ?? $this->connection,
947
-            'table'      => $sequence['table'] ?? $this->table . '_seq',
947
+            'table'      => $sequence['table'] ?? $this->table.'_seq',
948 948
             'column'     => $sequence['column'] ?? 'id',
949 949
             'options'    => $sequence['tableOptions'] ?? [],
950 950
         ];
Please login to merge, or discard this patch.
src/Connection/ConnectionRegistry.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@
 block discarded – undo
114 114
     private function getConnectionParameters(string $connectionName): array
115 115
     {
116 116
         if (!isset($this->parametersMap[$connectionName])) {
117
-            throw new DBALException('Connection name "' . $connectionName . '" is not set');
117
+            throw new DBALException('Connection name "'.$connectionName.'" is not set');
118 118
         }
119 119
 
120 120
         $parameters = $this->parametersMap[$connectionName];
Please login to merge, or discard this patch.
src/Test/RepositoryAssertion.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -194,25 +194,25 @@
 block discarded – undo
194 194
                 $value = $repository->extractOne($entity, $attribute);
195 195
 
196 196
                 if ($isUninitialized) {
197
-                    $this->fail($message . ': Expected attribute "'.$path.'" to be not initialised');
197
+                    $this->fail($message.': Expected attribute "'.$path.'" to be not initialised');
198 198
                 }
199 199
             } catch (UninitializedPropertyException $e) {
200 200
                 if (!$isUninitialized) {
201
-                    $this->fail($message . ': The attribute "'.$path.'" is not initialised');
201
+                    $this->fail($message.': The attribute "'.$path.'" is not initialised');
202 202
                 }
203 203
             }
204 204
 
205 205
             if (!is_object($expectedValue)) {
206
-                $this->assertSame($expectedValue, $value, $message . ': Expected attribute "'.$path.'" is not the same');
206
+                $this->assertSame($expectedValue, $value, $message.': Expected attribute "'.$path.'" is not the same');
207 207
                 continue;
208 208
             }
209 209
 
210 210
             if ($expectedValue instanceof Constraint) {
211
-                $this->assertThat($value, $expectedValue, $message . ': Expected attribute "'.$path.'" is not the same');
211
+                $this->assertThat($value, $expectedValue, $message.': Expected attribute "'.$path.'" is not the same');
212 212
             } elseif ($expectedValue instanceof \DateTimeInterface) {
213
-                $this->assertEqualsWithDelta($expectedValue, $value, $dateTimeDelta, $message . ': Expected attribute "'.$path.'" is not the same');
213
+                $this->assertEqualsWithDelta($expectedValue, $value, $dateTimeDelta, $message.': Expected attribute "'.$path.'" is not the same');
214 214
             } else {
215
-                $this->assertEquals($expectedValue, $value, $message . ': Expected attribute "'.$path.'" is not the same');
215
+                $this->assertEquals($expectedValue, $value, $message.': Expected attribute "'.$path.'" is not the same');
216 216
             }
217 217
         }
218 218
     }
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -68,15 +68,15 @@
 block discarded – undo
68 68
     }
69 69
 
70 70
     /**
71
-    * Assert that two array of entities are equal
72
-    *
73
-    * @param array $expectedEntities
74
-    * @param array $actualEntities
75
-    * @param int   $dateTimeDelta
76
-    * @param string $message
71
+     * Assert that two array of entities are equal
72
+     *
73
+     * @param array $expectedEntities
74
+     * @param array $actualEntities
75
+     * @param int   $dateTimeDelta
76
+     * @param string $message
77 77
      *
78 78
      * @throws \Exception
79
-    */
79
+     */
80 80
     public function assertEntities($expectedEntities, $actualEntities, $dateTimeDelta = 5, $message = '')
81 81
     {
82 82
         if (is_string($dateTimeDelta)) {
Please login to merge, or discard this patch.
src/Entity/Hydrator/Exception/FieldNotDeclaredException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,6 +15,6 @@
 block discarded – undo
15 15
      */
16 16
     public function __construct(string $entity, string $field)
17 17
     {
18
-        parent::__construct('The field "' . $field . '" is not declared for the entity ' . $entity);
18
+        parent::__construct('The field "'.$field.'" is not declared for the entity '.$entity);
19 19
     }
20 20
 }
Please login to merge, or discard this patch.
src/Entity/Hydrator/Exception/HydratorGenerationException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
      */
25 25
     public function __construct(string $entityClass, string $message = '', ?Throwable $previous = null)
26 26
     {
27
-        parent::__construct($entityClass . ' : ' . $message, 0, $previous);
27
+        parent::__construct($entityClass.' : '.$message, 0, $previous);
28 28
 
29 29
         $this->entityClass = $entityClass;
30 30
     }
Please login to merge, or discard this patch.
src/Entity/Hydrator/Generator/ClassAccessor.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
             }
90 90
         }
91 91
 
92
-        throw new HydratorGenerationException($this->className, 'Cannot get the value of property "' . $attribute . '"');
92
+        throw new HydratorGenerationException($this->className, 'Cannot get the value of property "'.$attribute.'"');
93 93
     }
94 94
 
95 95
     /**
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
             return $varName.'->set'.ucfirst($attribute).'('.$value.')';
119 119
         }
120 120
 
121
-        throw new HydratorGenerationException($this->className, 'Cannot access to attribute "' . $attribute . '" on write');
121
+        throw new HydratorGenerationException($this->className, 'Cannot access to attribute "'.$attribute.'" on write');
122 122
     }
123 123
 
124 124
     /**
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
                 }
165 165
             }
166 166
         } catch (ReflectionException $e) {
167
-            throw new HydratorGenerationException($this->className, 'Cannot access to the property ' . $prop, $e);
167
+            throw new HydratorGenerationException($this->className, 'Cannot access to the property '.$prop, $e);
168 168
         }
169 169
 
170 170
         return true;
Please login to merge, or discard this patch.
src/Entity/Hydrator/Generator/AttributesResolver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -327,7 +327,7 @@
 block discarded – undo
327 327
                 return array_unique($classes);
328 328
 
329 329
             default:
330
-                throw new HydratorGenerationException($this->mapper->getEntityClass(), 'Cannot handle relation type ' . $relation['type']);
330
+                throw new HydratorGenerationException($this->mapper->getEntityClass(), 'Cannot handle relation type '.$relation['type']);
331 331
         }
332 332
     }
333 333
 }
Please login to merge, or discard this patch.