src/Utils/Reflection/ReflectionUtil.php
public static function populateResponseData(IResponse $response, &$dataObject): void
    {
        foreach (array_keys($response->data()) as $key) {
            $method = 'set';
            $method .= ucfirst(Str::camel($key));
            if (!method_exists($dataObject, $method)) {
                continue;
            }

            $dataObject->{$method}($response->{$key});
        }
    }
public static function populateResponseData(IResponse $response, &$dataObject): void
    {
        foreach (array_keys($response->data()) as $key) {
            $method = 'set';
            $method .= ucfirst(Str::camel($key));
            if (!method_exists($dataObject, $method)) {
                continue;
            }

            $dataObject->{$method}($response->{$key});
        }
    }
public static function populateResponseData ( IResponse $ response , & $ dataObject ) : void { foreach ( array_keys ( $ response -> data ( ) ) as $ key ) { $ method = 'set' ; $ method .= ucfirst ( Str :: camel ( $ key ) ) ; if ( ! method_exists ( $ dataObject , $ method ) ) { continue ; } $ dataObject -> { $ method } ( $ response -> { $ key } ) ; } }
Populate the response data into a dataObject that have the corresponding setters.

@param IResponse    $response
@param              $dataObject
Populate the response data into a dataObject that have the corresponding setters .