Skip to content

Commit af2eba6

Browse files
committed
Return null since it is not a void function
1 parent 07d7380 commit af2eba6

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

system/Config/BaseService.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,8 @@ public static function injectMock(string $name, $mock)
235235
*
236236
* @param string $name
237237
* @param array $arguments
238+
*
239+
* @return mixed
238240
*/
239241
protected static function discoverServices(string $name, array $arguments)
240242
{
@@ -249,7 +251,7 @@ protected static function discoverServices(string $name, array $arguments)
249251

250252
if (empty($files))
251253
{
252-
return;
254+
return null;
253255
}
254256

255257
// Get instances of all service classes and cache them locally.
@@ -269,7 +271,7 @@ protected static function discoverServices(string $name, array $arguments)
269271

270272
if (! static::$services)
271273
{
272-
return;
274+
return null;
273275
}
274276

275277
// Try to find the desired service method
@@ -280,5 +282,7 @@ protected static function discoverServices(string $name, array $arguments)
280282
return $class::$name(...$arguments);
281283
}
282284
}
285+
286+
return null;
283287
}
284288
}

0 commit comments

Comments
 (0)