@@ -180,8 +180,8 @@ discard block |
||
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 |
||
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 |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | // そうでなければ複数回メソッドが実行されるため |
85 | 85 | // ただし同一クラス内に限る(親クラスの同一名のメソッドは実行する) |
86 | 86 | // TODO ここはテストを追加する |
87 | - $classpath = $refMethod->class . "#" . $refMethod->name; |
|
87 | + $classpath = $refMethod->class."#".$refMethod->name; |
|
88 | 88 | if (!array_key_exists($classpath, $invokeMethods)) { |
89 | 89 | $invokeMethods[$classpath] = $refMethod; |
90 | 90 | } |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | foreach ($invokeMethods as $classpath => $invokeMethod) { |
101 | 101 | $params = ["class" => get_class($this->instance), "method" => $this->method, "exception" => $originException]; |
102 | 102 | $invokeMethod->invokeArgs($this->instance, [$params]); |
103 | - $this->logger->debug("Execution of handling is success: " . $classpath); |
|
103 | + $this->logger->debug("Execution of handling is success: ".$classpath); |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | throw $delegateException ?: $originException; |
@@ -40,7 +40,7 @@ |
||
40 | 40 | if (class_exists($this->classpath)) { |
41 | 41 | throw new $this->classpath($this->message); |
42 | 42 | } else { |
43 | - throw new ClassNotFoundException($this->classpath . " is not found."); |
|
43 | + throw new ClassNotFoundException($this->classpath." is not found."); |
|
44 | 44 | } |
45 | 45 | } |
46 | 46 | } |
@@ -41,8 +41,8 @@ discard block |
||
41 | 41 | { |
42 | 42 | $applicationInfo = $this->container->applicationInfo; |
43 | 43 | $dirname = $this->camel2snake($this->container->router->pageName); |
44 | - $templateDir = $applicationInfo->applicationRoot . "/app/views/" . $dirname; |
|
45 | - $sharedDir = $applicationInfo->applicationRoot . "/app/views/" . $applicationInfo->sharedDir; |
|
44 | + $templateDir = $applicationInfo->applicationRoot."/app/views/".$dirname; |
|
45 | + $sharedDir = $applicationInfo->applicationRoot."/app/views/".$applicationInfo->sharedDir; |
|
46 | 46 | |
47 | 47 | if (is_dir($templateDir)) { |
48 | 48 | $this->loader->addPath($templateDir); |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | |
54 | 54 | $escaper = new \Twig_Extension_Escaper(true); |
55 | 55 | $twig = new \Twig_Environment($this->loader, [ |
56 | - 'cache' => $applicationInfo->applicationRoot . "/app/views/" . $applicationInfo->cacheDir, |
|
56 | + 'cache' => $applicationInfo->applicationRoot."/app/views/".$applicationInfo->cacheDir, |
|
57 | 57 | 'auto_reload' => true, |
58 | 58 | 'debug' => $this->container->debug |
59 | 59 | ]); |
@@ -31,7 +31,7 @@ |
||
31 | 31 | // 制御文字削除 |
32 | 32 | $removes = []; |
33 | 33 | $removes[] = '/%0[0-8bcef]/'; // 00-08, 11, 12, 14, 15 |
34 | - $removes[] = '/%1[0-9a-f]/'; // 16-31 |
|
34 | + $removes[] = '/%1[0-9a-f]/'; // 16-31 |
|
35 | 35 | $removes[] = '/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]+/S'; // 00-08, 11, 12, 14-31, 127 |
36 | 36 | |
37 | 37 | // $dataが数行にわたっている場合、一度で置換しきれないので繰り返す |
@@ -74,8 +74,8 @@ discard block |
||
74 | 74 | */ |
75 | 75 | public function camel2snake($str) |
76 | 76 | { |
77 | - $str = preg_replace_callback('/([A-Z])/', function ($matches) { |
|
78 | - return '_' . lcfirst($matches[1]); |
|
77 | + $str = preg_replace_callback('/([A-Z])/', function($matches) { |
|
78 | + return '_'.lcfirst($matches[1]); |
|
79 | 79 | }, $str); |
80 | 80 | |
81 | 81 | return preg_replace('/^_/', '', $str); |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | */ |
89 | 89 | public function snake2ucamel($str) |
90 | 90 | { |
91 | - $str = ucfirst(preg_replace_callback('/_([a-zA-Z])/', function ($matches) { |
|
91 | + $str = ucfirst(preg_replace_callback('/_([a-zA-Z])/', function($matches) { |
|
92 | 92 | return ucfirst($matches[1]); |
93 | 93 | }, $str)); |
94 | 94 |
@@ -20,7 +20,7 @@ |
||
20 | 20 | public function parseConfig($filepath) |
21 | 21 | { |
22 | 22 | // 正規化した絶対パス |
23 | - $realpath = $this->getApplicationRoot() . DIRECTORY_SEPARATOR . $filepath; |
|
23 | + $realpath = $this->getApplicationRoot().DIRECTORY_SEPARATOR.$filepath; |
|
24 | 24 | |
25 | 25 | return file_exists($realpath) ? parse_ini_file($realpath) : null; |
26 | 26 | } |
@@ -16,7 +16,7 @@ |
||
16 | 16 | */ |
17 | 17 | public function defaultLoggerFormatter() |
18 | 18 | { |
19 | - return '[%d{' . $this->defaultDateTimeFormatter() . '.%f}][%5L] %m'; |
|
19 | + return '[%d{'.$this->defaultDateTimeFormatter().'.%f}][%5L] %m'; |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | /** |
@@ -49,7 +49,7 @@ |
||
49 | 49 | /** |
50 | 50 | * {@inheritdoc} |
51 | 51 | */ |
52 | - public function onMethodInject(IAnnotatable &$instance, Container $container, \ReflectionMethod $method) |
|
52 | + public function onMethodInject(IAnnotatable&$instance, Container $container, \ReflectionMethod $method) |
|
53 | 53 | { |
54 | 54 | $this->injectedLog($this); |
55 | 55 |