Passed
Push — master ( 1c0893...f7ffcc )
by Fran
03:22
created
src/base/dto/Dto.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -30,14 +30,14 @@  discard block
 block discarded – undo
30 30
             try {
31 31
                 $reflectionClass = new \ReflectionClass($this);
32 32
                 $properties = $reflectionClass->getProperties(\ReflectionProperty::IS_PUBLIC);
33
-                if(count($properties) > 0) {
33
+                if (count($properties) > 0) {
34 34
                     /** @var \ReflectionProperty $property */
35
-                    foreach($properties as $property) {
35
+                    foreach ($properties as $property) {
36 36
                         $dto[$property->getName()] = $property->getValue($this);
37 37
                     }
38 38
                 }
39
-            } catch(\Exception $e) {
40
-                Logger::log(get_class($this) . ': ' . $e->getMessage(), LOG_ERR);
39
+            }catch (\Exception $e) {
40
+                Logger::log(get_class($this).': '.$e->getMessage(), LOG_ERR);
41 41
             }
42 42
             return $dto;
43 43
         }
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
          */
58 58
         public function fromArray(array $object = array())
59 59
         {
60
-            if(count($object) > 0) {
61
-                foreach($object as $key => $value) {
62
-                    if(property_exists($this, $key)) {
60
+            if (count($object) > 0) {
61
+                foreach ($object as $key => $value) {
62
+                    if (property_exists($this, $key)) {
63 63
                         $this->$key = $value;
64 64
                     }
65 65
                 }
Please login to merge, or discard this patch.