Completed
Push — feature/0.7.0 ( 6d3944...2d465b )
by Ryuichi
03:21
created
WebStream/Exception/ApplicationException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
             $exception = $this;
27 27
         }
28 28
 
29
-        Logger::error(get_class($exception) . " is thrown: " . $exception->getFile() . "(" . $exception->getLine() . ")");
29
+        Logger::error(get_class($exception)." is thrown: ".$exception->getFile()."(".$exception->getLine().")");
30 30
         if (!empty($message)) {
31 31
             Logger::error($this->getMessage(), $this->getTraceAsString());
32 32
         }
Please login to merge, or discard this patch.
WebStream/Core/CoreHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -96,8 +96,8 @@
 block discarded – undo
96 96
     public function async($path, $id)
97 97
     {
98 98
         $safetyPath = str_replace('\\', '', $this->encodeJavaScript($path));
99
-        $url = "//" . $this->container->request->server("HTTP_HOST") . $this->container->request->getBaseURL() . $safetyPath;
99
+        $url = "//".$this->container->request->server("HTTP_HOST").$this->container->request->getBaseURL().$safetyPath;
100 100
 
101
-        return "<script type='text/javascript'>" . $this->asyncHelperCode($url, $id) . "</script>";
101
+        return "<script type='text/javascript'>".$this->asyncHelperCode($url, $id)."</script>";
102 102
     }
103 103
 }
Please login to merge, or discard this patch.
WebStream/Core/CoreView.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -120,11 +120,11 @@
 block discarded – undo
120 120
     final public function __file($filepath)
