8000 Eloquentadapter.getQualifiedSortColumn wrong str_contains usage? · Issue #96 · cloudcreativity/laravel-json-api · GitHub
[go: up one dir, main page]

Skip to content
8000
Eloquentadapter.getQualifiedSortColumn wrong str_contains usage? #96
Closed
@its-schmii

Description

@its-schmii

If I'm not completely misunderstanding the works of the Eloquentadapter.getQualifiedSortColumn method, it uses the str_contains laravel helper with the wrong order of arguments.

Instead of
str_contains('.', $key)
it should be
str_contains($key, '.')

The conditional currently gets always executed if the key is not equal to '.'

Obviously I could be wrong - if so please enlighten me / close the issue.

Codelink:
https://github.com/cloudcreativity/laravel-json-api/blob/master/src/Store/EloquentAdapter.php#L367
Laravel doc for str_contains:
https://laravel.com/docs/5.4/helpers#method-str-contains

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0