Skip to content

Remove null for collections #10

@silasjoisten

Description

@silasjoisten

If a collection can be empty, then we don't need to allow null and don't need to use it as a default value in StoriesRequest, just use:

- public ?RelationCollection $withRelations = null,
+ public RelationCollection $withRelations = New RelationCollection(),

this would also simplify the check in StoriesRequest::toArray() then

Originally posted by @OskarStark in #8 (comment)

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