Psalm
Get started
Documentation
Paid support
Plugins
Blog
GitHub
<?php interface ContainerInterface { /** * @template T of object * * @param class-string<T>|string $id Identifier of the entry to look for. * * @return ($id is class-string<T> ? T : mixed) Entry. */ public function get(string $id); /** * @param string $id Identifier of the entry to look for. * * @return bool */ public function has(string $id): bool; } function (ContainerInterface $container): void { $container->get(\DateTimeInterface::class)->getTimestamp(); $container->get(\DateTimeInterface::class)->boo(); $container->get('boo')->boo(); };
Snippet created on February 5 2024 at 15:16 UTC
Settings
Get link