File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed
Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change 3131 *
3232 * ALTERNATIVE APPROACH: Return tool class names.
3333 * WARNING: This requires tools to be registered as public services.
34- *
3534 * @example Returning class names (NOT RECOMMENDED - requires public services):
3635 * ```php
3736 * public function getTools(): iterable
5453 * - ✅ Better performance (tools instantiated once during compilation)
5554 * - ✅ Type safety with constructor injection
5655 * - ✅ Follows Symfony best practices
57- *
5856 * @example Registration in services.yaml:
5957 * ```yaml
6058 * services:
Original file line number Diff line number Diff line change @@ -33,15 +33,15 @@ class ToolRepository
3333 /**
3434 * The logger instance.
3535 */
36- protected LoggerInterface | null $ logger ;
36+ protected ? LoggerInterface $ logger ;
3737
3838 /**
3939 * Constructor.
4040 *
4141 * @param ContainerInterface $container The Symfony service container. If null, it resolves from the facade.
4242 * @param LoggerInterface|null $logger Optional logger instance for debugging tool registration.
4343 */
44- public function __construct (ContainerInterface $ container , LoggerInterface | null $ logger = null )
44+ public function __construct (ContainerInterface $ container , ? LoggerInterface $ logger = null )
4545 {
4646 $ this ->container = $ container ;
4747 $ this ->logger = $ logger ;
You can’t perform that action at this time.
0 commit comments