@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $settings = $this->settings; |
52 | 52 | |
53 | 53 | $content = $data['content']; |
54 | - $content = $this->printPhpAsMarkdown($settings) . $content; |
|
54 | + $content = $this->printPhpAsMarkdown($settings).$content; |
|
55 | 55 | |
56 | 56 | $page = $data['page']; |
57 | 57 | $page->setContent($content); |
@@ -62,6 +62,6 @@ discard block |
||
62 | 62 | */ |
63 | 63 | protected function printPhpAsMarkdown($input) |
64 | 64 | { |
65 | - return "\n```php\n" . trim(print_r($input, true), "\n") . "\n```\n"; |
|
65 | + return "\n```php\n".trim(print_r($input, true), "\n")."\n```\n"; |
|
66 | 66 | } |
67 | 67 | } |
@@ -89,7 +89,7 @@ |
||
89 | 89 | { |
90 | 90 | $content = $page->getRawContent(); |
91 | 91 | foreach ($vars as $key => $value) { |
92 | - $regex = '/\{\{(\s*?)' . $key . '(\s*?)\}\}/'; |
|
92 | + $regex = '/\{\{(\s*?)'.$key.'(\s*?)\}\}/'; |
|
93 | 93 | $content = preg_replace($regex, $value, $content); |
94 | 94 | } |
95 | 95 | $page->setContent($content); |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | $template = 'index'; |
124 | 124 | } |
125 | 125 | if (!empty($this->config['template-extension'])) { |
126 | - $template .= '.' . $this->config['template-extension']; |
|
126 | + $template .= '.'.$this->config['template-extension']; |
|
127 | 127 | } |
128 | 128 | $templatePath = $this->getTemplatePath($template); |
129 | 129 | if (!file_exists($templatePath)) { |
@@ -143,9 +143,9 @@ discard block |
||
143 | 143 | */ |
144 | 144 | protected function getTemplatePath($sub = '') |
145 | 145 | { |
146 | - $themePath = THEMES_DIR . $this->settings['theme']; |
|
146 | + $themePath = THEMES_DIR.$this->settings['theme']; |
|
147 | 147 | if (!empty($sub)) { |
148 | - $themePath .= '/' . ltrim($sub, DIRECTORY_SEPARATOR); |
|
148 | + $themePath .= '/'.ltrim($sub, DIRECTORY_SEPARATOR); |
|
149 | 149 | } |
150 | 150 | return $themePath; |
151 | 151 | } |
@@ -167,11 +167,11 @@ discard block |
||
167 | 167 | 'base_url' => $this->settings['base_url'], |
168 | 168 | 'config' => $this->settings, |
169 | 169 | 'content_dir' => CONTENT_DIR, |
170 | - 'content_url' => $this->settings['base_url'] . '/' . basename(CONTENT_DIR), |
|
170 | + 'content_url' => $this->settings['base_url'].'/'.basename(CONTENT_DIR), |
|
171 | 171 | 'pages' => $repository->findAll(), |
172 | 172 | 'site_title' => $this->settings['site_title'], |
173 | - 'theme_dir' => THEMES_DIR . $this->settings['theme'], |
|
174 | - 'theme_url' => $this->settings['base_url'] . '/' . basename(THEMES_DIR) . '/' . $this->settings['theme'], |
|
173 | + 'theme_dir' => THEMES_DIR.$this->settings['theme'], |
|
174 | + 'theme_url' => $this->settings['base_url'].'/'.basename(THEMES_DIR).'/'.$this->settings['theme'], |
|
175 | 175 | ]; |
176 | 176 | |
177 | 177 | /** |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | 'a', |
139 | 139 | 'Exception-Wiki', |
140 | 140 | [ |
141 | - 'href' => 'https://github.com/PhileCMS/Phile/wiki/Exception_' . $code, |
|
141 | + 'href' => 'https://github.com/PhileCMS/Phile/wiki/Exception_'.$code, |
|
142 | 142 | 'target_' => 'blank' |
143 | 143 | ] |
144 | 144 | ); |
@@ -153,8 +153,8 @@ discard block |
||
153 | 153 | } |
154 | 154 | |
155 | 155 | $DS = DIRECTORY_SEPARATOR; |
156 | - $pluginPath = realpath(dirname(__FILE__) . $DS . '..') . $DS; |
|
157 | - $tplPath = $pluginPath . 'template.php'; |
|
156 | + $pluginPath = realpath(dirname(__FILE__).$DS.'..').$DS; |
|
157 | + $tplPath = $pluginPath.'template.php'; |
|
158 | 158 | |
159 | 159 | ob_start(); |
160 | 160 | extract($marker); |
@@ -181,8 +181,8 @@ discard block |
||
181 | 181 | $backtrace .= ' '; |
182 | 182 | |
183 | 183 | if (isset($step['class'])) { |
184 | - $class = $this->linkClass($step['class']) . '<span class="divider">::</span>'; |
|
185 | - $backtrace .= $class . $this->linkClass($step['class'], $step['function']); |
|
184 | + $class = $this->linkClass($step['class']).'<span class="divider">::</span>'; |
|
185 | + $backtrace .= $class.$this->linkClass($step['class'], $step['function']); |
|
186 | 186 | } elseif (isset($step['function'])) { |
187 | 187 | $backtrace .= $this->tag('span', $step['function'], ['class' => 'function']); |
188 | 188 | } |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | if (!file_exists($filename)) { |
252 | 252 | return ''; |
253 | 253 | } |
254 | - $html = $this->tag('span', $filename . ':<br/>', ['class' => 'filename']); |
|
254 | + $html = $this->tag('span', $filename.':<br/>', ['class' => 'filename']); |
|
255 | 255 | |
256 | 256 | $code = file_get_contents($filename); |
257 | 257 | $lines = explode("\n", $code); |
@@ -302,14 +302,14 @@ discard block |
||
302 | 302 | return $title; |
303 | 303 | } |
304 | 304 | |
305 | - $filename = 'docs/classes/' . str_replace('\\', '.', $class) . '.html'; |
|
305 | + $filename = 'docs/classes/'.str_replace('\\', '.', $class).'.html'; |
|
306 | 306 | if (file_exists(Utility::resolveFilePath($filename))) { |
307 | 307 | return $title; |
308 | 308 | } |
309 | 309 | |
310 | - $href = $this->settings['base_url'] . '/' . $filename; |
|
310 | + $href = $this->settings['base_url'].'/'.$filename; |
|
311 | 311 | if ($method) { |
312 | - $href .= '#method_' . $method; |
|
312 | + $href .= '#method_'.$method; |
|
313 | 313 | } |
314 | 314 | return $this->tag('a', $title, ['href' => $href, 'target' => '_blank']); |
315 | 315 | } |
@@ -324,11 +324,11 @@ discard block |
||
324 | 324 | */ |
325 | 325 | protected function tag($tag, $content = '', array $attributes = []) |
326 | 326 | { |
327 | - $html = '<' . $tag; |
|
327 | + $html = '<'.$tag; |
|
328 | 328 | foreach ($attributes as $key => $value) { |
329 | - $html .= ' ' . $key . '="' . htmlspecialchars($value) . '"'; |
|
329 | + $html .= ' '.$key.'="'.htmlspecialchars($value).'"'; |
|
330 | 330 | } |
331 | - $html .= '>' . $content . '</' . $tag . '>'; |
|
331 | + $html .= '>'.$content.'</'.$tag.'>'; |
|
332 | 332 | return $html; |
333 | 333 | } |
334 | 334 | } |
@@ -109,6 +109,6 @@ |
||
109 | 109 | */ |
110 | 110 | protected function getStorageFile($key) |
111 | 111 | { |
112 | - return $this->dataDirectory . $this->getInternalKey($key) . '.ds'; |
|
112 | + return $this->dataDirectory.$this->getInternalKey($key).'.ds'; |
|
113 | 113 | } |
114 | 114 | } |
@@ -11,7 +11,7 @@ |
||
11 | 11 | * @deprecated since 2015-05-01, file will be removed |
12 | 12 | */ |
13 | 13 | |
14 | -require_once __DIR__ . '/lib/Phile/Bootstrap.php'; |
|
14 | +require_once __DIR__.'/lib/Phile/Bootstrap.php'; |
|
15 | 15 | |
16 | 16 | Bootstrap::getInstance()->initializeBasics(); |
17 | 17 |