@@ -173,53 +173,53 @@ |
||
173 | 173 | } |
174 | 174 | |
175 | 175 | /** |
176 | - * Magic method. Searches for the given variable and returns its value. |
|
177 | - * |
|
178 | - * @param string $key Variable name |
|
179 | - * |
|
180 | - * @return mixed |
|
181 | - */ |
|
182 | - public function __get($key) |
|
183 | - { |
|
184 | - return $this->get($key); |
|
185 | - } |
|
186 | - |
|
187 | - /** |
|
188 | - * Magic method. Calls [$this->set] with the same parameters. |
|
189 | - * |
|
190 | - * @param string $key Variable name |
|
191 | - * @param mixed $value Value |
|
192 | - * |
|
193 | - * @return void |
|
194 | - */ |
|
195 | - public function __set($key, $value) |
|
196 | - { |
|
197 | - $this->offsetSet($key, $value); |
|
198 | - } |
|
199 | - |
|
200 | - /** |
|
201 | - * Magic method. Determines if a variable is set. |
|
202 | - * |
|
203 | - * @param string $key variable name |
|
204 | - * |
|
205 | - * @return boolean |
|
206 | - */ |
|
207 | - public function __isset($key) |
|
208 | - { |
|
209 | - return $this->offsetExists($key); |
|
210 | - } |
|
211 | - |
|
212 | - /** |
|
213 | - * Magic method. Unsets a given variable. |
|
214 | - * |
|
215 | - * @param string $key Variable name |
|
216 | - * |
|
217 | - * @return void |
|
218 | - */ |
|
219 | - public function __unset($key) |
|
220 | - { |
|
221 | - $this->offsetUnset($$key); |
|
222 | - } |
|
176 | + * Magic method. Searches for the given variable and returns its value. |
|
177 | + * |
|
178 | + * @param string $key Variable name |
|
179 | + * |
|
180 | + * @return mixed |
|
181 | + */ |
|
182 | + public function __get($key) |
|
183 | + { |
|
184 | + return $this->get($key); |
|
185 | + } |
|
186 | + |
|
187 | + /** |
|
188 | + * Magic method. Calls [$this->set] with the same parameters. |
|
189 | + * |
|
190 | + * @param string $key Variable name |
|
191 | + * @param mixed $value Value |
|
192 | + * |
|
193 | + * @return void |
|
194 | + */ |
|
195 | + public function __set($key, $value) |
|
196 | + { |
|
197 | + $this->offsetSet($key, $value); |
|
198 | + } |
|
199 | + |
|
200 | + /** |
|
201 | + * Magic method. Determines if a variable is set. |
|
202 | + * |
|
203 | + * @param string $key variable name |
|
204 | + * |
|
205 | + * @return boolean |
|
206 | + */ |
|
207 | + public function __isset($key) |
|
208 | + { |
|
209 | + return $this->offsetExists($key); |
|
210 | + } |
|
211 | + |
|
212 | + /** |
|
213 | + * Magic method. Unsets a given variable. |
|
214 | + * |
|
215 | + * @param string $key Variable name |
|
216 | + * |
|
217 | + * @return void |
|
218 | + */ |
|
219 | + public function __unset($key) |
|
220 | + { |
|
221 | + $this->offsetUnset($$key); |
|
222 | + } |
|
223 | 223 | |
224 | 224 | /** |
225 | 225 | * Handle dynamic calls to the container to set attributes. |
@@ -39,13 +39,13 @@ |
||
39 | 39 | */ |
40 | 40 | public function register() |
41 | 41 | { |
42 | - $this->app->singleton('redis', function ($app) { |
|
42 | + $this->app->singleton('redis', function($app) { |
|
43 | 43 | $config = $app['config']->get('database.redis', []); |
44 | 44 | |
45 | 45 | return new RedisManager($config); |
46 | 46 | }); |
47 | 47 | |
48 | - $this->app->bind('redis.connection', function ($app) { |
|
48 | + $this->app->bind('redis.connection', function($app) { |
|
49 | 49 | return $app['redis']->connection(); |
50 | 50 | }); |
51 | 51 | } |
@@ -88,6 +88,6 @@ |
||
88 | 88 | public static function longVersion() |
89 | 89 | { |
90 | 90 | return self::COPY.' '.self::YEAR.' '.self::COPYRIGHT.' - '.self::PRODUCT.' ' .self::RELEASE. ' '. |
91 | - self::STATUS.' [ '.self::CODENAME.' ] '.self::RELEASEDATE; |
|
91 | + self::STATUS.' [ '.self::CODENAME.' ] '.self::RELEASEDATE; |
|
92 | 92 | } |
93 | 93 | } |
94 | 94 | \ No newline at end of file |
@@ -87,7 +87,7 @@ |
||
87 | 87 | */ |
88 | 88 | public static function longVersion() |
89 | 89 | { |
90 | - return self::COPY.' '.self::YEAR.' '.self::COPYRIGHT.' - '.self::PRODUCT.' ' .self::RELEASE. ' '. |
|
90 | + return self::COPY.' '.self::YEAR.' '.self::COPYRIGHT.' - '.self::PRODUCT.' '.self::RELEASE.' '. |
|
91 | 91 | self::STATUS.' [ '.self::CODENAME.' ] '.self::RELEASEDATE; |
92 | 92 | } |
93 | 93 | } |
94 | 94 | \ No newline at end of file |
@@ -22,11 +22,21 @@ |
||
22 | 22 | */ |
23 | 23 | |
24 | 24 | // Define the absolute paths for configured directories |
25 | -if ( ! defined('APP_PATH')) define('APP_PATH', realpath($paths['path.app']).DIRECTORY_SEPARATOR); |
|
26 | -if ( ! defined('BST_PATH')) define('BST_PATH', realpath($paths['path.bootstrap']).DIRECTORY_SEPARATOR); |
|
27 | -if ( ! defined('CON_PATH')) define('CON_PATH', realpath($paths['path.config']).DIRECTORY_SEPARATOR); |
|
28 | -if ( ! defined('RES_PATH')) define('RES_PATH', realpath($paths['path.resources']).DIRECTORY_SEPARATOR); |
|
29 | -if ( ! defined('SYS_PATH')) define('SYS_PATH', realpath($paths['path.sys']).DIRECTORY_SEPARATOR); |
|
25 | +if ( ! defined('APP_PATH')) { |
|
26 | + define('APP_PATH', realpath($paths['path.app']).DIRECTORY_SEPARATOR); |
|
27 | +} |
|
28 | +if ( ! defined('BST_PATH')) { |
|
29 | + define('BST_PATH', realpath($paths['path.bootstrap']).DIRECTORY_SEPARATOR); |
|
30 | +} |
|
31 | +if ( ! defined('CON_PATH')) { |
|
32 | + define('CON_PATH', realpath($paths['path.config']).DIRECTORY_SEPARATOR); |
|
33 | +} |
|
34 | +if ( ! defined('RES_PATH')) { |
|
35 | + define('RES_PATH', realpath($paths['path.resources']).DIRECTORY_SEPARATOR); |
|
36 | +} |
|
37 | +if ( ! defined('SYS_PATH')) { |
|
38 | + define('SYS_PATH', realpath($paths['path.sys']).DIRECTORY_SEPARATOR); |
|
39 | +} |
|
30 | 40 | |
31 | 41 | // Call the file constants |
32 | 42 | require CON_PATH.'constants.php'; |
@@ -41,7 +41,7 @@ |
||
41 | 41 | */ |
42 | 42 | public function processColumnListing($results) |
43 | 43 | { |
44 | - return array_map(function ($result) { |
|
44 | + return array_map(function($result) { |
|
45 | 45 | return ((object) $result)->column_name; |
46 | 46 | }, $results); |
47 | 47 | } |
@@ -41,7 +41,7 @@ |
||
41 | 41 | */ |
42 | 42 | public function processColumnListing($results) |
43 | 43 | { |
44 | - return array_map(function ($result) { |
|
44 | + return array_map(function($result) { |
|
45 | 45 | return ((object) $result)->column_name; |
46 | 46 | }, $results); |
47 | 47 | } |
@@ -32,126 +32,126 @@ |
||
32 | 32 | */ |
33 | 33 | class AutoloadConfig |
34 | 34 | { |
35 | - /** |
|
36 | - * Map of class names and locations. |
|
37 | - * |
|
38 | - * @var array $classmap |
|
39 | - */ |
|
40 | - public $classmap = []; |
|
35 | + /** |
|
36 | + * Map of class names and locations. |
|
37 | + * |
|
38 | + * @var array $classmap |
|
39 | + */ |
|
40 | + public $classmap = []; |
|
41 | 41 | |
42 | - /** |
|
43 | - * If true, then auto-enabled will happen across all namespaces |
|
44 | - * loaded by Composer, as well as the namespaces configured locally. |
|
45 | - * |
|
46 | - * @var bool $enabledInComposer |
|
47 | - */ |
|
48 | - public $enabledInComposer = true; |
|
42 | + /** |
|
43 | + * If true, then auto-enabled will happen across all namespaces |
|
44 | + * loaded by Composer, as well as the namespaces configured locally. |
|
45 | + * |
|
46 | + * @var bool $enabledInComposer |
|
47 | + */ |
|
48 | + public $enabledInComposer = true; |
|
49 | 49 | |
50 | - /** |
|
51 | - * Array of files for autoloading. |
|
52 | - * |
|
53 | - * @var array $includeFiles |
|
54 | - */ |
|
55 | - public $includeFiles = []; |
|
50 | + /** |
|
51 | + * Array of files for autoloading. |
|
52 | + * |
|
53 | + * @var array $includeFiles |
|
54 | + */ |
|
55 | + public $includeFiles = []; |
|
56 | 56 | |
57 | - /** |
|
58 | - * Array of namespaces for autoloading. |
|
59 | - * |
|
60 | - * @var array $psr4 |
|
61 | - */ |
|
62 | - public $psr4 = []; |
|
57 | + /** |
|
58 | + * Array of namespaces for autoloading. |
|
59 | + * |
|
60 | + * @var array $psr4 |
|
61 | + */ |
|
62 | + public $psr4 = []; |
|
63 | 63 | |
64 | - /** |
|
65 | - * Constructor. |
|
66 | - */ |
|
67 | - public function __construct() |
|
68 | - { |
|
69 | - /** |
|
70 | - * --------------------------------------------------------------------- |
|
71 | - * Namespaces |
|
72 | - * --------------------------------------------------------------------- |
|
73 | - * |
|
74 | - * This maps the locations of any namespaces in your application to |
|
75 | - * their location on the file system. These are used by the Autoloader |
|
76 | - * to locate files the first time they have been instantiated. |
|
77 | - * |
|
78 | - */ |
|
79 | - $this->psr4 = require SYS_PATH.'src'.DIRECTORY_SEPARATOR.'register'.DIRECTORY_SEPARATOR.'autoloadPsr4.php'; |
|
64 | + /** |
|
65 | + * Constructor. |
|
66 | + */ |
|
67 | + public function __construct() |
|
68 | + { |
|
69 | + /** |
|
70 | + * --------------------------------------------------------------------- |
|
71 | + * Namespaces |
|
72 | + * --------------------------------------------------------------------- |
|
73 | + * |
|
74 | + * This maps the locations of any namespaces in your application to |
|
75 | + * their location on the file system. These are used by the Autoloader |
|
76 | + * to locate files the first time they have been instantiated. |
|
77 | + * |
|
78 | + */ |
|
79 | + $this->psr4 = require SYS_PATH.'src'.DIRECTORY_SEPARATOR.'register'.DIRECTORY_SEPARATOR.'autoloadPsr4.php'; |
|
80 | 80 | |
81 | - /** |
|
82 | - * --------------------------------------------------------------------- |
|
83 | - * Class Map |
|
84 | - * --------------------------------------------------------------------- |
|
85 | - * |
|
86 | - * The class map provides a map of class names and their exact location |
|
87 | - * on the drive. |
|
88 | - * |
|
89 | - */ |
|
90 | - $this->classmap = require SYS_PATH.'src'.DIRECTORY_SEPARATOR.'register'.DIRECTORY_SEPARATOR.'autoloadClassmap.php'; |
|
81 | + /** |
|
82 | + * --------------------------------------------------------------------- |
|
83 | + * Class Map |
|
84 | + * --------------------------------------------------------------------- |
|
85 | + * |
|
86 | + * The class map provides a map of class names and their exact location |
|
87 | + * on the drive. |
|
88 | + * |
|
89 | + */ |
|
90 | + $this->classmap = require SYS_PATH.'src'.DIRECTORY_SEPARATOR.'register'.DIRECTORY_SEPARATOR.'autoloadClassmap.php'; |
|
91 | 91 | |
92 | - /** |
|
93 | - * --------------------------------------------------------------------- |
|
94 | - * Include Files |
|
95 | - * --------------------------------------------------------------------- |
|
96 | - * |
|
97 | - * This maps the locations of any files in your application to |
|
98 | - * their location on the file system. |
|
99 | - * |
|
100 | - */ |
|
101 | - $this->includeFiles = require SYS_PATH.'src'.DIRECTORY_SEPARATOR.'register'.DIRECTORY_SEPARATOR.'autoloadFiles.php'; |
|
102 | - } |
|
92 | + /** |
|
93 | + * --------------------------------------------------------------------- |
|
94 | + * Include Files |
|
95 | + * --------------------------------------------------------------------- |
|
96 | + * |
|
97 | + * This maps the locations of any files in your application to |
|
98 | + * their location on the file system. |
|
99 | + * |
|
100 | + */ |
|
101 | + $this->includeFiles = require SYS_PATH.'src'.DIRECTORY_SEPARATOR.'register'.DIRECTORY_SEPARATOR.'autoloadFiles.php'; |
|
102 | + } |
|
103 | 103 | |
104 | - /** |
|
105 | - * Get the classes to filename map. |
|
106 | - * |
|
107 | - * @param array $classmap |
|
108 | - * |
|
109 | - * @return void |
|
110 | - */ |
|
111 | - public function addClassMap(array $classmap) |
|
112 | - { |
|
113 | - if (isset($this->classmap)) { |
|
114 | - $this->classmap = array_merge($this->classmap, $classmap); |
|
115 | - } else { |
|
116 | - $this->classmap = $classmap; |
|
117 | - } |
|
104 | + /** |
|
105 | + * Get the classes to filename map. |
|
106 | + * |
|
107 | + * @param array $classmap |
|
108 | + * |
|
109 | + * @return void |
|
110 | + */ |
|
111 | + public function addClassMap(array $classmap) |
|
112 | + { |
|
113 | + if (isset($this->classmap)) { |
|
114 | + $this->classmap = array_merge($this->classmap, $classmap); |
|
115 | + } else { |
|
116 | + $this->classmap = $classmap; |
|
117 | + } |
|
118 | 118 | |
119 | - return $this->classmap; |
|
120 | - } |
|
119 | + return $this->classmap; |
|
120 | + } |
|
121 | 121 | |
122 | - /** |
|
123 | - * Get the filename map. |
|
124 | - * |
|
125 | - * @param array $files |
|
126 | - * |
|
127 | - * @return void |
|
128 | - */ |
|
129 | - public function addFiles(array $files) |
|
130 | - { |
|
131 | - if (isset($this->includeFiles)) { |
|
132 | - $this->includeFiles = array_merge($this->includeFiles, $files); |
|
133 | - } else { |
|
134 | - $this->includeFiles = $files; |
|
135 | - } |
|
122 | + /** |
|
123 | + * Get the filename map. |
|
124 | + * |
|
125 | + * @param array $files |
|
126 | + * |
|
127 | + * @return void |
|
128 | + */ |
|
129 | + public function addFiles(array $files) |
|
130 | + { |
|
131 | + if (isset($this->includeFiles)) { |
|
132 | + $this->includeFiles = array_merge($this->includeFiles, $files); |
|
133 | + } else { |
|
134 | + $this->includeFiles = $files; |
|
135 | + } |
|
136 | 136 | |
137 | - return $this->includeFiles; |
|
138 | - } |
|
137 | + return $this->includeFiles; |
|
138 | + } |
|
139 | 139 | |
140 | - /** |
|
141 | - * Registers a set of PSR-4 directories for a given namespace. |
|
142 | - * |
|
143 | - * @param array $psr4 |
|
144 | - * |
|
145 | - * @return void |
|
146 | - */ |
|
147 | - public function addPsr4(array $psr4) |
|
148 | - { |
|
149 | - if (isset($this->psr4)) { |
|
150 | - $this->psr4 = array_merge($this->psr4, $psr4); |
|
151 | - } else { |
|
152 | - $this->psr4 = $psr4; |
|
153 | - } |
|
140 | + /** |
|
141 | + * Registers a set of PSR-4 directories for a given namespace. |
|
142 | + * |
|
143 | + * @param array $psr4 |
|
144 | + * |
|
145 | + * @return void |
|
146 | + */ |
|
147 | + public function addPsr4(array $psr4) |
|
148 | + { |
|
149 | + if (isset($this->psr4)) { |
|
150 | + $this->psr4 = array_merge($this->psr4, $psr4); |
|
151 | + } else { |
|
152 | + $this->psr4 = $psr4; |
|
153 | + } |
|
154 | 154 | |
155 | - return $this->psr4; |
|
156 | - } |
|
155 | + return $this->psr4; |
|
156 | + } |
|
157 | 157 | } |
158 | 158 | \ No newline at end of file |
@@ -38,14 +38,14 @@ |
||
38 | 38 | */ |
39 | 39 | public function get(string $name); |
40 | 40 | |
41 | - /** |
|
42 | - * Set an environment variable. |
|
43 | - * |
|
44 | - * @param string $name |
|
45 | - * @param string $value |
|
46 | - * |
|
47 | - * @return bool |
|
48 | - */ |
|
41 | + /** |
|
42 | + * Set an environment variable. |
|
43 | + * |
|
44 | + * @param string $name |
|
45 | + * @param string $value |
|
46 | + * |
|
47 | + * @return bool |
|
48 | + */ |
|
49 | 49 | public function set(string $name, string $value); |
50 | 50 | |
51 | 51 | /** |
@@ -38,14 +38,14 @@ |
||
38 | 38 | */ |
39 | 39 | public function read(string $name); |
40 | 40 | |
41 | - /** |
|
42 | - * Write to an environment variable. |
|
43 | - * |
|
44 | - * @param string $name |
|
45 | - * @param string $value |
|
46 | - * |
|
47 | - * @return bool |
|
48 | - */ |
|
41 | + /** |
|
42 | + * Write to an environment variable. |
|
43 | + * |
|
44 | + * @param string $name |
|
45 | + * @param string $value |
|
46 | + * |
|
47 | + * @return bool |
|
48 | + */ |
|
49 | 49 | public function write(string $name, string $value); |
50 | 50 | |
51 | 51 | /** |