Skip to content

[bug]: Use enums #748

Open
Open
@magicsunday

Description

@magicsunday

Description

Use enums (https://www.php.net/manual/en/language.types.enumerations.php) wherever possible, e.g. in OperationType. The setOperation method of OperationIndexParams expects a parameter of type OperationType, but MOVE and COPY are currently defined as a string, so calling

(new OperationIndexParams())
    ->setOperation(OperationType::MOVE)

generates the warning Expected parameter of type '\Algolia\AlgoliaSearch\Model\Search\OperationType', 'string' provided.

Client

All

Version

4.15.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions