Completed
Push — app ( 14394a )
by Akihito
05:48 queued 03:47
created
src/Provide/Transfer/CliResponder.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,17 +21,17 @@
 block discarded – undo
21 21
         $body = (string) $resourceObject;
22 22
         // code
23 23
         $statusText = (new Code)->statusText[$resourceObject->code];
24
-        $ob = $resourceObject->code . ' ' . $statusText . PHP_EOL;
24
+        $ob = $resourceObject->code.' '.$statusText.PHP_EOL;
25 25
         // header
26 26
         foreach ($resourceObject->headers as $label => $value) {
27
-            $ob .= "{$label}: {$value}" . PHP_EOL;
27
+            $ob .= "{$label}: {$value}".PHP_EOL;
28 28
         }
29 29
         // empty line
30
-        $ob .=  PHP_EOL;
30
+        $ob .= PHP_EOL;
31 31
 
32 32
         // body
33 33
         $ob .= $body;
34 34
 
35
-        echo $ob . PHP_EOL;
35
+        echo $ob.PHP_EOL;
36 36
     }
37 37
 }
Please login to merge, or discard this patch.
src/Provide/Representation/HalRenderer.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
     public function render(ResourceObject $ro)
48 48
     {
49 49
         list($ro, $body) = $this->valuate($ro);
50
-        $method = 'on' . ucfirst($ro->uri->method);
50
+        $method = 'on'.ucfirst($ro->uri->method);
51 51
         $hasMethod = method_exists($ro, $method);
52
-        if (! $hasMethod) {
52
+        if (!$hasMethod) {
53 53
             $ro->view = ''; // OPTIONS request no view
54 54
 
55 55
             return '';
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         /* @var $annotations Link[] */
59 59
         /* @var $ro ResourceObject */
60 60
         $hal = $this->getHal($ro->uri, $body, $annotations);
61
-        $ro->view = $hal->asJson(true) . PHP_EOL;
61
+        $ro->view = $hal->asJson(true).PHP_EOL;
62 62
         $this->updateHeaders($ro);
63 63
 
64 64
         return $ro->view;
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     /**
68 68
      * @param \BEAR\Resource\ResourceObject $ro
69 69
      */
70
-    private function valuateElements(ResourceObject &$ro)
70
+    private function valuateElements(ResourceObject & $ro)
71 71
     {
72 72
         foreach ($ro->body as $key => &$element) {
73 73
             if ($element instanceof RequestInterface) {
@@ -87,8 +87,8 @@  discard block
 block discarded – undo
87 87
      */
88 88
     private function getHal(AbstractUri $uri, array $body, array $annotations)
89 89
     {
90
-        $query = $uri->query ? '?' . http_build_query($uri->query) : '';
91
-        $path = $uri->path . $query;
90
+        $query = $uri->query ? '?'.http_build_query($uri->query) : '';
91
+        $path = $uri->path.$query;
92 92
         $selfLink = $this->getReverseMatchedLink($path);
93 93
         $hal = new Hal($selfLink, $body);
94 94
         $this->getHalLink($body, $annotations, $hal);
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
     private function getHalLink(array $body, array $links, Hal $hal)
150 150
     {
151 151
         foreach ($links as $link) {
152
-            if (! $link instanceof Link) {
152
+            if (!$link instanceof Link) {
153 153
                 continue;
154 154
             }
155 155
             $uri = uri_template($link->href, $body);
Please login to merge, or discard this patch.
src/Provide/Router/WebRouter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
     {
42 42
         $request = new RouterMatch;
43 43
         list($request->method, $request->query) = $this->httpMethodParams->get($server, $globals['_GET'], $globals['_POST']);
44
-        $request->path = $this->schemeHost . parse_url($server['REQUEST_URI'], PHP_URL_PATH);
44
+        $request->path = $this->schemeHost.parse_url($server['REQUEST_URI'], PHP_URL_PATH);
45 45
 
46 46
         return $request;
47 47
     }
Please login to merge, or discard this patch.
src/Provide/Error/VndErrorHandler.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     public function __construct(AbstractAppMeta $appMeta, TransferInterface $responder)
62 62
     {
63 63
         $this->logDir = $appMeta->logDir;
64
-        $this->lastErrorFile = $this->logDir . '/last_error.log';
64
+        $this->lastErrorFile = $this->logDir.'/last_error.log';
65 65
         $this->responder = $responder;
66 66
         $this->exceptionString = new ExceptionAsString;
67 67
     }
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
     private function codeError(\Exception $e)
122 122
     {
123 123
         $code = $e->getCode();
124
-        $message =  $code . ' ' . (new Code)->statusText[$code];
124
+        $message = $code.' '.(new Code)->statusText[$code];
125 125
         $body = ['message' => $message];
126 126
 
127 127
         return [$code, $body];
@@ -153,6 +153,6 @@  discard block
 block discarded – undo
153 153
      */
154 154
     private function getLogRefId(\Exception $e)
155 155
     {
156
-        return (string) crc32(get_class($e) . $e->getMessage() . $e->getFile() . $e->getLine());
156
+        return (string) crc32(get_class($e).$e->getMessage().$e->getFile().$e->getLine());
157 157
     }
158 158
 }
Please login to merge, or discard this patch.
src/Provide/Error/ErrorPage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,6 +24,6 @@
 block discarded – undo
24 24
     {
25 25
         $string = parent::__toString();
26 26
 
27
-        return $string . $this->postBody;
27
+        return $string.$this->postBody;
28 28
     }
29 29
 }
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
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     protected function configure()
30 30
     {
31 31
         $this->bind(AbstractAppMeta::class)->toInstance($this->appMeta);
32
-        $this->bind(AppInterface::class)->to($this->appMeta->name . '\Module\App');
32
+        $this->bind(AppInterface::class)->to($this->appMeta->name.'\Module\App');
33 33
         $this->bind('')->annotatedWith(AppName::class)->toInstance($this->appMeta->name);
34 34
     }
35 35
 }
Please login to merge, or discard this patch.
src/Context/Provider/FilesystemCacheProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,6 +27,6 @@
 block discarded – undo
27 27
      */
28 28
     public function get()
29 29
     {
30
-        return new FilesystemCache($this->app->tmpDir . '/cache');
30
+        return new FilesystemCache($this->app->tmpDir.'/cache');
31 31
     }
32 32
 }
Please login to merge, or discard this patch.
src/Context/CliModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
         $this->rename(RouterInterface::class, 'original');
24 24
         $this->bind(RouterInterface::class)->to(CliRouter::class);
25 25
         $this->bind(TransferInterface::class)->to(CliResponder::class);
26
-        $stdIn = tempnam(sys_get_temp_dir(), 'stdin-' . crc32(__FILE__));
26
+        $stdIn = tempnam(sys_get_temp_dir(), 'stdin-'.crc32(__FILE__));
27 27
         $this->bind()->annotatedWith(StdIn::class)->toInstance($stdIn);
28 28
     }
29 29
 }
Please login to merge, or discard this patch.
src/Provide/Router/HttpMethodParams.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     private function getParams($method, array $server, array $post)
112 112
     {
113 113
         // post data exists
114
-        if ($method === 'post' && ! empty($post)) {
114
+        if ($method === 'post' && !empty($post)) {
115 115
             return $post;
116 116
         }
117 117
 
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
     private function phpInput(array $server)
133 133
     {
134 134
         $contentType = $this->getContentType($server);
135
-        if (! $contentType) {
135
+        if (!$contentType) {
136 136
             return [];
137 137
         }
138 138
         $isFormUrlEncoded = strpos($contentType, self::FORM_URL_ENCODE) !== false;
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
         }
144 144
         $isApplicationJson = strpos($contentType, self::APPLICATION_JSON) !== false;
145 145
         if ($isApplicationJson) {
146
-            $content =  json_decode(file_get_contents($this->stdIn), true);
146
+            $content = json_decode(file_get_contents($this->stdIn), true);
147 147
 
148 148
             return $content;
149 149
         }
Please login to merge, or discard this patch.