Skip to content

Commit be9beb8

Browse files
frastelOskarStark
andauthored
Apply suggestions from code review
Co-authored-by: Oskar Stark <[email protected]>
1 parent 2a99dc5 commit be9beb8

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -311,16 +311,16 @@ new OrFilter(
311311

312312
#### Filtering by native date fields
313313

314-
The Storyblok API allows filtering by publish or updated dates.
314+
The Storyblok API allows filtering by published or updated dates.
315315
Those fields could not be filtered by `gt_date` or `lt_date` operations and have dedicated parameters in the request.
316316

317317
Supported date parameters are:
318-
* `published_at_gt`
319-
* `published_at_lt`
320-
* `first_published_at_gt`
321-
* `first_published_at_lt`
322-
* `updated_at_gt`
323-
* `updated_at_lt`
318+
* `published_at_gt`
319+
* `published_at_lt`
320+
* `first_published_at_gt`
321+
* `first_published_at_lt`
322+
* `updated_at_gt`
323+
* `updated_at_lt`
324324

325325
```php
326326
use Storyblok\Api\StoriesApi;

src/Domain/Value/QueryParameter/FirstPublishedAtQueryParameter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121

2222
public function __construct(\DateTimeInterface $publishedAt, Operator $operator)
2323
{
24-
$name = match ($operator->value) {
25-
'lt' => self::FIRST_PUBLISHED_AT_LT,
24+
$name = match ($operator) {
25+
Operator::LessThan => self::FIRST_PUBLISHED_AT_LT,
2626
default => self::FIRST_PUBLISHED_AT_GT,
2727
};
2828

0 commit comments

Comments
 (0)