Skip to content

Commit 847e738

Browse files
committed
TASK: Use isArrayOfClass() instead of exposing getArrayOfType
1 parent 8d6a996 commit 847e738

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Classes/Domain/NodeCreation/NodeCreationService.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,7 @@ private function convertProperties(NodeType $nodeType, array $properties, Caught
177177
}
178178
$propertyType = PropertyType::fromPropertyOfNodeType($propertyName, $nodeType);
179179
$propertyValue = $properties[$propertyName];
180-
if (!$propertyType->isClass()
181-
&& !($propertyType->isArrayOf() && $propertyType->getArrayOfType()->isClass())) {
180+
if (!$propertyType->isClass() && !$propertyType->isArrayOfClass()) {
182181
// property mapping only for class types or array of classes!
183182
continue;
184183
}

Classes/Domain/NodeCreation/PropertyType.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,9 @@ public function isArrayOf(): bool
178178
return (bool)preg_match(self::PATTERN_ARRAY_OF, $this->value);
179179
}
180180

181-
public function getArrayOfType(): self
181+
public function isArrayOfClass(): bool
182182
{
183-
return $this->arrayOfType;
183+
return $this->isArrayOf() && $this->arrayOfType->isClass();
184184
}
185185

186186
public function isClass(): bool

0 commit comments

Comments
 (0)