Skip to content

add fixupAttributes function #21

@simonLeary42

Description

@simonLeary42

DRY:

$attr = strtolower($attr);
$this->write([$attr => $this->convertToArray($value)]);

$attr = strtolower($attr);
$old_value = $this->getAttribute($attr);
$this->write([$attr => array_merge($old_value, $this->convertToArray($value))]);

$this->write(array_map([$this, "convertToArray"], array_change_key_case($arr, CASE_LOWER)));

$attr = strtolower($attr);
if (!$this->exists()) {
throw new RuntimeException("cannot get attribute from nonexistent entry");
}
if (array_key_exists($attr, $this->object)) {
return $this->convertToArray($this->object[$attr]);

$key = strtolower($key);
$output[$key] = $this->convertToArray($val);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions