Completed
Push — 1.x ( 64141c...67746d )
by Akihito
14s queued 11s
created
src/Provide/Representation/CreatedResourceInterceptor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
         /** @var ResourceObject $ro */
31 31
         $ro = $invocation->proceed();
32 32
         $isCreated = $ro->code === 201 && isset($ro->headers['Location']);
33
-        if (! $isCreated) {
33
+        if (!$isCreated) {
34 34
             return $ro;
35 35
         }
36 36
         $ro->setRenderer($this->renderer);
Please login to merge, or discard this patch.
src/Compiler.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -59,6 +59,9 @@
 block discarded – undo
59 59
         }
60 60
     }
61 61
 
62
+    /**
63
+     * @param string $method
64
+     */
62 65
     private function isMagicMethod($method) : bool
63 66
     {
64 67
         return \in_array($method, ['__sleep', '__wakeup', 'offsetGet', 'offsetSet', 'offsetExists', 'offsetUnset', 'count', 'ksort', 'asort', 'jsonSerialize'], true);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
     private function saveNamedParam(NamedParameterInterface $namedParameter, $instance, string $method)
68 68
     {
69 69
         // named parameter
70
-        if (! \in_array($method, ['onGet', 'onPost', 'onPut', 'onPatch', 'onDelete', 'onHead'], true)) {
70
+        if (!\in_array($method, ['onGet', 'onPost', 'onPut', 'onPatch', 'onDelete', 'onHead'], true)) {
71 71
             return;
72 72
         }
73 73
         try {
Please login to merge, or discard this patch.
src/Provide/Representation/HalLink.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -22,6 +22,9 @@
 block discarded – undo
22 22
         $this->router = $router;
23 23
     }
24 24
 
25
+    /**
26
+     * @param string $uri
27
+     */
25 28
     public function getReverseLink($uri) : string
26 29
     {
27 30
         $urlParts = parse_url($uri);
Please login to merge, or discard this patch.
src/AppMetaModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
     protected function configure()
31 31
     {
32 32
         $this->bind(AbstractAppMeta::class)->toInstance($this->appMeta);
33
-        $this->bind(AppInterface::class)->to($this->appMeta->name . '\Module\App');
33
+        $this->bind(AppInterface::class)->to($this->appMeta->name.'\Module\App');
34 34
         $this->bind()->annotatedWith(AppName::class)->toInstance($this->appMeta->name);
35 35
     }
36 36
 }
Please login to merge, or discard this patch.
src/Provide/Logger/MonologProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,6 +28,6 @@
 block discarded – undo
28 28
      */
29 29
     public function get()
30 30
     {
31
-        return new Logger($this->appMeta->name, [new StreamHandler($this->appMeta->logDir . '/app.log', Logger::DEBUG)]);
31
+        return new Logger($this->appMeta->name, [new StreamHandler($this->appMeta->logDir.'/app.log', Logger::DEBUG)]);
32 32
     }
33 33
 }
Please login to merge, or discard this patch.
src/Provide/Router/HttpMethodParams.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     private function getParams($method, array $server, array $post) : array
90 90
     {
91 91
         // post data exists
92
-        if ($method === 'post' && ! empty($post)) {
92
+        if ($method === 'post' && !empty($post)) {
93 93
             return $post;
94 94
         }
95 95
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
             return $put;
114 114
         }
115 115
         $isApplicationJson = strpos($contentType, self::APPLICATION_JSON) !== false;
116
-        if (! $isApplicationJson) {
116
+        if (!$isApplicationJson) {
117 117
             return [];
118 118
         }
119 119
         $content = json_decode(file_get_contents($this->stdIn), true);
Please login to merge, or discard this patch.
src/Provide/Error/LogRef.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 
19 19
     public function __construct(\Exception $e)
20 20
     {
21
-        $this->ref = hash('crc32b', \get_class($e) . $e->getMessage() . $e->getFile() . $e->getLine());
21
+        $this->ref = hash('crc32b', \get_class($e).$e->getMessage().$e->getFile().$e->getLine());
22 22
     }
23 23
 
24 24
     public function __toString()
Please login to merge, or discard this patch.
src/Provide/Representation/HalRenderer.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         if ($ro->view) {
44 44
             return $ro->view;
45 45
         }
46
-        $method = 'on' . ucfirst($ro->uri->method);
46
+        $method = 'on'.ucfirst($ro->uri->method);
47 47
         $annotations = $this->reader->getMethodAnnotations(new \ReflectionMethod($ro, $method));
48 48
 
49 49
         return $this->renderHal($ro, $annotations);
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         /* @var $annotations Link[] */
56 56
         /* @var $ro ResourceObject */
57 57
         $hal = $this->getHal($ro->uri, $body, $annotations);
58
-        $ro->view = $hal->asJson(true) . PHP_EOL;
58
+        $ro->view = $hal->asJson(true).PHP_EOL;
59 59
         $this->updateHeaders($ro);
60 60
 
61 61
         return $ro->view;
@@ -83,13 +83,13 @@  discard block
 block discarded – undo
83 83
      */
84 84
     private function isDifferentSchema(ResourceObject $parentRo, ResourceObject $childRo) : bool
85 85
     {
86
-        return $parentRo->uri->scheme . $parentRo->uri->host !== $childRo->uri->scheme . $childRo->uri->host;
86
+        return $parentRo->uri->scheme.$parentRo->uri->host !== $childRo->uri->scheme.$childRo->uri->host;
87 87
     }
88 88
 
89 89
     private function getHal(AbstractUri $uri, array $body, array $annotations) : Hal
90 90
     {
91
-        $query = $uri->query ? '?' . http_build_query($uri->query) : '';
92
-        $path = $uri->path . $query;
91
+        $query = $uri->query ? '?'.http_build_query($uri->query) : '';
92
+        $path = $uri->path.$query;
93 93
         $selfLink = $this->link->getReverseLink($path);
94 94
 
95 95
         $hal = new Hal($selfLink, $body);
Please login to merge, or discard this patch.