Skip to content

Commit

Permalink
minor #1972 Typo in LiveComponentHydrator.php (JeanDavidDaviet)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.x branch.

Discussion
----------

Typo in LiveComponentHydrator.php

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| Issues        | Typo
| License       | MIT

Small typo in the message error. "on" instead of "one"

Commits
-------

6384a5e Typo in LiveComponentHydrator.php
  • Loading branch information
javiereguiluz committed Jul 11, 2024
2 parents 280e95d + 6384a5e commit d7d425e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/LiveComponent/src/LiveComponentHydrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ private function dehydrateValue(mixed $value, LivePropMetadata $propMetadata, ob
$collectionClass = $propMetadata->collectionValueType()->getClassName();
foreach ($value as $key => $objectItem) {
if (!$objectItem instanceof $collectionClass) {
throw new \LogicException(\sprintf('The LiveProp "%s" on component "%s" is an array. We determined the array is full of %s objects, but at least on key had a different value of %s', $propMetadata->getName(), $parentObject::class, $collectionClass, get_debug_type($objectItem)));
throw new \LogicException(\sprintf('The LiveProp "%s" on component "%s" is an array. We determined the array is full of %s objects, but at least one key had a different value of %s', $propMetadata->getName(), $parentObject::class, $collectionClass, get_debug_type($objectItem)));
}

$value[$key] = $this->dehydrateObjectValue($objectItem, $collectionClass, $propMetadata->getFormat(), $parentObject);
Expand Down

0 comments on commit d7d425e

Please sign in to comment.