Skip to content
Snippets Groups Projects
Verified Commit 2f91df31 authored by Bartek Jaskulski's avatar Bartek Jaskulski
Browse files

refactor: simplify creation of ArrayBindingLoader

parent 3de0152f
No related branches found
No related tags found
2 merge requests!3improve into wp-hook and some additional unfinished things,!21.x
...@@ -12,15 +12,12 @@ class ArrayBindingLoader implements BindingDefinitions { ...@@ -12,15 +12,12 @@ class ArrayBindingLoader implements BindingDefinitions {
/** @var array */ /** @var array */
private $bindings; private $bindings;
/** /** @var DefinitionFactory */
* @var DefinitionFactory
*/
private $factory; private $factory;
public function __construct( array $bindings, ?DefinitionFactory $factory = null) {
public function __construct( array $bindings, DefinitionFactory $factory ) {
$this->bindings = $bindings; $this->bindings = $bindings;
$this->factory = $factory; $this->factory = $factory ?? new DefinitionFactory();
} }
public function load(): iterable { public function load(): iterable {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment