@@ -108,6 +108,7 @@ |
||
108 | 108 | * CoreHelper#asyncで使用するコードを返却する |
109 | 109 | * @param string URL |
110 | 110 | * @param string CSSクラス名 |
111 | + * @param string $url |
|
111 | 112 | * @return string コード |
112 | 113 | */ |
113 | 114 | public function asyncHelperCode($url, $id) |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | $isProjectRoot = false; |
24 | 24 | |
25 | 25 | while (!$isProjectRoot) { |
26 | - if (file_exists($targetPath . DIRECTORY_SEPARATOR . $this->getProjectFileName())) { |
|
26 | + if (file_exists($targetPath.DIRECTORY_SEPARATOR.$this->getProjectFileName())) { |
|
27 | 27 | $isProjectRoot = true; |
28 | 28 | } else { |
29 | 29 | if (preg_match("/(.*)\//", $targetPath, $matches)) { |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | if (preg_match("/^namespace\s(.*);$/", $line, $matches)) { |
57 | 57 | $namespace = $matches[1]; |
58 | 58 | if (substr($namespace, 0) !== '\\') { |
59 | - $namespace = '\\' . $namespace; |
|
59 | + $namespace = '\\'.$namespace; |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | return $namespace; |
@@ -195,6 +195,7 @@ discard block |
||
195 | 195 | * テンプレートを描画する |
196 | 196 | * @param string テンプレートファイル |
197 | 197 | * @param mixed 展開するパラメータ |
198 | + * @param string $template |
|
198 | 199 | */ |
199 | 200 | private function outputHTML($template, $params) |
200 | 201 | { |
@@ -207,6 +208,7 @@ discard block |
||
207 | 208 | * テンプレート記法を変換する |
208 | 209 | * @param string 変換前出力内容 |
209 | 210 | * @param string mimeType |
211 | + * @param string $content |
|
210 | 212 | * @return bool 変換されたらtrue |
211 | 213 | */ |
212 | 214 | private function replaceTemplateMark(&$content, $mimeType) |
@@ -245,6 +247,7 @@ discard block |
||
245 | 247 | /** |
246 | 248 | * すべてのformタグにCSRF対策トークンを追加する |
247 | 249 | * @param string HTML文字列の参照 |
250 | + * @param string $csrfToken |
|
248 | 251 | */ |
249 | 252 | private function addToken(&$content, $csrfToken) |
250 | 253 | { |
@@ -284,10 +284,10 @@ |
||
284 | 284 | } |
285 | 285 | // 実体参照化をもとに戻す。 |
286 | 286 | $map = array('>' => '>', |
287 | - '<' => '<', |
|
288 | - '%20' => ' ', |
|
289 | - '%24' => '$', |
|
290 | - '%5C' => '\\'); |
|
287 | + '<' => '<', |
|
288 | + '%20' => ' ', |
|
289 | + '%24' => '$', |
|
290 | + '%5C' => '\\'); |
|
291 | 291 | |
292 | 292 | // HTMLタグを補完する |
293 | 293 | $content = <<< HTML |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | public function __construct(Container $container) |
59 | 59 | { |
60 | 60 | $this->container = $container; |
61 | - $this->session = $container->session; |
|
61 | + $this->session = $container->session; |
|
62 | 62 | $this->timestamp = 0; |
63 | 63 | $this->logger = $container->logger; |
64 | 64 | } |
@@ -72,12 +72,12 @@ discard block |
||
72 | 72 | $params = ["model" => $params["model"], "helper" => $params["helper"]]; |
73 | 73 | $dirname = $this->camel2snake($this->container->router->pageName); |
74 | 74 | |
75 | - $templateFile = new File($this->container->applicationInfo->applicationRoot . "/app/views/" . $dirname . "/" . $this->container->filename); |
|
76 | - $sharedFile = new File($this->container->applicationInfo->applicationRoot . "/app/views/" . $this->container->applicationInfo->sharedDir . "/" . $this->container->filename); |
|
75 | + $templateFile = new File($this->container->applicationInfo->applicationRoot."/app/views/".$dirname."/".$this->container->filename); |
|
76 | + $sharedFile = new File($this->container->applicationInfo->applicationRoot."/app/views/".$this->container->applicationInfo->sharedDir."/".$this->container->filename); |
|
77 | 77 | |
78 | 78 | $file = $templateFile->exists() ? $templateFile : ($sharedFile->exists() ? $sharedFile : null); |
79 | 79 | if ($file === null) { |
80 | - $errorMessage = "Invalid template file path: " . $templateFile->getFilePath() . " or " . $sharedFile->getFilePath(); |
|
80 | + $errorMessage = "Invalid template file path: ".$templateFile->getFilePath()." or ".$sharedFile->getFilePath(); |
|
81 | 81 | throw new ResourceNotFoundException($errorMessage); |
82 | 82 | } |
83 | 83 | |
@@ -93,12 +93,12 @@ discard block |
||
93 | 93 | $this->replaceTemplateMark($content, $mimeType); |
94 | 94 | |
95 | 95 | // テンプレートファイルをコンパイルし一時ファイルを作成 |
96 | - $tmpFile = new File($this->getTemporaryDirectory() . "/" . $this->getRandomstring(30)); |
|
96 | + $tmpFile = new File($this->getTemporaryDirectory()."/".$this->getRandomstring(30)); |
|
97 | 97 | $writer = new FileWriter($tmpFile); |
98 | 98 | $writer->write($content); |
99 | 99 | $writer->close(); |
100 | - $this->logger->debug("Write temporary template file: " . $tmpFile->getFilePath()); |
|
101 | - $this->logger->debug("Compiled template file size: " . $tmpFile->size()); |
|
100 | + $this->logger->debug("Write temporary template file: ".$tmpFile->getFilePath()); |
|
101 | + $this->logger->debug("Compiled template file size: ".$tmpFile->size()); |
|
102 | 102 | |
103 | 103 | $params["__params__"] = $params; |
104 | 104 | $params["__mimeType__"] = $mimeType; |
@@ -128,18 +128,18 @@ discard block |
||
128 | 128 | // CSRFチェックが実行される前に非同期でリクエストがあった場合を考慮して |
129 | 129 | // CSRFトークンは削除しない |
130 | 130 | if (preg_match('/<form.*?>.*?<\/form>/is', $content)) { |
131 | - $csrfToken = sha1($this->session->id() . microtime()); |
|
131 | + $csrfToken = sha1($this->session->id().microtime()); |
|
132 | 132 | $this->session->set($this->getCsrfTokenKey(), $csrfToken); |
133 | 133 | $this->addToken($content, $csrfToken); |
134 | 134 | } |
135 | 135 | |
136 | 136 | // テンプレートファイルをコンパイルし一時ファイルを作成 |
137 | - $tmpFile = new File($this->getTemporaryDirectory() . "/" . $this->getRandomstring(30)); |
|
137 | + $tmpFile = new File($this->getTemporaryDirectory()."/".$this->getRandomstring(30)); |
|
138 | 138 | $writer = new FileWriter($tmpFile); |
139 | 139 | $writer->write($content); |
140 | 140 | $writer->close(); |
141 | - $this->logger->debug("Write temporary template file: " . $tmpFile->getFilePath()); |
|
142 | - $this->logger->debug("Compiled template file size: " . $tmpFile->size()); |
|
141 | + $this->logger->debug("Write temporary template file: ".$tmpFile->getFilePath()); |
|
142 | + $this->logger->debug("Compiled template file size: ".$tmpFile->size()); |
|
143 | 143 | |
144 | 144 | $params["__params__"] = $params; |
145 | 145 | $params["__mimeType__"] = $mimeType; |
@@ -179,20 +179,20 @@ discard block |
||
179 | 179 | */ |
180 | 180 | public function cache($filename, $data, $expire) |
181 | 181 | { |
182 | - $cacheDir = $this->container->applicationInfo->applicationRoot . "/app/views/" . $this->container->applicationInfo->cacheDir; |
|
182 | + $cacheDir = $this->container->applicationInfo->applicationRoot."/app/views/".$this->container->applicationInfo->cacheDir; |
|
183 | 183 | $factory = new CacheDriverFactory(); |
184 | 184 | $config = new Container(false); |
185 | 185 | $config->cacheDir = $cacheDir; |
186 | 186 | $config->classPrefix = "view_cache"; |
187 | 187 | $cache = $factory->create("WebStream\Cache\Driver\TemporaryFile", $config); |
188 | 188 | $cache->inject('logger', $this->logger); |
189 | - var_dump($cacheDir . "/" . $filename . ".cache"); |
|
190 | - $file = new File($cacheDir . "/" . $filename . ".cache"); |
|
189 | + var_dump($cacheDir."/".$filename.".cache"); |
|
190 | + $file = new File($cacheDir."/".$filename.".cache"); |
|
191 | 191 | if (!$file->exists() || $this->timestamp > $file->lastModified()) { |
192 | 192 | if ($cache->add($filename, $data, $expire)) { |
193 | - $this->logger->debug("Write template cache file: " . $file->getFilePath()); |
|
193 | + $this->logger->debug("Write template cache file: ".$file->getFilePath()); |
|
194 | 194 | } else { |
195 | - throw new IOException("File write failure: " . $file->getFilePath()); |
|
195 | + throw new IOException("File write failure: ".$file->getFilePath()); |
|
196 | 196 | } |
197 | 197 | } |
198 | 198 | } |
@@ -219,29 +219,29 @@ discard block |
||
219 | 219 | { |
220 | 220 | $originContentHash = md5($content); |
221 | 221 | |
222 | - $content = preg_replace_callback('/(%.{\$' . $this->getHelperVariableName() . '\->async\(.+?\)})/', function ($matches) { |
|
222 | + $content = preg_replace_callback('/(%.{\$'.$this->getHelperVariableName().'\->async\(.+?\)})/', function($matches) { |
|
223 | 223 | $asyncId = $this->getAsyncDomId(); |
224 | - $context = preg_replace_callback('/\$' . $this->getHelperVariableName() . '->async\((.+?)\)/', function ($matches2) use ($asyncId) { |
|
225 | - return '$' . $this->getHelperVariableName() . '->async(' . $matches2[1] . ',\'' . $asyncId . '\')'; |
|
224 | + $context = preg_replace_callback('/\$'.$this->getHelperVariableName().'->async\((.+?)\)/', function($matches2) use ($asyncId) { |
|
225 | + return '$'.$this->getHelperVariableName().'->async('.$matches2[1].',\''.$asyncId.'\')'; |
|
226 | 226 | }, $matches[1]); |
227 | 227 | |
228 | 228 | return "<div id='$asyncId'>$context</div>"; |
229 | 229 | }, $content); |
230 | 230 | |
231 | - $content = preg_replace('/' . self::TEMPLATE_MARK_PHP . '\{(.*?)\}/', '<?php echo $1; ?>', $content); |
|
232 | - $content = preg_replace_callback('/' . self::TEMPLATE_MARK_TEMPLATE . '\{(.*?)\}/', function ($matches) { |
|
231 | + $content = preg_replace('/'.self::TEMPLATE_MARK_PHP.'\{(.*?)\}/', '<?php echo $1; ?>', $content); |
|
232 | + $content = preg_replace_callback('/'.self::TEMPLATE_MARK_TEMPLATE.'\{(.*?)\}/', function($matches) { |
|
233 | 233 | if (substr($matches[1], 0, 1) === '$') { |
234 | - return self::TEMPLATE_MARK_TEMPLATE . '{<?php echo ' . $matches[1] . ';?>}'; |
|
234 | + return self::TEMPLATE_MARK_TEMPLATE.'{<?php echo '.$matches[1].';?>}'; |
|
235 | 235 | } else { |
236 | - return '<?php $this->draw(\'' . $matches[1] . '\', $__params__, $__mimeType__); ?>'; |
|
236 | + return '<?php $this->draw(\''.$matches[1].'\', $__params__, $__mimeType__); ?>'; |
|
237 | 237 | } |
238 | 238 | }, $content); |
239 | 239 | |
240 | 240 | if ($mimeType === "xml") { |
241 | - $content = preg_replace('/' . self::TEMPLATE_MARK_XML . '\{(.*?)\}/', '<?php echo safetyOutXML($1); ?>', $content); |
|
241 | + $content = preg_replace('/'.self::TEMPLATE_MARK_XML.'\{(.*?)\}/', '<?php echo safetyOutXML($1); ?>', $content); |
|
242 | 242 | } elseif ($mimeType === "html") { |
243 | - $content = preg_replace('/' . self::TEMPLATE_MARK_HTML . '\{(.*?)\}/', '<?php echo safetyOut($1); ?>', $content); |
|
244 | - $content = preg_replace('/' . self::TEMPLATE_MARK_JAVASCRIPT . '\{(.*?)\}/', '<?php echo safetyOutJavaScript($1); ?>', $content); |
|
243 | + $content = preg_replace('/'.self::TEMPLATE_MARK_HTML.'\{(.*?)\}/', '<?php echo safetyOut($1); ?>', $content); |
|
244 | + $content = preg_replace('/'.self::TEMPLATE_MARK_JAVASCRIPT.'\{(.*?)\}/', '<?php echo safetyOutJavaScript($1); ?>', $content); |
|
245 | 245 | } |
246 | 246 | |
247 | 247 | $replacedContentHash = md5($content); |
@@ -26,7 +26,7 @@ |
||
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 | } |
@@ -13,6 +13,7 @@ |
||
13 | 13 | { |
14 | 14 | /** |
15 | 15 | * constructor |
16 | + * @param \Exception $exception |
|
16 | 17 | */ |
17 | 18 | public function __construct($message, $code = 500, $exception = null) |
18 | 19 | { |
@@ -120,11 +120,11 @@ |
||
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); |
@@ -31,6 +31,6 @@ |
||
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 | } |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | unset($injectedAnnotation[$annotationKey]); |
104 | 104 | } |
105 | 105 | |
106 | - return function () use ($injectedAnnotation) { |
|
106 | + return function() use ($injectedAnnotation) { |
|
107 | 107 | return $injectedAnnotation; |
108 | 108 | }; |
109 | 109 | } |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | */ |
116 | 116 | private function createHeader($containerList) |
117 | 117 | { |
118 | - return function () use ($containerList) { |
|
118 | + return function() use ($containerList) { |
|
119 | 119 | $headerContainer = new Container(); |
120 | 120 | $headerContainer->mimeType = "html"; |
121 | 121 | if ($containerList !== null) { |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | */ |
134 | 134 | private function createFilter($containerList) |
135 | 135 | { |
136 | - return function () use ($containerList) { |
|
136 | + return function() use ($containerList) { |
|
137 | 137 | $filterListContainer = new Container(); |
138 | 138 | $filterListContainer->initialize = new AnnotationListContainer(); |
139 | 139 | $filterListContainer->before = new AnnotationListContainer(); |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | // アクションメソッドの@Filter(type="skip")をチェックする |
146 | 146 | // 1メソッドに対して複数の@Filterが指定されてもエラーにはしない |
147 | 147 | foreach ($containerList as $filterAnnotation) { |
148 | - if ($filterAnnotation->classpath . "#" . $filterAnnotation->action === $filterAnnotation->method->class . "#" . $filterAnnotation->method->name) { |
|
148 | + if ($filterAnnotation->classpath."#".$filterAnnotation->action === $filterAnnotation->method->class."#".$filterAnnotation->method->name) { |
|
149 | 149 | if ($filterAnnotation->annotation->type === 'skip') { |
150 | 150 | $exceptMethods = $filterAnnotation->annotation->except; |
151 | 151 | if (!is_array($exceptMethods)) { |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | */ |
218 | 218 | private function createTemplate($containerList) |
219 | 219 | { |
220 | - return function () use ($containerList) { |
|
220 | + return function() use ($containerList) { |
|
221 | 221 | $templateContainer = new Container(false); |
222 | 222 | $templateContainer->engine = $containerList !== null ? $containerList[0]->engine : null; |
223 | 223 | $templateContainer->cacheTime = $containerList !== null ? $containerList[0]->cacheTime : null; |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | */ |
234 | 234 | private function createExceptionHandler($containerList) |
235 | 235 | { |
236 | - return function () use ($containerList) { |
|
236 | + return function() use ($containerList) { |
|
237 | 237 | return $containerList === null ? [] : $containerList; |
238 | 238 | }; |
239 | 239 | } |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | */ |
246 | 246 | private function createDatabase($containerList) |
247 | 247 | { |
248 | - return function () use ($containerList) { |
|
248 | + return function() use ($containerList) { |
|
249 | 249 | return $containerList; |
250 | 250 | }; |
251 | 251 | } |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | */ |
258 | 258 | private function createQuery($containerList) |
259 | 259 | { |
260 | - return function () use ($containerList) { |
|
260 | + return function() use ($containerList) { |
|
261 | 261 | return $containerList; |
262 | 262 | }; |
263 | 263 | } |
@@ -269,8 +269,8 @@ discard block |
||
269 | 269 | */ |
270 | 270 | private function createAlias($containerList) |
271 | 271 | { |
272 | - return function () use ($containerList) { |
|
273 | - return $containerList === null ? [] : $containerList;; |
|
272 | + return function() use ($containerList) { |
|
273 | + return $containerList === null ? [] : $containerList; ; |
|
274 | 274 | }; |
275 | 275 | } |
276 | 276 | } |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | /** |
37 | 37 | * Constructor |
38 | 38 | * @param array<string> 注入後の返却情報 |
39 | - * @param Container 依存コンテナ |
|
39 | + * @param Container Container |
|
40 | 40 | */ |
41 | 41 | public function __construct(array $injectedAnnotation, Container $container) |
42 | 42 | { |
@@ -56,7 +56,8 @@ discard block |
||
56 | 56 | /** |
57 | 57 | * CustomAnnotation結果を返却する |
58 | 58 | * @param string アノテーションID |
59 | - * @return Callable CustomAnnotation結果 |
|
59 | + * @param string $annotationId |
|
60 | + * @return \Closure CustomAnnotation結果 |
|
60 | 61 | */ |
61 | 62 | public function createAnnotationCallable($annotationId) |
62 | 63 | { |
@@ -95,7 +96,7 @@ discard block |
||
95 | 96 | |
96 | 97 | /** |
97 | 98 | * CustomAnnotation結果を返却する |
98 | - * @return Callable CustomAnnotation結果 |
|
99 | + * @return \Closure CustomAnnotation結果 |
|
99 | 100 | */ |
100 | 101 | public function createCustomAnnotationCallable() |
101 | 102 | { |
@@ -112,7 +113,7 @@ discard block |
||
112 | 113 | /** |
113 | 114 | * Header結果を返却する |
114 | 115 | * @param array<AnnotationContainer> アノテーションコンテナリスト |
115 | - * @return Callable Header結果 |
|
116 | + * @return \Closure Header結果 |
|
116 | 117 | */ |
117 | 118 | private function createHeader($containerList) |
118 | 119 | { |
@@ -130,7 +131,7 @@ discard block |
||
130 | 131 | /** |
131 | 132 | * Filter結果を返却する |
132 | 133 | * @param array<AnnotationContainer> アノテーションコンテナリスト |
133 | - * @return Callable Filter結果 |
|
134 | + * @return \Closure Filter結果 |
|
134 | 135 | */ |
135 | 136 | private function createFilter($containerList) |
136 | 137 | { |
@@ -214,7 +215,7 @@ discard block |
||
214 | 215 | /** |
215 | 216 | * Template結果を返却する |
216 | 217 | * @param array<AnnotationContainer> アノテーションコンテナリスト |
217 | - * @return Callable Template結果 |
|
218 | + * @return \Closure Template結果 |
|
218 | 219 | */ |
219 | 220 | private function createTemplate($containerList) |
220 | 221 | { |
@@ -230,7 +231,7 @@ discard block |
||
230 | 231 | /** |
231 | 232 | * ExceptionHandler結果を返却する |
232 | 233 | * @param array<AnnotationContainer> アノテーションコンテナリスト |
233 | - * @return Callable ExceptionHandler結果 |
|
234 | + * @return \Closure ExceptionHandler結果 |
|
234 | 235 | */ |
235 | 236 | private function createExceptionHandler($containerList) |
236 | 237 | { |
@@ -242,7 +243,7 @@ discard block |
||
242 | 243 | /** |
243 | 244 | * Database結果を返却する |
244 | 245 | * @param array<AnnotationContainer> アノテーションコンテナリスト |
245 | - * @return Callable Database結果 |
|
246 | + * @return \Closure Database結果 |
|
246 | 247 | */ |
247 | 248 | private function createDatabase($containerList) |
248 | 249 | { |
@@ -254,7 +255,7 @@ discard block |
||
254 | 255 | /** |
255 | 256 | * Query結果を返却する |
256 | 257 | * @param array<AnnotationContainer> アノテーションコンテナリスト |
257 | - * @return Callable Query結果 |
|
258 | + * @return \Closure Query結果 |
|
258 | 259 | */ |
259 | 260 | private function createQuery($containerList) |
260 | 261 | { |
@@ -266,7 +267,7 @@ discard block |
||
266 | 267 | /** |
267 | 268 | * Alias結果を返却する |
268 | 269 | * @param array<AnnotationContainer> アノテーションコンテナリスト |
269 | - * @return Callable Alias結果 |
|
270 | + * @return \Closure Alias結果 |
|
270 | 271 | */ |
271 | 272 | private function createAlias($containerList) |
272 | 273 | { |
@@ -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 | ]); |