From 12e8ab216abada6e2f2f863281b37ce484ec7237 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Sun, 18 Dec 2016 14:47:16 +0100 Subject: [PATCH] #6174 #5570 CS - spacing/variable naming --- .../Tests/Models/Company/CompanyContractListener.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/Doctrine/Tests/Models/Company/CompanyContractListener.php b/tests/Doctrine/Tests/Models/Company/CompanyContractListener.php index c58628878..ad4133d50 100644 --- a/tests/Doctrine/Tests/Models/Company/CompanyContractListener.php +++ b/tests/Doctrine/Tests/Models/Company/CompanyContractListener.php @@ -89,17 +89,19 @@ class CompanyContractListener 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; } - }