Skip to content

Commit 5fcc06d

Browse files
committed
Container: added initialize()
1 parent dc0e9f7 commit 5fcc06d

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/DI/Container.php

+5
Original file line numberDiff line numberDiff line change
@@ -369,4 +369,9 @@ public static function getMethodName(string $name): string
369369

370370
return 'createService' . str_replace('.', '__', ucfirst($name));
371371
}
372+
373+
374+
public function initialize(): void
375+
{
376+
}
372377
}

src/DI/PhpGenerator.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ public function generate(string $className): Php\ClassType
6666
->setReturnType($className)
6767
->setBody('return $this;');
6868

69-
$class->addMethod('initialize');
69+
$class->addMethod('initialize')
70+
->setReturnType('void');
7071

7172
return $class;
7273
}

0 commit comments

Comments
 (0)