Passed
Push — master ( 188cdd...047a07 )
by Dmitry
02:45
created
src/ApiLayer/JsonRpcExtensions/Documentation/MetadataExtractor.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
     /**
27 27
      * @param MethodCollection $methodCollection
28 28
      *
29
-     * @return array
29
+     * @return string
30 30
      */
31 31
     public function extract(MethodCollection $methodCollection)
32 32
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,11 +81,11 @@
 block discarded – undo
81 81
             $parameter = [
82 82
                 'name' => $reflectionProperty->getName(),
83 83
                 'description' => $docBlock->getShortDescription(),
84
-                'type' => $type.($isCollection ? '[]' : ''),
84
+                'type' => $type . ($isCollection ? '[]' : ''),
85 85
             ];
86 86
             if (class_exists($type)) {
87 87
                 $parameter = array_merge($parameter, [
88
-                    'type' => 'object'.($isCollection ? '[]' : ''),
88
+                    'type' => 'object' . ($isCollection ? '[]' : ''),
89 89
                     'properties' => $this->extractParameters($type, $processed),
90 90
                 ]);
91 91
             }
Please login to merge, or discard this patch.
src/Reflection/TypeResolver.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -53,6 +53,9 @@  discard block
 block discarded – undo
53 53
         return $type . ($isCollection ? '[]' : '');
54 54
     }
55 55
 
56
+    /**
57
+     * @param string $type
58
+     */
56 59
     private function isTypeObject($type)
57 60
     {
58 61
         switch (strtolower($type)) {
@@ -77,6 +80,9 @@  discard block
 block discarded – undo
77 80
         }
78 81
     }
79 82
 
83
+    /**
84
+     * @param string $type
85
+     */
80 86
     private function resolveClassName($type, \ReflectionClass $usingClass)
81 87
     {
82 88
         if (strpos($type, '\\') === 0 && class_exists($type)) {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
             $type = $this->resolveClassName($type, $reflectionProperty->getDeclaringClass());
53 53
         }
54 54
 
55
-        return $type.($isCollection ? '[]' : '');
55
+        return $type . ($isCollection ? '[]' : '');
56 56
     }
57 57
 
58 58
     private function isTypeObject($type)
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
         $alias = strtolower($type);
94 94
 
95 95
         if (!isset($aliases[$alias])) {
96
-            return $usingClass->getNamespaceName().'\\'.$type;
96
+            return $usingClass->getNamespaceName() . '\\' . $type;
97 97
         }
98 98
 
99 99
         return $aliases[$alias];
@@ -118,6 +118,6 @@  discard block
 block discarded – undo
118 118
             $type = $this->resolveClassName($type, $reflectionFunction->getDeclaringClass());
119 119
         }
120 120
 
121
-        return $type.($isCollection ? '[]' : '');
121
+        return $type . ($isCollection ? '[]' : '');
122 122
     }
123 123
 }
Please login to merge, or discard this patch.
spec/ApiLayer/JsonRpc/Method/MethodCollectionSpec.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
     {
17 17
         $this->has('sampleService.sampleMethod')->shouldBe(false);
18 18
 
19
-        $this->add('sampleService.sampleMethod', function () {});
19
+        $this->add('sampleService.sampleMethod', function() {});
20 20
 
21 21
         $this->get('sampleService.sampleMethod')->shouldBeAnInstanceOf(\Closure::class);
22 22
     }
Please login to merge, or discard this patch.
spec/ApiLayer/JsonRpc/ServerSpec.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
 
73 73
         $methodDispatcher
74 74
             ->dispatch('calculator.calculateProfit', ['month' => 'January'])
75
-            ->will(function () {
75
+            ->will(function() {
76 76
                 throw new Exception("test", 32);
77 77
             })
78 78
         ;
Please login to merge, or discard this patch.
src/ApiLayer/JsonRpcExtensions/Documentation/GeneratorFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
         return new Generator(
16 16
             new MetadataExtractor(new TypeResolver(new PhpParser())),
17 17
             new \Twig_Environment(new \Twig_Loader_Filesystem([
18
-                __DIR__.'/Resources',
18
+                __DIR__ . '/Resources',
19 19
             ]))
20 20
         );
21 21
     }
Please login to merge, or discard this patch.