@@ -21,8 +21,8 @@ |
||
21 | 21 | */ |
22 | 22 | class Plugin extends AbstractPlugin |
23 | 23 | { |
24 | - const HANDLER_ERROR_LOG = 'error_log'; |
|
25 | - const HANDLER_DEVELOPMENT = 'development'; |
|
24 | + const HANDLER_ERROR_LOG = 'error_log'; |
|
25 | + const HANDLER_DEVELOPMENT = 'development'; |
|
26 | 26 | |
27 | 27 | protected $events = ['plugins_loaded' => 'onPluginsLoaded']; |
28 | 28 |
@@ -18,7 +18,7 @@ |
||
18 | 18 | class Meta implements MetaInterface |
19 | 19 | { |
20 | 20 | /** |
21 | - * @var array $config the configuration for this parser |
|
21 | + * @var array $config the configuration for this parser |
|
22 | 22 | */ |
23 | 23 | private $config; |
24 | 24 |
@@ -15,7 +15,7 @@ |
||
15 | 15 | class AbstractModel implements \ArrayAccess |
16 | 16 | { |
17 | 17 | /** |
18 | - * @var array the storage |
|
18 | + * @var array the storage |
|
19 | 19 | */ |
20 | 20 | protected $data = array(); |
21 | 21 |
@@ -18,7 +18,7 @@ |
||
18 | 18 | class Markdown implements ParserInterface |
19 | 19 | { |
20 | 20 | /** |
21 | - * @var mixed the configuration |
|
21 | + * @var mixed the configuration |
|
22 | 22 | */ |
23 | 23 | private $config; |
24 | 24 |
@@ -20,17 +20,17 @@ |
||
20 | 20 | { |
21 | 21 | |
22 | 22 | /** |
23 | - * @var global Phile config |
|
23 | + * @var global Phile config |
|
24 | 24 | */ |
25 | 25 | protected $config; |
26 | 26 | |
27 | 27 | /** |
28 | - * @var bool Phile installation needs setup |
|
28 | + * @var bool Phile installation needs setup |
|
29 | 29 | */ |
30 | 30 | protected $needsSetup = true; |
31 | 31 | |
32 | 32 | /** |
33 | - * @var array event subscription |
|
33 | + * @var array event subscription |
|
34 | 34 | */ |
35 | 35 | protected $events = [ |
36 | 36 | 'config_loaded' => 'onConfigLoaded', |
@@ -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); |
@@ -15,12 +15,12 @@ |
||
15 | 15 | class Session |
16 | 16 | { |
17 | 17 | /** |
18 | - * @var bool mark if session is started |
|
18 | + * @var bool mark if session is started |
|
19 | 19 | */ |
20 | 20 | static public $isStarted = false; |
21 | 21 | |
22 | 22 | /** |
23 | - * @var string the session id |
|
23 | + * @var string the session id |
|
24 | 24 | */ |
25 | 25 | static public $sessionId = ''; |
26 | 26 |
@@ -119,7 +119,7 @@ |
||
119 | 119 | public function send() |
120 | 120 | { |
121 | 121 | if (!isset($this->headers['Content-Type'])) { |
122 | - $this->setHeader('Content-Type', 'text/html; charset=' . $this->charset); |
|
122 | + $this->setHeader('Content-Type', 'text/html; charset='.$this->charset); |
|
123 | 123 | } |
124 | 124 | $this->outputHeader(); |
125 | 125 | http_response_code($this->statusCode); |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | if (isset($this->server['HTTP_HOST'])) { |
84 | 84 | $host = $this->server['HTTP_HOST']; |
85 | 85 | $protocol = $this->getProtocol(); |
86 | - $url = $protocol . '://' . $host . $url; |
|
86 | + $url = $protocol.'://'.$host.$url; |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | $url = rtrim($url, '/'); |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | */ |
119 | 119 | public function url($url) |
120 | 120 | { |
121 | - return $this->getBaseUrl() . '/' . ltrim($url, '/'); |
|
121 | + return $this->getBaseUrl().'/'.ltrim($url, '/'); |
|
122 | 122 | } |
123 | 123 | |
124 | 124 | /** |
@@ -84,14 +84,14 @@ discard block |
||
84 | 84 | defined('PHILE_VERSION') || define('PHILE_VERSION', '1.6.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 { |