private function mergeObjectParams($params, array $defaults)
    {
        if (! is_object($params)) {
            return;
        }

        foreach ($defaults as $key => $value) {
            if (! isset($params->{$key}) && ! method_exists($params, $key)) {
                $params->{$key} = $value;
            }
        }

        return $params;
    }