@@ -16,7 +16,7 @@ |
||
| 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 | ); |
@@ -19,7 +19,7 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -67,6 +67,6 @@ |
||
| 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 |
@@ -117,7 +117,7 @@ |
||
| 117 | 117 | $props_arr[$f] = $prop; |
| 118 | 118 | } |
| 119 | 119 | if ($parentClass = $refClass->getParentClass()) { |
| 120 | - $parent_props_arr = $this->getClassProperties($parentClass);//RECURSION |
|
| 120 | + $parent_props_arr = $this->getClassProperties($parentClass); //RECURSION |
|
| 121 | 121 | if (count($parent_props_arr) > 0) { |
| 122 | 122 | $props_arr = array_merge($parent_props_arr, $props_arr); |
| 123 | 123 | } |