SupportedOption::toArray(): WordPressAiClientProvidersModelsDTOSupportedOptionArrayShape

In this article

{@inheritDoc}

Return

WordPressAiClientProvidersModelsDTOSupportedOptionArrayShape

Source

public function toArray(): array
{
    $data = [self::KEY_NAME => $this->name->value];
    if ($this->supportedValues !== null) {
        /** @var list<mixed> $supportedValues */
        $supportedValues = $this->supportedValues;
        $data[self::KEY_SUPPORTED_VALUES] = $supportedValues;
    }
    return $data;
}

Changelog

VersionDescription
0.1.0Introduced.

User Contributed Notes

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