Completed
Push — master ( ad9281...8eec46 )
by Gytis
03:01
created
src/Sniffs/AbstractConfigurableSniff.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
                 }
32 32
             }
33 33
 
34
-            array_walk_recursive($opts, function (&$val) {
34
+            array_walk_recursive($opts, function(&$val) {
35 35
                 if ('true' === $val) {
36 36
                     $val = true;
37 37
                 } elseif ('false' === $val) {
Please login to merge, or discard this patch.
src/Sniffs/CodeElement/FqcnPropSniff.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
         $varTag = $subject->getDocBlock()->getTagsByName('var')[0] ?? null;
77 77
 
78 78
         if ($varTag && null !== $varTag->getParamName()) {
79
-            $subject->addDocTypeWarning('Remove property name $' . $varTag->getParamName() . ' from @var tag');
79
+            $subject->addDocTypeWarning('Remove property name $'.$varTag->getParamName().' from @var tag');
80 80
         }
81 81
     }
82 82
 
Please login to merge, or discard this patch.
src/Core/Type/TypeHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
                 $typedArrayType->getType() instanceof ArrayType
40 40
                 || $typedArrayType->getType() instanceof UndefinedType
41 41
             ) {
42
-                return $typedArrayType;  // e.g. array[][] or [][]
42
+                return $typedArrayType; // e.g. array[][] or [][]
43 43
             }
44 44
         }
45 45
 
Please login to merge, or discard this patch.
src/Core/Type/Declaration/NullableType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      */
30 30
     public function toString(): string
31 31
     {
32
-        return '?' . $this->type->toString();
32
+        return '?'.$this->type->toString();
33 33
     }
34 34
 
35 35
     public function toDocString(): string
@@ -37,6 +37,6 @@  discard block
 block discarded – undo
37 37
         $rawType = $this->type->toString();
38 38
 
39 39
         // This must match sorting in CompoundType::toString() for raw comparisons.
40
-        return $rawType > 'null' ? 'null|' . $rawType : $rawType . '|null';
40
+        return $rawType > 'null' ? 'null|'.$rawType : $rawType.'|null';
41 41
     }
42 42
 }
Please login to merge, or discard this patch.
src/Core/Type/DocBlock/TypedArrayType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,6 +38,6 @@
 block discarded – undo
38 38
             $innerType = sprintf('(%s)', $innerType);
39 39
         }
40 40
 
41
-        return $innerType . str_repeat('[]', $this->depth);
41
+        return $innerType.str_repeat('[]', $this->depth);
42 42
     }
43 43
 }
Please login to merge, or discard this patch.
src/Core/Func/FunctionSignatureParser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
                 case T_CALLABLE:
76 76
                 case T_NULLABLE:
77 77
                     // these cannot be default
78
-                    $raw['type'] = ($raw['type'] ?? '') . $token['content'];
78
+                    $raw['type'] = ($raw['type'] ?? '').$token['content'];
79 79
                     break;
80 80
                 case T_EQUAL:
81 81
                     $raw['default'] = '';
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
                     if (isset($raw['default'])) {
88 88
                         $raw['default'] .= $token['content'];
89 89
                     } else {
90
-                        $raw['type'] = ($raw['type'] ?? '') . $token['content'];
90
+                        $raw['type'] = ($raw['type'] ?? '').$token['content'];
91 91
                     }
92 92
                     break;
93 93
                 case T_ELLIPSIS:
Please login to merge, or discard this patch.
src/Core/CodeElement/CodeElementDetector.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
                     break;
71 71
             }
72 72
 
73
-            $fqcn = ($namespace ? $namespace . '\\' : '') . $className;
73
+            $fqcn = ($namespace ? $namespace.'\\' : '').$className;
74 74
 
75 75
             // Instead of looking for doc blocks , we look for tokens
