@@ -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', |
@@ -14,23 +14,23 @@ |
||
14 | 14 | defined('PHILE_VERSION') || define('PHILE_VERSION', '1.8.0'); |
15 | 15 | defined('PHILE_CLI_MODE') || define('PHILE_CLI_MODE', (php_sapi_name() === 'cli')); |
16 | 16 | defined('DS') || define('DS', DIRECTORY_SEPARATOR); |
17 | -defined('ROOT_DIR') || define('ROOT_DIR', realpath(__DIR__ . DS . '..' . DS . '..' . DS) . DS); |
|
18 | -defined('LIB_DIR') || define('LIB_DIR', ROOT_DIR . 'lib' . DS); |
|
19 | -defined('PLUGINS_DIR') || define('PLUGINS_DIR', ROOT_DIR . 'plugins' . DS); |
|
20 | -defined('THEMES_DIR') || define('THEMES_DIR', ROOT_DIR . 'themes' . DS); |
|
21 | -defined('CACHE_DIR') || define('CACHE_DIR', LIB_DIR . 'cache' . DS); |
|
22 | -defined('STORAGE_DIR') || define('STORAGE_DIR', LIB_DIR . 'datastorage' . DS); |
|
17 | +defined('ROOT_DIR') || define('ROOT_DIR', realpath(__DIR__.DS.'..'.DS.'..'.DS).DS); |
|
18 | +defined('LIB_DIR') || define('LIB_DIR', ROOT_DIR.'lib'.DS); |
|
19 | +defined('PLUGINS_DIR') || define('PLUGINS_DIR', ROOT_DIR.'plugins'.DS); |
|
20 | +defined('THEMES_DIR') || define('THEMES_DIR', ROOT_DIR.'themes'.DS); |
|
21 | +defined('CACHE_DIR') || define('CACHE_DIR', LIB_DIR.'cache'.DS); |
|
22 | +defined('STORAGE_DIR') || define('STORAGE_DIR', LIB_DIR.'datastorage'.DS); |
|
23 | 23 | // phpcs:enable |
24 | 24 | |
25 | 25 | /** |
26 | 26 | * initialize the autoloader |
27 | 27 | */ |
28 | 28 | // load from phile core |
29 | -spl_autoload_register(function ($className) { |
|
30 | - $fileName = LIB_DIR . str_replace("\\", DS, $className) . '.php'; |
|
29 | +spl_autoload_register(function($className) { |
|
30 | + $fileName = LIB_DIR.str_replace("\\", DS, $className).'.php'; |
|
31 | 31 | if (file_exists($fileName)) { |
32 | 32 | require_once $fileName; |
33 | 33 | } |
34 | 34 | }); |
35 | 35 | // load from composer |
36 | -require(LIB_DIR . 'vendor' . DS . 'autoload.php'); |
|
36 | +require(LIB_DIR.'vendor'.DS.'autoload.php'); |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | { |
89 | 89 | list($vendor, $pluginName) = explode('\\', $pluginKey); |
90 | 90 | // uppercase first letter convention |
91 | - $pluginClassName = '\\Phile\\Plugin\\' . ucfirst($vendor) . '\\' . ucfirst($pluginName) . '\\Plugin'; |
|
91 | + $pluginClassName = '\\Phile\\Plugin\\'.ucfirst($vendor).'\\'.ucfirst($pluginName).'\\Plugin'; |
|
92 | 92 | |
93 | 93 | if (!class_exists($pluginClassName)) { |
94 | 94 | throw new PluginException( |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | $classNameParts |
142 | 142 | ); |
143 | 143 | |
144 | - $fileName = $this->directory . implode(DS, $classPath) . '.php'; |
|
144 | + $fileName = $this->directory.implode(DS, $classPath).'.php'; |
|
145 | 145 | if (file_exists($fileName)) { |
146 | 146 | include_once $fileName; |
147 | 147 | } |
@@ -75,8 +75,8 @@ |
||
75 | 75 | { |
76 | 76 | $this->config = []; |
77 | 77 | $files = [ |
78 | - 'default' => ROOT_DIR . 'default_config.php', |
|
79 | - 'local' => ROOT_DIR . 'config.php' |
|
78 | + 'default' => ROOT_DIR.'default_config.php', |
|
79 | + 'local' => ROOT_DIR.'config.php' |
|
80 | 80 | ]; |
81 | 81 | foreach ($files as $file) { |
82 | 82 | $cfg = include $file; |
@@ -6,7 +6,7 @@ |
||
6 | 6 | * @package Phile |
7 | 7 | */ |
8 | 8 | |
9 | -require_once __DIR__ . '/lib/Phile/bootstrap.php'; |
|
9 | +require_once __DIR__.'/lib/Phile/bootstrap.php'; |
|
10 | 10 | |
11 | 11 | ob_start(); |
12 | 12 |