Completed
Push — master ( 6ce5d4...fef923 )
by Rafael
03:12
created
tests/Array2ObjectTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
         //register custom parser
56 56
         Array2Object::registerParser(
57 57
             new CallableParser(
58
-                function ($value, $type, \ReflectionProperty $property, $object) {
58
+                function($value, $type, \ReflectionProperty $property, $object) {
59 59
                     if ($property->name === 'salary') {
60 60
                         $value = str_replace('$', null, $value);
61 61
                     }
Please login to merge, or discard this patch.
src/Parser/StringParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     public function parseValue($value, $type, \ReflectionProperty $property, $object)
18 18
     {
19 19
         if ($type === 'string') {
20
-            return (string)$value;
20
+            return (string) $value;
21 21
         }
22 22
 
23 23
         return $value;
Please login to merge, or discard this patch.
src/Parser/IntegerParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     public function parseValue($value, $type, \ReflectionProperty $property, $object)
18 18
     {
19 19
         if ($type === 'integer' || $type === 'int') {
20
-            return (integer)$value;
20
+            return (integer) $value;
21 21
         }
22 22
 
23 23
         return $value;
Please login to merge, or discard this patch.
src/Parser/FloatParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     public function parseValue($value, $type, \ReflectionProperty $property, $object)
18 18
     {
19 19
         if ($type === 'float' || $type === 'double') {
20
-            return (float)$value;
20
+            return (float) $value;
21 21
         }
22 22
 
23 23
         return $value;
Please login to merge, or discard this patch.
src/Parser/ObjectParser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@
 block discarded – undo
36 36
         }
37 37
 
38 38
         //use the same namespace as class container
39
-        if ($className === null && class_exists($context->getNamespaceName() . "\\" . $type)) {
40
-            $className = $context->getNamespaceName() . "\\" . $type;
39
+        if ($className === null && class_exists($context->getNamespaceName()."\\".$type)) {
40
+            $className = $context->getNamespaceName()."\\".$type;
41 41
         }
42 42
 
43 43
         if (is_array($value) && $className !== null && class_exists($className)) {
Please login to merge, or discard this patch.
src/Parser/BooleanParser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,10 +29,10 @@
 block discarded – undo
29 29
                         $value = false;
30 30
                         break;
31 31
                     default:
32
-                        $value = (boolean)$value;
32
+                        $value = (boolean) $value;
33 33
                 }
34 34
             } else {
35
-                $value = (boolean)$value;
35
+                $value = (boolean) $value;
36 36
             }
37 37
         }
38 38
 
Please login to merge, or discard this patch.
src/Array2Object.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      */
77 77
     static public function populate($object, array $data)
78 78
     {
79
-        self::setup();//register parsers
79
+        self::setup(); //register parsers
80 80
 
81 81
         if (!is_object($object)) {
82 82
             throw new \InvalidArgumentException('The first param should be a object.');
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
             $props_arr[$f] = $prop;
132 132
         }
133 133
         if ($parentClass = $refClass->getParentClass()) {
134
-            $parent_props_arr = self::getClassProperties($parentClass);//RECURSION
134
+            $parent_props_arr = self::getClassProperties($parentClass); //RECURSION
135 135
             if (count($parent_props_arr) > 0) {
136 136
                 $props_arr = array_merge($parent_props_arr, $props_arr);
137 137
             }
Please login to merge, or discard this patch.
tests/PropertyMatcher/CallableMatcherTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
     public function buildMatcher()
20 20
     {
21 21
         return new CallableMatcher(
22
-            function (\ReflectionProperty $property, $givenName) {
22
+            function(\ReflectionProperty $property, $givenName) {
23 23
                 return ($givenName === 'prueba' && $property->getName() === 'test');
24 24
             }
25 25
         );
Please login to merge, or discard this patch.