-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Labels
Description
Hi!
I was curious and had a look at the package ;) Just one thing I noticed in your config:
Color::class => factory(function (ContainerInterface $c) {
$colors = new Color;
$colors->setForceStyle(true);
return $colors;
}),
You can remove factory()
, if a definition is a closure then it's implicitly interpreted as a factory by PHP-DI:
Color::class => function (ContainerInterface $c) {
$colors = new Color;
$colors->setForceStyle(true);
return $colors;
},
Also you can skip the $c
parameter if you don't use it (it's not required). That's just a matter of preference of course.
That's all, feel free to close that issue once you read since it was just a comment!
mikeymike