Completed
Push — master ( 4b4c57...035a27 )
by Rafael
03:03
created
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.
tests/Parser/CallableParserTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
     public function buildParser()
17 17
     {
18 18
         return new CallableParser(
19
-            function ($value, $type, \ReflectionProperty $property, $object) {
19
+            function($value, $type, \ReflectionProperty $property, $object) {
20 20
                 return ($value === 'success') ? true : false;
21 21
             }
22 22
         );
Please login to merge, or discard this patch.
tests/Array2ObjectTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     public function testArray2Object()
20 20
     {
21 21
         $teamArray = [
22
-            'id' => 1,//read-only
22
+            'id' => 1, //read-only
23 23
             'name' => 'Dream Team',
24 24
             'Manager' => [
25 25
                 'name' => 'Big Manager',
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         //register custom parser
58 58
         $array2Object = Array2ObjectBuilder::create()->addParser(
59 59
             new CallableParser(
60
-                function ($value, $type, \ReflectionProperty $property, $object) {
60
+                function($value, $type, \ReflectionProperty $property, $object) {
61 61
                     if ($property->getName() === 'salary') {
62 62
                         $value = str_replace('$', null, $value);
63 63
                     }
Please login to merge, or discard this patch.
tests/Fixtures/AbstractTeam.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,6 +67,6 @@
 block discarded – undo
67 67
      */
68 68
     public function __toString()
69 69
     {
70
-        return (string)$this->getName();
70
+        return (string) $this->getName();
71 71
     }
72 72
 }
73 73
\ No newline at end of file
Please login to merge, or discard this patch.
tests/Matcher/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.