Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
samdark committed Feb 12, 2025
1 parent c890b27 commit 77b916e
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use Psr\Container\NotFoundExceptionInterface;
use Throwable;
use Yiisoft\Definitions\ArrayDefinition;
use Yiisoft\Definitions\Contract\DefinitionInterface;
use Yiisoft\Definitions\DefinitionStorage;
use Yiisoft\Definitions\Exception\CircularReferenceException;
use Yiisoft\Definitions\Exception\InvalidConfigException;
Expand Down Expand Up @@ -237,13 +236,6 @@ private function prepareStateResetter(string $id)
*/
private function addDefinition(string $id, mixed $definition): void
{
// Skip parsing if already a valid definition
if ($definition instanceof DefinitionInterface) {
$this->addDefinitionToStorage($id, $definition);
unset($this->instances[$id]);
return;
}

[$definition, $meta] = DefinitionParser::parse($definition);
if ($this->validate) {
$this->validateDefinition($definition, $id);
Expand Down

0 comments on commit 77b916e

Please sign in to comment.