Passed
Push — master ( dd457c...82211b )
by Arne
03:19
created
src/shared/TypeAwareInterface.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace TheSeer\phpDox;
3 3
 
4
-interface TypeAwareInterface
5
-{
4
+interface TypeAwareInterface {
6 5
     public const TYPE_RETURN = 1;
7 6
     public const TYPE_PHPDOC = 2;
8 7
     public const TYPE_BUILTIN = 4;
Please login to merge, or discard this patch.
src/shared/TypeAwareTrait.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,16 +31,16 @@
 block discarded – undo
31 31
         $type = [];
32 32
 
33 33
         switch (true) {
34
-            case ($context & TypeAwareInterface::TYPE_RETURN) !== 0:
34
+            case ($context&TypeAwareInterface::TYPE_RETURN) !== 0:
35 35
                 $type = array_merge($type, $returnType);
36 36
                 // no-break
37
-            case ($context & TypeAwareInterface::TYPE_PHPDOC) !== 0:
37
+            case ($context&TypeAwareInterface::TYPE_PHPDOC) !== 0:
38 38
                 $type = array_merge($type, $docblockType);
39 39
                 // no-break
40
-            case ($context & TypeAwareInterface::TYPE_BUILTIN) !== 0:
40
+            case ($context&TypeAwareInterface::TYPE_BUILTIN) !== 0:
41 41
                 $type = array_merge($type, $variableType);
42 42
                 // no-break
43
-            case ($context & TypeAwareInterface::TYPE_PHPDOX) !== 0:
43
+            case ($context&TypeAwareInterface::TYPE_PHPDOX) !== 0:
44 44
                 $type = array_merge($type, $phpdoxType);
45 45
                 // no-break
46 46
         }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace TheSeer\phpDox;
3 3
 
4
-trait TypeAwareTrait
5
-{
4
+trait TypeAwareTrait {
6 5
     public function getBuiltInTypes(int $context = TypeAwareInterface::TYPE_ALL): array {
7 6
         /*
8 7
          * From:
Please login to merge, or discard this patch.
src/docblock/parser/GenericParser.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types = 1);
1
+<?php declare(strict_types=1);
2 2
 namespace TheSeer\phpDox\DocBlock;
3 3
 
4 4
 use TheSeer\phpDox\TypeAwareInterface;
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     }
30 30
 
31 31
     public function getObject(array $buffer) {
32
-        $this->payload .= ' ' . \implode(' ', \array_map('trim', $buffer));
32
+        $this->payload .= ' '.\implode(' ', \array_map('trim', $buffer));
33 33
         $obj = $this->buildObject('generic', []);
34 34
         $obj->setValue(\trim($this->payload));
35 35
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     protected function lookupType($type) {
50 50
         $types = explode('|', $type);
51 51
 
52
-        foreach ($types as &$oneType) {
52
+        foreach($types as &$oneType) {
53 53
             $isArray = false;
54 54
             if (substr($oneType, -2, 2) === '[]') {
55 55
                 $isArray = true;
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
         // relative to local namespace?
90 90
         if (isset($this->aliasMap['::context'])) {
91
-            return $this->aliasMap['::context'] . '\\' . $type;
91
+            return $this->aliasMap['::context'].'\\'.$type;
92 92
         }
93 93
 
94 94
         // don't know any better ..
Please login to merge, or discard this patch.
src/docblock/elements/VarElement.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types = 1);
1
+<?php declare(strict_types=1);
2 2
 namespace TheSeer\phpDox\DocBlock;
3 3
 
4 4
 use TheSeer\phpDox\TypeAwareInterface;
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
         if (count($types) > 1) {
19 19
             $node->setAttribute('type', 'mixed');
20 20
 
21
-            foreach ($types as $oneType) {
21
+            foreach($types as $oneType) {
22 22
                 $this->typeResolver($node, $oneType);
23 23
             }
24 24
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         }
59 59
         $nodeType = $node->appendElementNS(self::XMLNS, 'type');
60 60
         $nodeType->setAttribute('full', $type);
61
-        $nodeType->setAttribute('array', $isArray?'true':'false');
61
+        $nodeType->setAttribute('array', $isArray ? 'true' : 'false');
62 62
 
63 63
         if (\in_array($type, $this->types, true)) {
64 64
             $nodeType->setAttribute('name', $type);
Please login to merge, or discard this patch.