@@ -26,7 +26,7 @@ |
||
26 | 26 | |
27 | 27 | public function __call($method, $parameters) |
28 | 28 | { |
29 | - if($method== 'asArray'){ |
|
29 | + if ($method == 'asArray') { |
|
30 | 30 | // $obj = new Utils(); |
31 | 31 | } |
32 | 32 | } |
@@ -50,16 +50,16 @@ |
||
50 | 50 | return $destination; |
51 | 51 | } |
52 | 52 | |
53 | - /** |
|
54 | - * Turn the stadClass object to the type of calling Model |
|
55 | - * |
|
56 | - * @param String $destination |
|
57 | - * @param Object $sourceObject |
|
58 | - * @return Object $destination |
|
59 | - * |
|
60 | - * @author RN Kushwaha <[email protected]> |
|
61 | - * @since v0.0.5 |
|
62 | - */ |
|
53 | + /** |
|
54 | + * Turn the stadClass object to the type of calling Model |
|
55 | + * |
|
56 | + * @param String $destination |
|
57 | + * @param Object $sourceObject |
|
58 | + * @return Object $destination |
|
59 | + * |
|
60 | + * @author RN Kushwaha <[email protected]> |
|
61 | + * @since v0.0.5 |
|
62 | + */ |
|
63 | 63 | public function turnObjects($destination, $data) |
64 | 64 | { |
65 | 65 | $destination = new $destination(); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | public function turnObject($destination, $sourceObject) |
29 | 29 | { |
30 | 30 | $destination = new $destination(); |
31 | - if(is_object($sourceObject)){ |
|
31 | + if (is_object($sourceObject)) { |
|
32 | 32 | $sourceReflection = new \ReflectionObject($sourceObject); |
33 | 33 | $destinationReflection = new \ReflectionObject($destination); |
34 | 34 | $sourceProperties = $sourceReflection->getProperties(); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | if ($destinationReflection->hasProperty($name)) { |
42 | 42 | $propDest = $destinationReflection->getProperty($name); |
43 | 43 | $propDest->setAccessible(true); |
44 | - $propDest->setValue($destination,$value); |
|
44 | + $propDest->setValue($destination, $value); |
|
45 | 45 | } else { |
46 | 46 | $destination->$name = $value; |
47 | 47 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | public function turnObjects($destination, $data) |
64 | 64 | { |
65 | 65 | $destination = new $destination(); |
66 | - if(count($data)){ |
|
66 | + if (count($data)) { |
|
67 | 67 | $destinationReflection = new \ReflectionObject($destination); |
68 | 68 | $destination->data = json_decode(json_encode($data, true)); |
69 | 69 | } |