You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/App.php
+11-11Lines changed: 11 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ public function __construct(array $userSettings = [])
43
43
44
44
if (!empty($this->config('scripts'))) {
45
45
foreach ($this->config('scripts') as$script) {
46
-
call_user_func($script, $this, Config::get());
46
+
\call_user_func($script, $this, Config::get());
47
47
}
48
48
49
49
$this->loadConfig();
@@ -170,7 +170,7 @@ public function __unset($name)
170
170
*/
171
171
publicfunctionconfig($name, $value = null)
172
172
{
173
-
if ($value === null && is_string($name)) {
173
+
if ($value === null && \is_string($name)) {
174
174
return Config::get($name);
175
175
}
176
176
@@ -185,7 +185,7 @@ public function config($name, $value = null)
185
185
*/
186
186
publicfunctionattach(callable$code)
187
187
{
188
-
call_user_func($code, $this, Config::get());
188
+
\call_user_func($code, $this, Config::get());
189
189
$this->loadConfig();
190
190
$this->setupErrorHandler();
191
191
}
@@ -223,10 +223,10 @@ public function setResponseClass($class)
223
223
*/
224
224
publicfunctioncors($options = [])
225
225
{
226
-
if (class_exists('Leaf\Http\Cors')) {
226
+
if (\class_exists('Leaf\Http\Cors')) {
227
227
Http\Cors::config($options);
228
228
} else {
229
-
trigger_error('Cors module not found! Run `leaf install cors` or `composer require leafs/cors` to install the CORS module. This is required to configure CORS.');
229
+
\trigger_error('Cors module not found! Run `leaf install cors` or `composer require leafs/cors` to install the CORS module. This is required to configure CORS.');
230
230
}
231
231
}
232
232
@@ -240,7 +240,7 @@ public function cors($options = [])
240
240
*/
241
241
publicfunctionws(string$name, callable$callback)
242
242
{
243
-
Config::set('eien.events', array_merge(
243
+
Config::set('eien.events', \array_merge(
244
244
Config::get('eien.events') ?? [],
245
245
[$name => $callback]
246
246
));
@@ -258,7 +258,7 @@ public function ws(string $name, callable $callback)
258
258
publicfunctionlogger()
259
259
{
260
260
if (!$this->log) {
261
-
trigger_error('You need to enable logging to use this feature! Set log.enabled to true and install the logger module');
261
+
\trigger_error('You need to enable logging to use this feature! Set log.enabled to true and install the logger module');
262
262
}
263
263
264
264
return$this->log;
@@ -308,7 +308,7 @@ public function response(): Http\Response
0 commit comments