121 121
     {
122 122
         $publicDir = $this->container->applicationInfo->publicDir;
123
-        if (preg_match('/\/views\/' . $publicDir . '\/img\/.+\.(?:jp(?:e|)g|png|bmp|(?:tif|gi)f)$/i', $filepath) ||
124
-            preg_match('/\/views\/' . $publicDir . '\/css\/.+\.css$/i', $filepath) ||
125
-            preg_match('/\/views\/' . $publicDir . '\/js\/.+\.js$/i', $filepath)) { // 画像,css,jsの場合
123
+        if (preg_match('/\/views\/'.$publicDir.'\/img\/.+\.(?:jp(?:e|)g|png|bmp|(?:tif|gi)f)$/i', $filepath) ||
124
+            preg_match('/\/views\/'.$publicDir.'\/css\/.+\.css$/i', $filepath) ||
125
+            preg_match('/\/views\/'.$publicDir.'\/js\/.+\.js$/i', $filepath)) { // 画像,css,jsの場合
126 126
             $this->display($filepath);
127
-        } elseif (preg_match('/\/views\/' . $publicDir . '\/file\/.+$/i', $filepath)) { // それ以外のファイル
127
+        } elseif (preg_match('/\/views\/'.$publicDir.'\/file\/.+$/i', $filepath)) { // それ以外のファイル
128 128
             $this->download($filepath);
129 129
         } else { // 全てのファイル
130 130
             $this->display($filepath);
Please login to merge, or discard this patch.
WebStream/Http/Response.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -155,11 +155,11 @@  discard block
 block discarded – undo
155 155
     public function setStatusCode($statusCode)
156 156
     {
157 157
         if (!is_string($statusCode) && !is_int($statusCode)) {
158
-            throw new ConnectionException("Invalid status code format: " . strval($statusCode));
158
+            throw new ConnectionException("Invalid status code format: ".strval($statusCode));
159 159
         }
160 160
 
161 161
         if (!array_key_exists($statusCode, $this->status)) {
162
-            throw new ConnectionException("Unknown status code: " . $statusCode);
162
+            throw new ConnectionException("Unknown status code: ".$statusCode);
163 163
         }
164 164
         $this->statusCode = $statusCode;
165 165
     }
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
     public function setContentDisposition($filename)
181 181
     {
182 182
         if (file_exists($filename)) {
183
-            $this->contentDisposition = 'attachement; filename="'. basename($filename) . '"';
183
+            $this->contentDisposition = 'attachement; filename="'.basename($filename).'"';
184 184
         }
185 185
     }
186 186
 
@@ -235,43 +235,43 @@  discard block
 block discarded – undo
235 235
     public function header()
236 236
     {
237 237
         // StatusCode
238
-        $headerMessage = 'HTTP/' . self::HTTP_VERSION . ' ' .
239
-                         $this->statusCode . ' ' . $this->status[$this->statusCode];
238
+        $headerMessage = 'HTTP/'.self::HTTP_VERSION.' '.
239
+                         $this->statusCode.' '.$this->status[$this->statusCode];
240 240
         header($headerMessage);
241 241
 
242 242
         // Redirect
243 243
         if (intval($this->statusCode) === 301) {
244
-            header('Location: ' . $this->location);
244
+            header('Location: '.$this->location);
245 245
         }
246 246
 
247 247
         // Content-Type
248
-        header('Content-Type: ' . $this->mimeType . '; charset=' . $this->charset);
248
+        header('Content-Type: '.$this->mimeType.'; charset='.$this->charset);
249 249
 
250 250
         // Content-Length
251 251
         if ($this->contentLength === null) {
252 252
             $this->contentLength = $this->bytelen($this->body);
253 253
         }
254
-        header('Content-Length: ' . $this->contentLength);
254
+        header('Content-Length: '.$this->contentLength);
255 255
 
256 256
         // Content-Disposition
257 257
         if ($this->contentDisposition !== null) {
258
-            header('Content-Disposition: ' . $this->contentDisposition);
258
+            header('Content-Disposition: '.$this->contentDisposition);
259 259
         }
260 260
 
261 261
         // Content-Transfer-Encoding
262 262
         if ($this->contentTransferEncoding !== null) {
263
-            header('Content-Transfer-Encoding: ' . $this->contentTransferEncoding);
263
+            header('Content-Transfer-Encoding: '.$this->contentTransferEncoding);
264 264
         }
265 265
 
266 266
         // Cache-Control
267
-        header('Cache-Control: ' . $this->cacheControl);
267
+        header('Cache-Control: '.$this->cacheControl);
268 268
 
269 269
         // Pragma
270
-        header('Pragma: ' . $this->pragma);
270
+        header('Pragma: '.$this->pragma);
271 271
 
272 272
         // Expires
273 273
         if ($this->expires !== null) {
274
-            header('Expires: ' . $this->expires);
274
+            header('Expires: '.$this->expires);
275 275
         }
276 276
 
277 277
         // X-Content-Type-Options
@@ -279,20 +279,20 @@  discard block
 block discarded – undo
279 279
 
280 280
         // Access-Control-Allow-Origin
281 281
         if (!empty($this->accessControlAllowOrigin)) {
282
-            header('Access-Control-Allow-Origin: ' . implode(',', $this->accessControlAllowOrigin));
282
+            header('Access-Control-Allow-Origin: '.implode(',', $this->accessControlAllowOrigin));
283 283
         }
284 284
 
285 285
         // X-Frame-Options
286 286
         if ($this->xframeOptions !== null) {
287
-            header('X-Frame-Options: ' . $this->xframeOptions);
287
+            header('X-Frame-Options: '.$this->xframeOptions);
288 288
         }
289 289
 
290 290
         // X-XSS-Protection
291 291
         if ($this->xxssProtection !== null) {
292
-            header('X-XSS-Protection: ' . $this->xxssProtection);
292
+            header('X-XSS-Protection: '.$this->xxssProtection);
293 293
         }
294 294
 
295
-        $this->logger->info("HTTP access occured: status code " . $this->statusCode);
295
+        $this->logger->info("HTTP access occured: status code ".$this->statusCode);
296 296
     }
297 297
 
298 298
     /**
@@ -510,7 +510,7 @@  discard block
 block discarded – undo
510 510
         ob_clean(); // これまでの出力バッファをクリア
511 511
         $statusCode = array_key_exists($statusCode, $this->status) ? $statusCode : 500;
512 512
         $this->setStatusCode($statusCode);
513
-        $bodyMessage = $statusCode . ' ' . $this->status[$statusCode];
513
+        $bodyMessage = $statusCode.' '.$this->status[$statusCode];
514 514
         $this->setBody($this->bodyTemplate($bodyMessage));
515 515
         $this->send();
516 516
         exit;
Please login to merge, or discard this patch.
WebStream/Database/ConnectionManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,14 +77,14 @@
 block discarded – undo
77 77
             $dsnHash = "";
78 78
             $databaseConfigContainer = new Container(false);
79 79
             foreach ($config as $key => $value) {
80
-                $dsnHash .= $key . $value;
80
+                $dsnHash .= $key.$value;
81 81
                 $databaseConfigContainer->set($key, $value);
82 82
             }
83 83
             $dsnHash = md5($dsnHash);
84 84
 
85 85
             $this->classpathMap[$container->filepath] = $dsnHash;
86 86
 
87
-            $this->connectionContainer->{$dsnHash} = function () use ($driverClassPath, $databaseConfigContainer, $logger) {
87
+            $this->connectionContainer->{$dsnHash} = function() use ($driverClassPath, $databaseConfigContainer, $logger) {
88 88
                 $driver = new $driverClassPath($databaseConfigContainer);
89 89
                 $driver->inject('logger', $logger);
90 90
 
Please login to merge, or discard this patch.
WebStream/Database/Query.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -120,9 +120,9 @@
 block discarded – undo
120 120
         try {
121 121
             $stmt = $this->driver->getStatement($this->sql);
122 122
             if ($stmt === false) {
123
-                throw new DatabaseException("Can't create statement: ". $this->sql);
123
+                throw new DatabaseException("Can't create statement: ".$this->sql);
124 124
             }
125
-            $this->logger->info("Executed SQL: " . $this->sql);
125
+            $this->logger->info("Executed SQL: ".$this->sql);
126 126
             foreach ($this->bind as $key => $value) {
127 127
                 $this->logger->info("Bind statement: $key => $value");
128 128
                 if (preg_match("/^[0-9]+$/", $value) && is_int($value)) {
Please login to merge, or discard this patch.
WebStream/Database/EntityManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
             if (array_key_exists($col, $propertyMap)) {
92 92
                 $propertyMap[$col]->setValue($instance, $value);
93 93
             } else {
94
-                $this->logger->error("Column '$col' is failed mapping in " . $this->classpath);
94
+                $this->logger->error("Column '$col' is failed mapping in ".$this->classpath);
95 95
             }
96 96
         }
97 97
 
Please login to merge, or discard this patch.
WebStream/Database/Driver/Sqlite.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,6 +31,6 @@
 block discarded – undo
31 31
         ]);
32 32
 
33 33
         $this->connection = DriverManager::getConnection($params, $config);
34
-        $this->logger->debug(get_class($this) . " connect.");
34
+        $this->logger->debug(get_class($this)." connect.");
35 35
     }
36 36
 }
Please login to merge, or discard this patch.
WebStream/Delegate/CoreExecuteDelegator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -180,8 +180,8 @@  discard block
 block discarded – undo
180 180
 
181 181
         // テンプレートキャッシュチェック
182 182
         $pageName = $this->container->coreDelegator->getPageName();
183
-        $cacheFile = $applicationInfo->cachePrefix . $this->camel2snake($pageName) . "-" . $this->camel2snake($method);
184
-        $cache = new Cache($applicationInfo->applicationRoot . "/app/views/" . $applicationInfo->cacheDir);
183
+        $cacheFile = $applicationInfo->cachePrefix.$this->camel2snake($pageName)."-".$this->camel2snake($method);
184
+        $cache = new Cache($applicationInfo->applicationRoot."/app/views/".$applicationInfo->cacheDir);
185 185
         $cache->inject('logger', $this->logger);
186 186
         $data = $cache->get($cacheFile);
187 187
 
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
             ]);
249 249
 
250 250
             if ($template->cacheTime !== null) {
251
-                $cacheFile = $applicationInfo->cachePrefix . $this->camel2snake($pageName) . "-" . $this->camel2snake($method);
251
+                $cacheFile = $applicationInfo->cachePrefix.$this->camel2snake($pageName)."-".$this->camel2snake($method);
252 252
                 $view->templateCache($cacheFile, ob_get_contents(), $template->cacheTime);
253 253
             }
254 254
 
Please login to merge, or discard this patch.