public function toArray(): array
    {
        $data = ReflectionUtil::objToSnakeArray($this, static::blacklist());
        foreach ($this->renamed as $name => $newName) {
            if (!array_key_exists($name, $data)) {
                continue;
            }
            $data[$newName] = $data[$name];
            unset($data[$name]);
        }

        return $data;
    }
public function toArray(): array
    {
        $data = ReflectionUtil::objToSnakeArray($this, static::blacklist());
        foreach ($this->renamed as $name => $newName) {
            if (!array_key_exists($name, $data)) {
                continue;
            }
            $data[$newName] = $data[$name];
            unset($data[$name]);
        }

        return $data;
    }
public function toArray ( ) : array { $ data = ReflectionUtil :: objToSnakeArray ( $ this , static :: blacklist ( ) ) ; foreach ( $ this -> renamed as $ name => $ newName ) { if ( ! array_key_exists ( $ name , $ data ) ) { continue ; } $ data [ $ newName ] = $ data [ $ name ] ; unset ( $ data [ $ name ] ) ; } return $ data ; }
Return the object as Array.

@return array
@throws \ReflectionException
Return the object as Array .