File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 8
8
/**
9
9
* Return the default value of the given value.
10
10
*/
11
- function value (mixed $ value , mixed ...$ args ): mixed
11
+ function value (mixed $ value , mixed ...$ params ): mixed
12
12
{
13
13
return $ value instanceof Closure || (is_object ($ value ) && is_callable ($ value ))
14
- ? $ value (...$ args )
14
+ ? $ value (...$ params )
15
15
: $ value ;
16
16
}
17
17
}
@@ -151,6 +151,13 @@ function isTrue(mixed $val, bool $return_null = false): ?bool
151
151
}
152
152
153
153
if (!function_exists ('instance ' )) {
154
+ /**
155
+ * @phpstan-param T|class-string<T>|null $instance
156
+ * @param mixed ...$params
157
+ * @phpstan-return T|null
158
+ *
159
+ * @template T as object
160
+ */
154
161
function instance (string |object |null $ instance , mixed ...$ params ): ?object
155
162
{
156
163
if (is_object ($ instance )) {
You can’t perform that action at this time.
0 commit comments