@@ -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 | } |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | { |
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | - * @var array settings |
|
| 23 | + * @var array settings |
|
| 24 | 24 | */ |
| 25 | 25 | protected $settings; |
| 26 | 26 | |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | |
| 290 | 290 | /** |
| 291 | 291 | * link the class or method to the API or return the method name |
| 292 | - * |
|
| 292 | + * |
|
| 293 | 293 | * @param $class |
| 294 | 294 | * @param $method |
| 295 | 295 | * |
@@ -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 | } |
@@ -84,14 +84,14 @@ discard block |
||
| 84 | 84 | defined('PHILE_VERSION') || define('PHILE_VERSION', '1.8.0'); |
| 85 | 85 | defined('PHILE_CLI_MODE') || define('PHILE_CLI_MODE', (php_sapi_name() === 'cli')); |
| 86 | 86 | defined('DS') || define('DS', DIRECTORY_SEPARATOR); |
| 87 | - defined('ROOT_DIR') || define('ROOT_DIR', realpath(__DIR__ . DS . '..' . DS . '..' . DS) . DS); |
|
| 88 | - defined('CONTENT_DIR') || define('CONTENT_DIR', ROOT_DIR . 'content' . DS); |
|
| 87 | + defined('ROOT_DIR') || define('ROOT_DIR', realpath(__DIR__.DS.'..'.DS.'..'.DS).DS); |
|
| 88 | + defined('CONTENT_DIR') || define('CONTENT_DIR', ROOT_DIR.'content'.DS); |
|
| 89 | 89 | defined('CONTENT_EXT') || define('CONTENT_EXT', '.md'); |
| 90 | - defined('LIB_DIR') || define('LIB_DIR', ROOT_DIR . 'lib' . DS); |
|
| 91 | - defined('PLUGINS_DIR') || define('PLUGINS_DIR', ROOT_DIR . 'plugins' . DS); |
|
| 92 | - defined('THEMES_DIR') || define('THEMES_DIR', ROOT_DIR . 'themes' . DS); |
|
| 93 | - defined('CACHE_DIR') || define('CACHE_DIR', LIB_DIR . 'cache' . DS); |
|
| 94 | - defined('STORAGE_DIR') || define('STORAGE_DIR', LIB_DIR . 'datastorage' . DS); |
|
| 90 | + defined('LIB_DIR') || define('LIB_DIR', ROOT_DIR.'lib'.DS); |
|
| 91 | + defined('PLUGINS_DIR') || define('PLUGINS_DIR', ROOT_DIR.'plugins'.DS); |
|
| 92 | + defined('THEMES_DIR') || define('THEMES_DIR', ROOT_DIR.'themes'.DS); |
|
| 93 | + defined('CACHE_DIR') || define('CACHE_DIR', LIB_DIR.'cache'.DS); |
|
| 94 | + defined('STORAGE_DIR') || define('STORAGE_DIR', LIB_DIR.'datastorage'.DS); |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | /** |
@@ -102,8 +102,8 @@ discard block |
||
| 102 | 102 | spl_autoload_extensions(".php"); |
| 103 | 103 | // load phile core |
| 104 | 104 | spl_autoload_register( |
| 105 | - function ($className) { |
|
| 106 | - $fileName = LIB_DIR . str_replace("\\", DS, $className) . '.php'; |
|
| 105 | + function($className) { |
|
| 106 | + $fileName = LIB_DIR.str_replace("\\", DS, $className).'.php'; |
|
| 107 | 107 | if (file_exists($fileName)) { |
| 108 | 108 | include_once $fileName; |
| 109 | 109 | } |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | // load phile plugins |
| 113 | 113 | spl_autoload_register('\Phile\Plugin\PluginRepository::autoload'); |
| 114 | 114 | |
| 115 | - include LIB_DIR . 'vendor' . DS . 'autoload.php'; |
|
| 115 | + include LIB_DIR.'vendor'.DS.'autoload.php'; |
|
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | /** |
@@ -120,8 +120,8 @@ discard block |
||
| 120 | 120 | */ |
| 121 | 121 | protected function initializeConfiguration() |
| 122 | 122 | { |
| 123 | - $defaults = Utility::load(ROOT_DIR . 'default_config.php'); |
|
| 124 | - $localSettings = Utility::load(ROOT_DIR . 'config.php'); |
|
| 123 | + $defaults = Utility::load(ROOT_DIR.'default_config.php'); |
|
| 124 | + $localSettings = Utility::load(ROOT_DIR.'config.php'); |
|
| 125 | 125 | if (is_array($localSettings)) { |
| 126 | 126 | $this->settings = array_replace_recursive($defaults, $localSettings); |
| 127 | 127 | } else { |