1 | <?php |
||
13 | class InstanceHelper |
||
14 | { |
||
15 | /** |
||
16 | * @var \Rougin\Credo\Credo |
||
17 | */ |
||
18 | protected static $credo; |
||
19 | |||
20 | /** |
||
21 | * Factory method to create Credo instance. |
||
22 | * |
||
23 | * @param \CI_DB_query_builder|null $database |
||
24 | * @return void |
||
25 | */ |
||
26 | 3 | public static function create($database = null) |
|
32 | |||
33 | /** |
||
34 | * Returns the Credo instance. |
||
35 | * |
||
36 | * @return \Rougin\Credo\Credo |
||
37 | */ |
||
38 | 15 | public static function get() |
|
46 | } |
||
47 |
It seems like you allow that null is being passed for a parameter, however the function which is called does not seem to accept null.
We recommend to add an additional type check (or disallow null for the parameter):