src/Models/Name.php
protected function prepareData($data)
    {
        $default = new \StdClass;
        $default->name = null;
        $default->gender = null;
        $default->probability = null;
        $default->count = null;

        return (object) array_merge(
            (array) $default,
            (array) $data
        );
    }
protected function prepareData($data)
    {
        $default = new \StdClass;
        $default->name = null;
        $default->gender = null;
        $default->probability = null;
        $default->count = null;

        return (object) array_merge(
            (array) $default,
            (array) $data
        );
    }
protected function prepareData ( $ data ) { $ default = new \ StdClass ; $ default -> name = null ; $ default -> gender = null ; $ default -> probability = null ; $ default -> count = null ; return ( object ) array_merge ( ( array ) $ default , ( array ) $ data ) ; }
Merge data with default so every field is available

@param $data
@return object
Merge data with default so every field is available