Skip to content

Commit

Permalink
Remove whitespace from PropertyManager lines
Browse files Browse the repository at this point in the history
  • Loading branch information
austenmc committed Aug 27, 2016
1 parent ab8ab72 commit 2651388
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Tools/Model/PropertyManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,33 @@
trait PropertyManager
{
private $propertyStorage = null;

public function loadProperties()
{
if ($this->propertyStorage !== null) {
return;
}

foreach ($this->properties as $property) {
$this->propertyStorage[$property->getName()] = $property;
}
}

public function getProperty(string $name, $default = null)
{
$this->loadProperties();

if (isset($this->propertyStorage[$name])) {
return $this->propertyStorage[$name]->getValue();
} else {
return $default;
}
}

public function setProperty(string $name, $value)
{
$this->loadProperties();

if (isset($this->propertyStorage[$name])) {
$this->propertyStorage[$name]->setValue($value);
} else {
Expand All @@ -46,7 +46,7 @@ public function setProperty(string $name, $value)
}
$property->setName($name);
$property->setValue($value);

$this->propertyStorage[$name] = $property;
$this->properties->add($property);
}
Expand Down

0 comments on commit 2651388

Please sign in to comment.