Skip to content

Commit 36524cf

Browse files
committed
update return type & type hinting
1 parent 21ed4b0 commit 36524cf

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

bootstrap/System/Api.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@
1111
class Api implements ApiInterface
1212
{
1313
/**
14-
* @var string
14+
* @var string|null
1515
*/
16-
public static string $prefix;
16+
public static ?string $prefix;
1717

1818
/**
1919
* @var string
2020
*/
21-
private static string $middleware;
21+
private static ?string $middleware = null;
2222

2323
/**
24-
* @var ApiHandler
24+
* @var ApiHandler|null
2525
*/
26-
private static ApiHandler $apiHandler;
26+
private static ?ApiHandler $apiHandler = null;
2727

2828
/**
2929
* setting up api prefix and middleware as array with $config

bootstrap/System/DependencyInjectionContainer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ public function call($callable, array $parameters = [])
6060
/**
6161
* initiate the class and return the instance.
6262
* @param string $id
63-
* @return mixed|string
63+
* @return object
6464
* @throws \ReflectionException
6565
*/
66-
public function get(string $id)
66+
public function get(string $id): object
6767
{
6868
if (!isset($this->instances[$id])) {
6969
$this->instances[$id] = $this->make($id);

0 commit comments

Comments
 (0)