Skip to content

Commit

Permalink
Revert check for existence of a property
Browse files Browse the repository at this point in the history
  • Loading branch information
kocsismate committed Aug 19, 2023
1 parent 9565511 commit 7d933a2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/AbstractCompiledContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
use Closure;
use Psr\Container\ContainerInterface;

use function property_exists;

abstract class AbstractCompiledContainer implements ContainerInterface
{
/** @var array<string, object> */
Expand All @@ -20,9 +18,7 @@ protected function setClassProperties(object $object, array $properties): object
Closure::bind(
static function () use ($object, $properties): void {
foreach ($properties as $name => $value) {
if (property_exists($object, $name)) {
$object->$name = $value;
}
$object->$name = $value;
}
},
null,
Expand Down

0 comments on commit 7d933a2

Please sign in to comment.