Skip to content

Search for prev/next sibling returns Collection #3396

@Karmalakas

Description

@Karmalakas

/system/src/Grav/Common/Page/Collection.php::adjacentSibling() may return back the whole Collection if previous or next sibling is not found. All other places in such case expect to return false. system/src/Grav/Common/Page/Interfaces/PageCollectionInterface.php::adjacentSibling() defines return types PageInterface|PageCollectionInterface|false, but PageCollectionInterface should not be there as no other method expects to return it. Also naming suggests a PageInterface if found or empty value (null|false) to be returned if not found, but not a collection

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