@@ -2,29 +2,29 @@ |
||
2 | 2 | /** |
3 | 3 | * @const DILMUN_BASE_DIR The base directory at which Dilmun resides |
4 | 4 | */ |
5 | -define('DILMUN_BASE_DIR', dirname(dirname(dirname(__FILE__))) . "/"); |
|
5 | +define('DILMUN_BASE_DIR', dirname(dirname(dirname(__FILE__)))."/"); |
|
6 | 6 | |
7 | 7 | /** |
8 | 8 | * @const DILMUN_SOURCE_DIR The source directory |
9 | 9 | */ |
10 | -define('DILMUN_SOURCE_DIR', DILMUN_BASE_DIR . "src/"); |
|
10 | +define('DILMUN_SOURCE_DIR', DILMUN_BASE_DIR."src/"); |
|
11 | 11 | |
12 | 12 | /** |
13 | 13 | * @const DILMUN_VENDOR_DIR The vendor directory |
14 | 14 | */ |
15 | -define('DILMUN_VENDOR_DIR', DILMUN_BASE_DIR . "vendor/"); |
|
15 | +define('DILMUN_VENDOR_DIR', DILMUN_BASE_DIR."vendor/"); |
|
16 | 16 | |
17 | 17 | /** |
18 | 18 | * @const DILMUN_LOGS_DIR The log directory |
19 | 19 | */ |
20 | -define('DILMUN_LOGS_DIR', DILMUN_BASE_DIR . "app/logs/"); |
|
20 | +define('DILMUN_LOGS_DIR', DILMUN_BASE_DIR."app/logs/"); |
|
21 | 21 | |
22 | 22 | /** |
23 | 23 | * @const DILMUN_CONFIG_DIR The configurations directory |
24 | 24 | */ |
25 | -define('DILMUN_CONFIG_DIR', DILMUN_BASE_DIR . "app/config/"); |
|
25 | +define('DILMUN_CONFIG_DIR', DILMUN_BASE_DIR."app/config/"); |
|
26 | 26 | |
27 | 27 | /** |
28 | 28 | * @const DILMUN_TEST_DIR The tests directory |
29 | 29 | */ |
30 | -define('DILMUN_TEST_DIR', DILMUN_BASE_DIR . "tests/"); |
|
30 | +define('DILMUN_TEST_DIR', DILMUN_BASE_DIR."tests/"); |
@@ -165,7 +165,7 @@ |
||
165 | 165 | $replace = array(); |
166 | 166 | |
167 | 167 | foreach ($context as $key => $value) { |
168 | - $templated = "{" . $key . "}"; |
|
168 | + $templated = "{".$key."}"; |
|
169 | 169 | $replace[$templated] = $value; |
170 | 170 | } |
171 | 171 |
@@ -4,18 +4,18 @@ |
||
4 | 4 | */ |
5 | 5 | |
6 | 6 | require "config/app_constants.php"; |
7 | -require DILMUN_VENDOR_DIR . "autoload.php"; |
|
8 | -require DILMUN_SOURCE_DIR . "Nabu/Autoloader.php"; |
|
7 | +require DILMUN_VENDOR_DIR."autoload.php"; |
|
8 | +require DILMUN_SOURCE_DIR."Nabu/Autoloader.php"; |
|
9 | 9 | |
10 | 10 | /** |
11 | 11 | * @todo Pull this out somehow so that logging on bootstrap is more abstract |
12 | 12 | */ |
13 | 13 | //Pre-load logger classes for autoloader logging! |
14 | -require DILMUN_SOURCE_DIR . "Nabu/Logger.php"; |
|
15 | -require DILMUN_SOURCE_DIR . "Nabu/StaticLogger.php"; |
|
16 | -require DILMUN_SOURCE_DIR . "Nabu/LoggerHandler/HandlerInterface.php"; |
|
17 | -require DILMUN_SOURCE_DIR . "Nabu/LoggerHandler/File.php"; |
|
18 | -require DILMUN_SOURCE_DIR . "Nabu/LoggerHandler/System.php"; |
|
14 | +require DILMUN_SOURCE_DIR."Nabu/Logger.php"; |
|
15 | +require DILMUN_SOURCE_DIR."Nabu/StaticLogger.php"; |
|
16 | +require DILMUN_SOURCE_DIR."Nabu/LoggerHandler/HandlerInterface.php"; |
|
17 | +require DILMUN_SOURCE_DIR."Nabu/LoggerHandler/File.php"; |
|
18 | +require DILMUN_SOURCE_DIR."Nabu/LoggerHandler/System.php"; |
|
19 | 19 | |
20 | 20 | use Subreality\Dilmun\Nabu\Autoloader; |
21 | 21 |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | $full_file = ""; |
177 | 177 | |
178 | 178 | if (isset($this->file_path)) { |
179 | - $full_file = $this->file_path . DIRECTORY_SEPARATOR; |
|
179 | + $full_file = $this->file_path.DIRECTORY_SEPARATOR; |
|
180 | 180 | } |
181 | 181 | |
182 | 182 | $full_file .= $this->file_name; |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | |
231 | 231 | if ($locked) { |
232 | 232 | $now = date('Y-m-d H:i:s'); |
233 | - $this->file_pointer->fwrite("$now : $message" . "\r\n"); |
|
233 | + $this->file_pointer->fwrite("$now : $message"."\r\n"); |
|
234 | 234 | $this->file_pointer->flock(LOCK_UN); |
235 | 235 | |
236 | 236 | return true; |
@@ -57,7 +57,7 @@ |
||
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
60 | - * @return string|null The file_path set for the File instance |
|
60 | + * @return string The file_path set for the File instance |
|
61 | 61 | */ |
62 | 62 | public function getFilePath() |
63 | 63 | { |
@@ -9,6 +9,9 @@ discard block |
||
9 | 9 | */ |
10 | 10 | interface HandlerInterface |
11 | 11 | { |
12 | + /** |
|
13 | + * @return boolean |
|
14 | + */ |
|
12 | 15 | public function initialize(); |
13 | 16 | |
14 | 17 | /** |
@@ -17,7 +20,13 @@ discard block |
||
17 | 20 | */ |
18 | 21 | public function write($message); |
19 | 22 | |
23 | + /** |
|
24 | + * @return void |
|
25 | + */ |
|
20 | 26 | public function suppressOutput(); |
21 | 27 | |
28 | + /** |
|
29 | + * @return void |
|
30 | + */ |
|
22 | 31 | public function allowOutput(); |
23 | 32 | } |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | */ |
34 | 34 | public function register() |
35 | 35 | { |
36 | - spl_autoload_register(array($this,"includeClass")); |
|
36 | + spl_autoload_register(array($this, "includeClass")); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | /** |
@@ -46,10 +46,10 @@ discard block |
||
46 | 46 | $this->logger->debug("Parameters: package = {$package}, path = {$path}"); |
47 | 47 | |
48 | 48 | $package = trim($package, "\\"); |
49 | - $package = $package . "\\"; |
|
49 | + $package = $package."\\"; |
|
50 | 50 | |
51 | 51 | $path = rtrim($path, "/"); |
52 | - $path = $path . "/"; |
|
52 | + $path = $path."/"; |
|
53 | 53 | |
54 | 54 | $this->logger->debug("Registering index {$package} with {$path}"); |
55 | 55 | $this->packages[$package][] = $path; |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | |
112 | 112 | foreach ($this->packages[$package_name] as $path) { |
113 | 113 | $converted_class = str_replace('\\', '/', $class_name); |
114 | - $class_path = $path . $converted_class . ".php"; |
|
114 | + $class_path = $path.$converted_class.".php"; |
|
115 | 115 | |
116 | 116 | $this->logger->debug("Class file path is {$class_path}"); |
117 | 117 |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | */ |
43 | 43 | public function registerPackages($package, $path) |
44 | 44 | { |
45 | - $this->logger->info("Preparing {$package} package for registration."); |
|
45 | + $this->logger->info("preparing {$package} package for registration."); |
|
46 | 46 | $this->logger->debug("Parameters: package = {$package}, path = {$path}"); |
47 | 47 | |
48 | 48 | $package = trim($package, "\\"); |
@@ -116,14 +116,14 @@ discard block |
||
116 | 116 | $this->logger->debug("Class file path is {$class_path}"); |
117 | 117 | |
118 | 118 | if (file_exists($class_path)) { |
119 | - $this->logger->debug("File {$class_path} exists; including file"); |
|
119 | + $this->logger->debug("file {$class_path} exists; including file"); |
|
120 | 120 | |
121 | 121 | /** @noinspection PhpIncludeInspection */ |
122 | 122 | include $class_path; |
123 | 123 | |
124 | 124 | $this->logger->info("Completed loading {$class_path}"); |
125 | 125 | } else { |
126 | - $this->logger->debug("File {$class_path} does not exist"); |
|
126 | + $this->logger->debug("file {$class_path} does not exist"); |
|
127 | 127 | |
128 | 128 | $class_path = false; |
129 | 129 | } |