1
0
mirror of synced 2025-02-02 13:31:45 +03:00

#6174 #5570 CS - spacing/variable naming

This commit is contained in:
Marco Pivetta 2016-12-18 14:47:16 +01:00
parent dac1a16964
commit 12e8ab216a

View File

@ -89,17 +89,19 @@ class CompanyContractListener
public function takeSnapshot(CompanyContract $contract) public function takeSnapshot(CompanyContract $contract)
{ {
$snapshot = []; $snapshot = [];
$reflexion = new \ReflectionClass($contract);
foreach ($reflexion->getProperties() as $property) { foreach ((new \ReflectionClass($contract))->getProperties() as $property) {
$property->setAccessible(true); $property->setAccessible(true);
$value = $property->getValue($contract); $value = $property->getValue($contract);
if (is_object($value) || is_array($value)) { if (is_object($value) || is_array($value)) {
continue; continue;
} }
$snapshot[$property->getName()] = $property->getValue($contract); $snapshot[$property->getName()] = $property->getValue($contract);
} }
return $snapshot; return $snapshot;
} }
} }