76 76
             // that should be preceded / followed by a doc block. This way we can
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
                 switch ($tokenCode) {
92 92
                     case T_CONST:
93 93
                         $constName = TokenHelper::getDeclarationName($file, $ptr);
94
-                        [$valueType,] = TokenHelper::getAssignmentType($file, $ptr);
94
+                        [$valueType, ] = TokenHelper::getAssignmentType($file, $ptr);
95 95
                         $docBlock = TokenHelper::getPrevDocBlock($file, $ptr, $skip);
96 96
                         $currentElement = new ConstElement($line, $docBlock, $namespace, $constName, $valueType);
97 97
                         $fileElement->addConstant($currentElement);
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
                 switch ($tokenCode) {
129 129
                     case T_CONST:
130 130
                         $docBlock = TokenHelper::getPrevDocBlock($file, $ptr, $skip);
131
-                        [$valueType,] = TokenHelper::getAssignmentType($file, $ptr);
131
+                        [$valueType, ] = TokenHelper::getAssignmentType($file, $ptr);
132 132
                         $currentElement = new ClassConstElement($line, $docBlock, $fqcn, $decName, $valueType);
133 133
                         $parentElement->addConstant($currentElement);
134 134
                         break;
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
                 switch ($tokenCode) {
179 179
                     case T_CONST:
180 180
                         $docBlock = TokenHelper::getPrevDocBlock($file, $ptr, $skip);
181
-                        [$valueType,] = TokenHelper::getAssignmentType($file, $ptr);
181
+                        [$valueType, ] = TokenHelper::getAssignmentType($file, $ptr);
182 182
                         $currentElement = new InterfaceConstElement($line, $docBlock, $fqcn, $decName, $valueType);
183 183
                         $parentElement->addConstant($currentElement);
184 184
                         break;
Please login to merge, or discard this patch.
src/Core/DocBlock/DocBlockParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
             }
45 45
 
46 46
             if (null !== $tagLineNum) {
47
-                $rawTags[$tagLineNum] = ($rawTags[$tagLineNum] ?? '') . ' ' . trim($rawLine);
47
+                $rawTags[$tagLineNum] = ($rawTags[$tagLineNum] ?? '').' '.trim($rawLine);
48 48
             } elseif (!empty($rawLine) || !empty($descLines)) {
49 49
                 // Always append non-empty lines, but also append empty lines if we have
50 50
                 // non-empty lines already. More non-empty lines might follow.
Please login to merge, or discard this patch.
src/Sniffs/CodeElement/FqcnDescriptionSniff.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     {
38 38
         $this->invalidPatterns = array_merge($this->invalidPatterns, $config['invalidPatterns'] ?? []);
39 39
         foreach ($this->invalidPatterns as &$invalidPattern) {
40
-            $invalidPattern = '#' . $invalidPattern . '#i';
40
+            $invalidPattern = '#'.$invalidPattern.'#i';
41 41
         }
42 42
 
43 43
         $this->invalidTags = array_merge($this->invalidTags, $config['invalidTags'] ?? []);
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         foreach ($element->getDocBlock()->getDescriptionLines() as $lineNum => $descriptionLine) {
71 71
             foreach ($this->invalidPatterns as $invalidPattern) {
72 72
                 if (preg_match($invalidPattern, $descriptionLine)) {
73
-                    $originId = $this->addViolationId ? $element->getFqcn() . $descriptionLine : null;
73
+                    $originId = $this->addViolationId ? $element->getFqcn().$descriptionLine : null;
74 74
                     SniffHelper::addViolation($file, 'Useless description', $lineNum, static::CODE, $this->reportType, $originId);
75 75
                 }
76 76
             }
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         foreach ($element->getDocBlock()->getTags() as $tag) {
80 80
             foreach ($this->invalidTags as $invalidTagName) {
81 81
                 if ($tag->getName() === $invalidTagName) {
82
-                    $originId = $this->addViolationId ? $element->getFqcn() . $invalidTagName : null;
82
+                    $originId = $this->addViolationId ? $element->getFqcn().$invalidTagName : null;
83 83
                     SniffHelper::addViolation($file, 'Useless tag', $tag->getLine(), static::CODE, $this->reportType, $originId);
84 84
                 }
85 85
             }
Please login to merge, or discard this patch.