Skip to content

Commit

Permalink
cs-fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhoelzel committed Apr 25, 2024
1 parent f5ffee1 commit f577ce5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Component/ComponentItemFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ private function createFakeParamValues(array $parameters, array $variation): arr
if (\is_array($type)) {
$paramValue[$name] = $this->createVariationParameters($type, $variation[$name] ?? []);
} else {
if (array_key_exists($name, $variation) && is_null($variation[$name])) {
if (\array_key_exists($name, $variation) && null === $variation[$name]) {
$paramValue = [$name => null];
} else {
$paramValue = $this->faker->getFakeData([$name => $type], $variation[$name] ?? null);
Expand Down
6 changes: 3 additions & 3 deletions tests/Functional/Service/ComponentItemFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public function testFactoryCreatesDefaultVariationWithParameterTypes(): void
self::assertIsFloat($component->getVariations()['default']['complex']['amount']);
}

public function testCreateObjectParameter()
public function testCreateObjectParameter(): void
{
$data = [
'name' => 'component',
Expand All @@ -156,11 +156,11 @@ public function testCreateObjectParameter()
'variation1' => [
'car' => [
'color' => 'blue',
]
],
],
'variation2' => [
'car' => null,
]
],
],
];

Expand Down

0 comments on commit f577ce5

Please sign in to comment.