Skip to content

Commit

Permalink
Fix camelization for StructureMetadata
Browse files Browse the repository at this point in the history
Amends: 3625fc3
  • Loading branch information
mcaskill committed Nov 5, 2019
1 parent c06444d commit 18733c6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Charcoal/Property/Structure/StructureMetadata.php
Expand Up @@ -74,6 +74,7 @@ public function ident()
public function setDefaultData(array $data)
{
foreach ($data as $key => $val) {
$key = $this->camelize($key);
$this->defaultData[$key] = $val;
}

Expand All @@ -89,6 +90,7 @@ public function setDefaultData(array $data)
public function setProperties(array $properties)
{
foreach ($properties as $propertyIdent => $propertyMetadata) {
$propertyIdent = $this->camelize($propertyIdent);
if (isset($this->properties[$propertyIdent])) {
$this->properties[$propertyIdent] = array_replace_recursive(
$this->properties[$propertyIdent],
Expand Down Expand Up @@ -117,6 +119,7 @@ public function hasProperty($propertyIdent)
);
}

$propertyIdent = $this->camelize($propertyIdent);
return isset($this->properties[$propertyIdent]);
}

Expand Down

0 comments on commit 18733c6

Please sign in to comment.