Migrates to Pint

This commit is contained in:
Nuno Maduro
2022-09-16 10:45:53 +01:00
parent 579b975318
commit e9564febaf
94 changed files with 413 additions and 471 deletions

View File

@ -35,13 +35,12 @@ final class Container
/**
* Gets a dependency from the container.
*
* @param class-string $id
*
* @param class-string $id
* @return mixed
*/
public function get(string $id)
{
if (!array_key_exists($id, $this->instances)) {
if (! array_key_exists($id, $this->instances)) {
$this->instances[$id] = $this->build($id);
}
@ -51,7 +50,7 @@ final class Container
/**
* Adds the given instance to the container.
*
* @param mixed $instance
* @param mixed $instance
*/
public function add(string $id, $instance): void
{
@ -61,7 +60,7 @@ final class Container
/**
* Tries to build the given instance.
*
* @param class-string $id
* @param class-string $id
*/
private function build(string $id): object
{