for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace MaxBeckers\AmazonAlexa\Helper;
/**
* This trait is helpful for the property to ArrayObject mapping.
*
* @author Maximilian Beckers <[email protected]>
*/
trait SerializeValueMapper
{
* @param \ArrayObject $data
* @param string $property
protected function valueToArrayIfSet(\ArrayObject $data, string $property)
if (null !== $this->{$property}) {
$data[$property] = $this->{$property};
}