Passed
Pull Request — master (#288)
by
unknown
03:48
created
src/QueryFactory/AbstractQueryFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -207,7 +207,7 @@
 block discarded – undo
207 207
         if (strlen($alias) <= 30) { // Older oracle version had a limit of 30 characters for identifiers
208 208
             return $alias;
209 209
         }
210
-        return substr($columnName, 0, 20) . crc32($tableName.'____'.$columnName);
210
+        return substr($columnName, 0, 20).crc32($tableName.'____'.$columnName);
211 211
     }
212 212
 
213 213
     abstract protected function compute(): void;
Please login to merge, or discard this patch.
src/ResultIterator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
      */
85 85
     public static function createResultIterator(QueryFactory $queryFactory, array $parameters, ObjectStorageInterface $objectStorage, ?string $className, TDBMService $tdbmService, MagicQuery $magicQuery, int $mode, LoggerInterface $logger): self
86 86
     {
87
-        $iterator =  new static();
87
+        $iterator = new static();
88 88
         if ($mode !== TDBMService::MODE_CURSOR && $mode !== TDBMService::MODE_ARRAY) {
89 89
             throw new TDBMException("Unknown fetch mode: '".$mode."'");
90 90
         }
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
      */
282 282
     public function jsonSerialize($stopRecursion = false)
283 283
     {
284
-        return array_map(function (AbstractTDBMObject $item) use ($stopRecursion) {
284
+        return array_map(function(AbstractTDBMObject $item) use ($stopRecursion) {
285 285
             return $item->jsonSerialize($stopRecursion);
286 286
         }, $this->toArray());
287 287
     }
Please login to merge, or discard this patch.
src/TDBMSchemaAnalyzer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@
 block discarded – undo
142 142
     public function getIncomingForeignKeys(string $tableName): array
143 143
     {
144 144
         $junctionTables = $this->schemaAnalyzer->detectJunctionTables(true);
145
-        $junctionTableNames = array_map(function (Table $table) {
145
+        $junctionTableNames = array_map(function(Table $table) {
146 146
             return $table->getName();
147 147
         }, $junctionTables);
148 148
         $childrenRelationships = $this->schemaAnalyzer->getChildrenRelationships($tableName);
Please login to merge, or discard this patch.
src/Commands/GenerateCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
 
50 50
         $fromLock = (bool) $input->getOption('from-lock');
51 51
 
52
-        $loggers = [ new ConsoleLogger($output) ];
52
+        $loggers = [new ConsoleLogger($output)];
53 53
 
54 54
         $logger = $alteredConf->getLogger();
55 55
         if ($logger) {
Please login to merge, or discard this patch.
src/Utils/StringUtils.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 {
9 9
     public static function getValidVariableName(string $variableName): string
10 10
     {
11
-        $valid = preg_replace_callback('/^(\d+)/', static function (array $match) {
11
+        $valid = preg_replace_callback('/^(\d+)/', static function(array $match) {
12 12
             $f = new \NumberFormatter('en', \NumberFormatter::SPELLOUT);
13 13
             $number = $f->format((int) $match[0]);
14 14
             return preg_replace('/[^a-z]+/i', '_', $number);
Please login to merge, or discard this patch.
src/PageIterator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -262,7 +262,7 @@
 block discarded – undo
262 262
      */
263 263
     public function jsonSerialize()
264 264
     {
265
-        return array_map(function (AbstractTDBMObject $item) {
265
+        return array_map(function(AbstractTDBMObject $item) {
266 266
             return $item->jsonSerialize();
267 267
         }, $this->toArray());
268 268
     }
Please login to merge, or discard this patch.
src/Utils/AbstractBeanPropertyDescriptor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      */
68 68
     public function getParamAnnotation(): ParamTag
69 69
     {
70
-        return new ParamTag($this->getSafeVariableName(), [ $this->getPhpType() ]);
70
+        return new ParamTag($this->getSafeVariableName(), [$this->getPhpType()]);
71 71
     }
72 72
 
73 73
     public function getVariableName(): string
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
     public function getSafeVariableName(): string
79 79
     {
80
-        return '$' . StringUtils::getValidVariableName(ltrim($this->getVariableName(), '$'));
80
+        return '$'.StringUtils::getValidVariableName(ltrim($this->getVariableName(), '$'));
81 81
     }
82 82
 
83 83
     public function getSetterName(): string
Please login to merge, or discard this patch.
src/Utils/Logs/LevelFilter.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,12 +19,12 @@
 block discarded – undo
19 19
      */
20 20
     private const LEVELS = array(
21 21
         LogLevel::EMERGENCY, // 0
22
-        LogLevel::ALERT,     // 1
23
-        LogLevel::CRITICAL,  // 2
24
-        LogLevel::ERROR,     // 3
25
-        LogLevel::WARNING,   // 4
26
-        LogLevel::NOTICE,    // 5
27
-        LogLevel::INFO,      // 6
22
+        LogLevel::ALERT, // 1
23
+        LogLevel::CRITICAL, // 2
24
+        LogLevel::ERROR, // 3
25
+        LogLevel::WARNING, // 4
26
+        LogLevel::NOTICE, // 5
27
+        LogLevel::INFO, // 6
28 28
         LogLevel::DEBUG      // 7
29 29
     );
30 30
 
Please login to merge, or discard this patch.
src/Utils/PivotTableMethodsDescriptor.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
             $this->getArrayInlineCode($this->remoteFk->getUnquotedForeignColumns()),
185 185
             $this->getArrayInlineCode($this->remoteFk->getUnquotedLocalColumns()),
186 186
             $this->getArrayInlineCode($this->localFk->getUnquotedLocalColumns()),
187
-            '\\' . $this->resultIteratorNamespace . '\\' . $this->getResultIteratorClassName() . '::class'
187
+            '\\'.$this->resultIteratorNamespace.'\\'.$this->getResultIteratorClassName().'::class'
188 188
         );
189 189
     }
190 190
 
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 
227 227
         $getter = new MethodGenerator($this->getName());
228 228
         $getterDocBlock = new DocBlockGenerator(sprintf('Returns the list of %s associated to this bean via the %s pivot table.', $remoteBeanName, $this->pivotTable->getName()));
229
-        $getterDocBlock->setTag(new ReturnTag([ $fqcnRemoteBeanName.'[]' ]));
229
+        $getterDocBlock->setTag(new ReturnTag([$fqcnRemoteBeanName.'[]']));
230 230
         $getterDocBlock->setWordWrap(false);
231 231
         $getter->setDocBlock($getterDocBlock);
232 232
         $getter->setReturnType('array');
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 
236 236
         $adder = new MethodGenerator('add'.$singularName);
237 237
         $adderDocBlock = new DocBlockGenerator(sprintf('Adds a relationship with %s associated to this bean via the %s pivot table.', $remoteBeanName, $this->pivotTable->getName()));
238
-        $adderDocBlock->setTag(new ParamTag($variableName, [ $fqcnRemoteBeanName ]));
238
+        $adderDocBlock->setTag(new ParamTag($variableName, [$fqcnRemoteBeanName]));
239 239
         $adderDocBlock->setWordWrap(false);
240 240
         $adder->setDocBlock($adderDocBlock);
241 241
         $adder->setReturnType('void');
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 
245 245
         $remover = new MethodGenerator('remove'.$singularName);
246 246
         $removerDocBlock = new DocBlockGenerator(sprintf('Deletes the relationship with %s associated to this bean via the %s pivot table.', $remoteBeanName, $this->pivotTable->getName()));
247
-        $removerDocBlock->setTag(new ParamTag($variableName, [ $fqcnRemoteBeanName ]));
247
+        $removerDocBlock->setTag(new ParamTag($variableName, [$fqcnRemoteBeanName]));
248 248
         $removerDocBlock->setWordWrap(false);
249 249
         $remover->setDocBlock($removerDocBlock);
250 250
         $remover->setReturnType('void');
@@ -253,8 +253,8 @@  discard block
 block discarded – undo
253 253
 
254 254
         $has = new MethodGenerator('has'.$singularName);
255 255
         $hasDocBlock = new DocBlockGenerator(sprintf('Returns whether this bean is associated with %s via the %s pivot table.', $remoteBeanName, $this->pivotTable->getName()));
256
-        $hasDocBlock->setTag(new ParamTag($variableName, [ $fqcnRemoteBeanName ]));
257
-        $hasDocBlock->setTag(new ReturnTag([ 'bool' ]));
256
+        $hasDocBlock->setTag(new ParamTag($variableName, [$fqcnRemoteBeanName]));
257
+        $hasDocBlock->setTag(new ReturnTag(['bool']));
258 258
         $hasDocBlock->setWordWrap(false);
259 259
         $has->setDocBlock($hasDocBlock);
260 260
         $has->setReturnType('bool');
@@ -264,15 +264,15 @@  discard block
 block discarded – undo
264 264
         $setter = new MethodGenerator('set'.$pluralName);
265 265
         $setterDocBlock = new DocBlockGenerator(sprintf('Sets all relationships with %s associated to this bean via the %s pivot table.
266 266
 Exiting relationships will be removed and replaced by the provided relationships.', $remoteBeanName, $this->pivotTable->getName()));
267
-        $setterDocBlock->setTag(new ParamTag($pluralVariableName, [ $fqcnRemoteBeanName.'[]' ]));
268
-        $setterDocBlock->setTag(new ReturnTag([ 'void' ]));
267
+        $setterDocBlock->setTag(new ParamTag($pluralVariableName, [$fqcnRemoteBeanName.'[]']));
268
+        $setterDocBlock->setTag(new ReturnTag(['void']));
269 269
         $setterDocBlock->setWordWrap(false);
270 270
         $setter->setDocBlock($setterDocBlock);
271 271
         $setter->setReturnType('void');
272 272
         $setter->setParameter(new ParameterGenerator($pluralVariableName, 'array'));
273 273
         $setter->setBody(sprintf('$this->setRelationships(%s, $%s);', $pathKey, $pluralVariableName));
274 274
 
275
-        return [ $getter, $adder, $remover, $has, $setter ];
275
+        return [$getter, $adder, $remover, $has, $setter];
276 276
     }
277 277
 
278 278
     /**
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
         /** @var Annotation\JsonFormat|null $jsonFormat */
302 302
         $jsonFormat = $this->findRemoteAnnotation(Annotation\JsonFormat::class);
303 303
         if ($jsonFormat !== null) {
304
-            $method = $jsonFormat->method ?? 'get' . ucfirst($jsonFormat->property);
304
+            $method = $jsonFormat->method ?? 'get'.ucfirst($jsonFormat->property);
305 305
             $format = "$method()";
306 306
         } else {
307 307
             $stopRecursion = $this->findRemoteAnnotation(Annotation\JsonRecursive::class) ? '' : 'true';
Please login to merge, or discard this patch.