public function toArray()
    {
        $data = [
            "uuid" => $this->uuid,
            "code" => $this->code,
            "modules" => $this->modules,
            "vars" => $this->vars,
        ];

        foreach (['modules', 'vars'] as $key) {
            if (!array_key_exists($key, $data)) {
                continue;
            }

            if (empty($data[$key])) {
                $data[$key] = new \stdClass();
            }
        }

        return $data;
    }
public function toArray()
    {
        $data = [
            "uuid" => $this->uuid,
            "code" => $this->code,
            "modules" => $this->modules,
            "vars" => $this->vars,
        ];

        foreach (['modules', 'vars'] as $key) {
            if (!array_key_exists($key, $data)) {
                continue;
            }

            if (empty($data[$key])) {
                $data[$key] = new \stdClass();
            }
        }

        return $data;
    }
Returns an associative array representation of the createJob, ready for transport or serialization.

@return array