FunctionDeclaration::toArray(): WordPressAiClientToolsDTOFunctionDeclarationArrayShape

In this article

{@inheritDoc}

Return

WordPressAiClientToolsDTOFunctionDeclarationArrayShape

Source

public function toArray(): array
{
    $data = [self::KEY_NAME => $this->name, self::KEY_DESCRIPTION => $this->description];
    if ($this->parameters !== null) {
        $data[self::KEY_PARAMETERS] = $this->parameters;
    }
    return $data;
}

Changelog

VersionDescription
0.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.