Test Failed
Push — master ( 72a6c5...9329b7 )
by Arun
03:52
created
vendor/phpdocumentor/type-resolver/examples/01-resolving-simple-types.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,4 +10,4 @@
 block discarded – undo
10 10
 var_export($typeResolver->resolve('string|integer'));
11 11
 
12 12
 // Will return the string "string|int"
13
-var_dump((string)$typeResolver->resolve('string|integer'));
13
+var_dump((string) $typeResolver->resolve('string|integer'));
Please login to merge, or discard this patch.
examples/05-discovering-the-context-using-method-reflection.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,17 +14,17 @@
 block discarded – undo
14 14
 $context = $contextFactory->createFromReflector(new ReflectionMethod('My\\Example\\Classy', '__construct'));
15 15
 
16 16
 // Class named: \phpDocumentor\Reflection\Types\Resolver
17
-var_dump((string)$typeResolver->resolve('Types\Resolver', $context));
17
+var_dump((string) $typeResolver->resolve('Types\Resolver', $context));
18 18
 
19 19
 // String
20
-var_dump((string)$typeResolver->resolve('string', $context));
20
+var_dump((string) $typeResolver->resolve('string', $context));
21 21
 
22 22
 // Property named: \phpDocumentor\Reflection\Types\Resolver::$keyWords
23
-var_dump((string)$fqsenResolver->resolve('Types\Resolver::$keyWords', $context));
23
+var_dump((string) $fqsenResolver->resolve('Types\Resolver::$keyWords', $context));
24 24
 
25 25
 // Class named: \My\Example\string
26 26
 // - Shows the difference between the FqsenResolver and TypeResolver; the FqsenResolver will assume
27 27
 //   that the given value is not a type but most definitely a reference to another element. This is
28 28
 //   because conflicts between type keywords and class names can exist and if you know a reference
29 29
 //   is not a type but an element you can force that keywords are resolved.
30
-var_dump((string)$fqsenResolver->resolve('string', $context));
30
+var_dump((string) $fqsenResolver->resolve('string', $context));
Please login to merge, or discard this patch.
examples/04-discovering-the-context-using-class-reflection.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,17 +14,17 @@
 block discarded – undo
14 14
 $context = $contextFactory->createFromReflector(new ReflectionClass('My\\Example\\Classy'));
15 15
 
16 16
 // Class named: \phpDocumentor\Reflection\Types\Resolver
17
-var_dump((string)$typeResolver->resolve('Types\Resolver', $context));
17
+var_dump((string) $typeResolver->resolve('Types\Resolver', $context));
18 18
 
19 19
 // String
20
-var_dump((string)$typeResolver->resolve('string', $context));
20
+var_dump((string) $typeResolver->resolve('string', $context));
21 21
 
22 22
 // Property named: \phpDocumentor\Reflection\Types\Resolver::$keyWords
23
-var_dump((string)$fqsenResolver->resolve('Types\Resolver::$keyWords', $context));
23
+var_dump((string) $fqsenResolver->resolve('Types\Resolver::$keyWords', $context));
24 24
 
25 25
 // Class named: \My\Example\string
26 26
 // - Shows the difference between the FqsenResolver and TypeResolver; the FqsenResolver will assume
27 27
 //   that the given value is not a type but most definitely a reference to another element. This is
28 28
 //   because conflicts between type keywords and class names can exist and if you know a reference
29 29
 //   is not a type but an element you can force that keywords are resolved.
30
-var_dump((string)$fqsenResolver->resolve('string', $context));
30
+var_dump((string) $fqsenResolver->resolve('string', $context));
Please login to merge, or discard this patch.
vendor/phpdocumentor/type-resolver/examples/03-resolving-all-elements.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 $context = new Context('\phpDocumentor\Types');
12 12
 
13 13
 // Method named: \phpDocumentor\Types\Types\Resolver::resolveFqsen()
14
-var_dump((string)$fqsenResolver->resolve('Types\Resolver::resolveFqsen()', $context));
14
+var_dump((string) $fqsenResolver->resolve('Types\Resolver::resolveFqsen()', $context));
15 15
 
16 16
 // Property named: \phpDocumentor\Types\Types\Resolver::$keyWords
17
-var_dump((string)$fqsenResolver->resolve('Types\Resolver::$keyWords', $context));
17
+var_dump((string) $fqsenResolver->resolve('Types\Resolver::$keyWords', $context));
Please login to merge, or discard this patch.
vendor/phpdocumentor/type-resolver/src/FqsenResolver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,11 +66,11 @@
 block discarded – undo
66 66
                 $namespace .= self::OPERATOR_NAMESPACE;
67 67
             }
68 68
 
69
-            return new Fqsen(self::OPERATOR_NAMESPACE . $namespace . $type);
69
+            return new Fqsen(self::OPERATOR_NAMESPACE.$namespace.$type);
70 70
         }
71 71
 
72 72
         $typeParts[0] = $namespaceAliases[$typeParts[0]];
73 73
 
74
-        return new Fqsen(self::OPERATOR_NAMESPACE . implode(self::OPERATOR_NAMESPACE, $typeParts));
74
+        return new Fqsen(self::OPERATOR_NAMESPACE.implode(self::OPERATOR_NAMESPACE, $typeParts));
75 75
     }
76 76
 }
Please login to merge, or discard this patch.
vendor/phpdocumentor/type-resolver/src/TypeResolver.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -86,13 +86,13 @@  discard block
 block discarded – undo
86 86
     {
87 87
         if (!is_string($type)) {
88 88
             throw new \InvalidArgumentException(
89
-                'Attempted to resolve type but it appeared not to be a string, received: ' . var_export($type, true)
89
+                'Attempted to resolve type but it appeared not to be a string, received: '.var_export($type, true)
90 90
             );
91 91
         }
92 92
 
93 93
         $type = trim($type);
94 94
         if (!$type) {
95
-            throw new \InvalidArgumentException('Attempted to resolve "' . $type . '" but it appears to be empty');
95
+            throw new \InvalidArgumentException('Attempted to resolve "'.$type.'" but it appears to be empty');
96 96
         }
97 97
 
98 98
         if ($context === null) {
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
             default:
115 115
                 // I haven't got the foggiest how the logic would come here but added this as a defense.
116 116
                 throw new \RuntimeException(
117
-                    'Unable to resolve type "' . $type . '", there is no known method to resolve it'
117
+                    'Unable to resolve type "'.$type.'", there is no known method to resolve it'
118 118
                 );
119 119
         }
120 120
         // @codeCoverageIgnoreEnd
@@ -132,14 +132,14 @@  discard block
 block discarded – undo
132 132
     {
133 133
         if (!class_exists($typeClassName)) {
134 134
             throw new \InvalidArgumentException(
135
-                'The Value Object that needs to be created with a keyword "' . $keyword . '" must be an existing class'
136
-                . ' but we could not find the class ' . $typeClassName
135
+                'The Value Object that needs to be created with a keyword "'.$keyword.'" must be an existing class'
136
+                . ' but we could not find the class '.$typeClassName
137 137
             );
138 138
         }
139 139
 
140 140
         if (!in_array(Type::class, class_implements($typeClassName))) {
141 141
             throw new \InvalidArgumentException(
142
-                'The class "' . $typeClassName . '" must implement the interface "phpDocumentor\Reflection\Type"'
142
+                'The class "'.$typeClassName.'" must implement the interface "phpDocumentor\Reflection\Type"'
143 143
             );
144 144
         }
145 145
 
Please login to merge, or discard this patch.
vendor/phpdocumentor/type-resolver/src/Types/Array_.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     public function __construct(Type $valueType = null, Type $keyType = null)
42 42
     {
43 43
         if ($keyType === null) {
44
-            $keyType = new Compound([ new String_(), new Integer() ]);
44
+            $keyType = new Compound([new String_(), new Integer()]);
45 45
         }
46 46
         if ($valueType === null) {
47 47
             $valueType = new Mixed();
@@ -82,6 +82,6 @@  discard block
 block discarded – undo
82 82
             return 'array';
83 83
         }
84 84
 
85
-        return $this->valueType . '[]';
85
+        return $this->valueType.'[]';
86 86
     }
87 87
 }
Please login to merge, or discard this patch.
vendor/phpdocumentor/type-resolver/src/Types/Object_.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,10 +34,10 @@  discard block
 block discarded – undo
34 34
      */
35 35
     public function __construct(Fqsen $fqsen = null)
36 36
     {
37
-        if (strpos((string)$fqsen, '::') !== false || strpos((string)$fqsen, '()') !== false) {
37
+        if (strpos((string) $fqsen, '::') !== false || strpos((string) $fqsen, '()') !== false) {
38 38
             throw new \InvalidArgumentException(
39 39
                 'Object types can only refer to a class, interface or trait but a method, function, constant or '
40
-                . 'property was received: ' . (string)$fqsen
40
+                . 'property was received: '.(string) $fqsen
41 41
             );
42 42
         }
43 43
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     public function __toString()
63 63
     {
64 64
         if ($this->fqsen) {
65
-            return (string)$this->fqsen;
65
+            return (string) $this->fqsen;
66 66
         }
67 67
 
68 68
         return 'object';
Please login to merge, or discard this patch.
vendor/phpdocumentor/type-resolver/src/Types/Context.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
     public function __construct($namespace, array $namespaceAliases = [])
45 45
     {
46 46
         $this->namespace = ('global' !== $namespace && 'default' !== $namespace)
47
-            ? trim((string)$namespace, '\\')
47
+            ? trim((string) $namespace, '\\')
48 48
             : '';
49 49
 
50 50
         foreach ($namespaceAliases as $alias => $fqnn) {
Please login to merge, or discard this patch.