Skip to content

Commit

Permalink
#6174 #5570 CS - spacing/variable naming
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocramius committed Dec 18, 2016
1 parent a22f165 commit 0c2edcd
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,19 @@ public function postLoadHandler(CompanyContract $contract)
public function takeSnapshot(CompanyContract $contract)
{
$snapshot = [];
$reflexion = new \ReflectionClass($contract);
foreach ($reflexion->getProperties() as $property) {

foreach ((new \ReflectionClass($contract))->getProperties() as $property) {
$property->setAccessible(true);

$value = $property->getValue($contract);

if (is_object($value) || is_array($value)) {
continue;
}

$snapshot[$property->getName()] = $property->getValue($contract);
}

return $snapshot;
}

}

0 comments on commit 0c2edcd

Please sign in to comment.