When a object is assigned to a value e.g.:
$mocked->value['sub_value'] = 'stripes'
echo $mocked->value;
// returns
// mocked->value
What would be nicer is that when the value is called with __toString() which triggers that reaction of printing a formatted
[
"sub_value" => 'stripes'
]
or if the values is just called by the magic __get it should return the value as a php array type, instead of assuming that it may be calling another dynamically generated value.
When a object is assigned to a value e.g.:
What would be nicer is that when the value is called with
__toString()which triggers that reaction of printing a formatted[ "sub_value" => 'stripes' ]or if the values is just called by the magic
__getit should return the value as a php array type, instead of assuming that it may be calling another dynamically generated value.