Skip to content

Commit

Permalink
Issue #110: Use regular closure to make code more readable.
Browse files Browse the repository at this point in the history
  • Loading branch information
donquixote committed Dec 2, 2024
1 parent 4553faa commit 5cd7569
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/src/OckServicesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,12 @@ protected function createExporter(): Exporter_ToYamlArray {
->withDefaultObject(new Alias('#'))
->withDefaultObjectFactory(
Definition::class,
fn (string|int|null $key) => (new Definition(is_string($key) ? $key : null))
->setAutoconfigured(true)
->setAutowired(true),
function (string|int|null $key) {
$class = is_string($key) ? $key : null;
return (new Definition($class))
->setAutoconfigured(true)
->setAutowired(true);
},
);
}

Expand Down

0 comments on commit 5cd7569

Please sign in to comment.