Skip to content

Commit dc82547

Browse files
authored
Update functions.php
1 parent 7d2e69e commit dc82547

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/functions.php

+2-5
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,9 @@
1313
* @throws ContainerExceptionInterface Error while retrieving the entry.
1414
* @return mixed
1515
*/
16-
function cget(ContainerInterface $container, string $id, $default = null, bool $invokable = true): mixed
16+
function cget(ContainerInterface $container, string $id, mixed $default = null, bool $invokable = true): mixed
1717
{
18-
if ($container->has($id)) {
19-
return $container->get($id);
20-
}
21-
18+
if ($container->has($id)) return $container->get($id);
2219
return $invokable && is_callable($default) ? $default($container) : $default ;
2320
}
2421

0 commit comments

Comments
 (0)