Skip to content

Commit 0e19053

Browse files
committed
fix: propagate ignoreDefaultValue to FromTypeAttributes
1 parent 4329ee8 commit 0e19053

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Core/Fake/Faker.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,12 @@ private function resolveParameters(array $parameters, Set $presets): Set
247247
$fromDefaultValue = $this->ignoreFromDefaultValue
248248
? null
249249
: new FromDefaultValue($this->notation, $this->formatters, $this->locale);
250+
$fromTypeAttributes = new FromTypeAttributes(
251+
$this->notation,
252+
$this->formatters,
253+
$this->locale,
254+
$this->ignoreFromDefaultValue
255+
);
250256
foreach ($parameters as $parameter) {
251257
$field = $this->casedField($parameter);
252258
$generated = (new FromDependency(
@@ -258,7 +264,7 @@ private function resolveParameters(array $parameters, Set $presets): Set
258264
->then(new FromTypeDate($this->notation, $this->formatters, $this->locale))
259265
->then(new FromCollection($this->notation, $this->formatters, $this->locale))
260266
->then(new FromTypeBuiltin($this->notation, $this->formatters, $this->locale))
261-
->then(new FromTypeAttributes($this->notation, $this->formatters, $this->locale))
267+
->then($fromTypeAttributes)
262268
->then(new FromEnum($this->notation, $this->formatters, $this->locale))
263269
->then($fromDefaultValue)
264270
->then(new FromPreset($this->notation, $this->formatters, $this->locale))

0 commit comments

Comments
 (0)