Skip to content

Commit 1e05dbb

Browse files
committed
fix spelling error
1 parent 68bd1eb commit 1e05dbb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ValueObjects/ValueObject.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public static function fromRequest(FormRequest $request, bool $onlyValidated = t
4747
/** @var array<string, mixed> */
4848
$data = $onlyValidated ? $request->validated() : $request->all();
4949

50-
$args = collect($data)->only(static::getConstuctorArgs())->toArray();
50+
$args = collect($data)->only(static::getConstructorArgs())->toArray();
5151

5252
return new static(...$args); //@phpstan-ignore-line -- meant to be static
5353
}
@@ -56,7 +56,7 @@ public static function fromRequest(FormRequest $request, bool $onlyValidated = t
5656
*
5757
* @return Collection<int, string>
5858
*/
59-
protected static function getConstuctorArgs(): Collection
59+
protected static function getConstructorArgs(): Collection
6060
{
6161
return collect((new ReflectionClass(static::class))->getConstructor()?->getParameters() ?? [])
6262
->map(fn(ReflectionParameter $parameter) => $parameter->getName());
@@ -79,7 +79,7 @@ protected function validate(): void
7979

8080
public function toArray(): array
8181
{
82-
return static::getConstuctorArgs()
82+
return static::getConstructorArgs()
8383
->mapWithKeys(fn($property) => [$property => $this->{$property}])
8484
->toArray();
8585
}

0 commit comments

Comments
 (0)