@@ -59,7 +59,7 @@ |
||
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
62 | - * @return null|string The file_path set for the File instance |
|
62 | + * @return string The file_path set for the File instance |
|
63 | 63 | */ |
64 | 64 | public function getFilePath() |
65 | 65 | { |
@@ -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; |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | |
230 | 230 | if ($locked) { |
231 | 231 | $now = date('Y-m-d H:i:s'); |
232 | - $this->file_pointer->fwrite("$now : $message" . "\r\n"); |
|
232 | + $this->file_pointer->fwrite("$now : $message"."\r\n"); |
|
233 | 233 | $this->file_pointer->flock(LOCK_UN); |
234 | 234 | |
235 | 235 | return true; |
@@ -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/"); |
@@ -4,14 +4,14 @@ |
||
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 | //Pre-load logger classes for autoloader logging! |
11 | -require DILMUN_SOURCE_DIR . "Nabu/Logger.php"; |
|
12 | -require DILMUN_SOURCE_DIR . "Nabu/StaticLogger.php"; |
|
13 | -require DILMUN_SOURCE_DIR . "Nabu/LoggerHandler/HandlerInterface.php"; |
|
14 | -require DILMUN_SOURCE_DIR . "Nabu/LoggerHandler/File.php"; |
|
11 | +require DILMUN_SOURCE_DIR."Nabu/Logger.php"; |
|
12 | +require DILMUN_SOURCE_DIR."Nabu/StaticLogger.php"; |
|
13 | +require DILMUN_SOURCE_DIR."Nabu/LoggerHandler/HandlerInterface.php"; |
|
14 | +require DILMUN_SOURCE_DIR."Nabu/LoggerHandler/File.php"; |
|
15 | 15 | |
16 | 16 | use Subreality\Dilmun\Nabu\Autoloader as std_loader; |
17 | 17 |
@@ -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 |
@@ -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("Inputs: 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; |
@@ -127,13 +127,13 @@ discard block |
||
127 | 127 | |
128 | 128 | foreach ($this->packages[$package_name] as $path) { |
129 | 129 | $converted_class = str_replace('\\', '/', $class_name); |
130 | - $class_path = $path . $converted_class . ".php"; |
|
130 | + $class_path = $path.$converted_class.".php"; |
|
131 | 131 | $this->logger->debug("Set up class path as {$class_path}"); |
132 | 132 | |
133 | 133 | if (file_exists($class_path)) { |
134 | 134 | $this->logger->debug("File {$class_path} exists"); |
135 | 135 | |
136 | - $this->logger->debug("Including " . $class_path); |
|
136 | + $this->logger->debug("Including ".$class_path); |
|
137 | 137 | /** @noinspection PhpIncludeInspection */ |
138 | 138 | include $class_path; |
139 | 139 |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | * |
63 | 63 | * @param callable $class class name as defined by PHP autoloading |
64 | 64 | * |
65 | - * @return bool|string The path to the class on success; otherwise false |
|
65 | + * @return false|string The path to the class on success; otherwise false |
|
66 | 66 | * otherwise. |
67 | 67 | */ |
68 | 68 | protected function includeClass($class) |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | * @param string $package_name The name of the package in Vendor\Package format |
114 | 114 | * @param string $class_name The full, relative name of the class with the vendor and package names stripped |
115 | 115 | * |
116 | - * @return bool|string The path to the class on success; otherwise false |
|
116 | + * @return string|false The path to the class on success; otherwise false |
|
117 | 117 | */ |
118 | 118 | protected function loadPackage($package_name, $class_name) |
119 | 119 | { |