Skip to content

Commit 203853c

Browse files
vidarlSteveb-pkonradoboza
authored
Apply suggestions from code review
Co-authored-by: Paweł Niedzielski <[email protected]> Co-authored-by: Konrad Oboza <[email protected]>
1 parent ffa945c commit 203853c

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

eZ/Publish/Core/Repository/BookmarkService.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ public function loadBookmarks(int $offset = 0, int $limit = 25): BookmarkList
113113

114114
$result = $this->repository->getlocationService()->find($filter, []);
115115
} catch (BadStateException $e) {
116-
$this->logger->debug($e);
116+
$this->logger->debug($e, [
117+
'exception' => $e,
118+
]);
117119

118120
return new BookmarkList();
119121
}

eZ/Publish/Core/Repository/Tests/Service/Mock/BookmarkTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public function testLoadBookmarks()
224224

225225
$locationServiceMock = $this->createMock(LocationService::class);
226226
$locationServiceMock
227-
->expects($this->once())
227+
->expects(self::once())
228228
->method('find')
229229
->willReturn($locationList);
230230

src/contracts/Repository/Values/Content/Query/Criterion/IsBookmarked.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,15 @@
1616
/**
1717
* A criterion that matches locations of bookmarks for a given user id.
1818
*
19-
*
2019
* Supported operators:
2120
* - EQ: matches against a unique user id
2221
*/
23-
class IsBookmarked extends Criterion implements FilteringCriterion
22+
final class IsBookmarked extends Criterion implements FilteringCriterion
2423
{
2524
/**
2625
* Creates a new IsBookmarked criterion.
2726
*
28-
* @param int $value UserID for which bookmarked locations must be matched against
27+
* @param int $value user id for which bookmarked locations must be matched against
2928
*
3029
* @throws \InvalidArgumentException if a non numeric id is given
3130
* @throws \InvalidArgumentException if the value type doesn't match the operator

src/contracts/Repository/Values/Content/Query/SortClause/BookmarkId.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
use eZ\Publish\SPI\Repository\Values\Filter\FilteringSortClause;
1414

1515
/**
16-
* Sets sort direction on the Bookmark ID for a location query containing a IsBookmarked criterion.
16+
* Sets sort direction on the bookmark id for a location query containing IsBookmarked criterion.
1717
*/
18-
class BookmarkId extends SortClause implements FilteringSortClause
18+
final class BookmarkId extends SortClause implements FilteringSortClause
1919
{
2020
public function __construct(string $sortDirection = Query::SORT_ASC)
2121
{

src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Bookmark/IdSortClauseQueryBuilder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
use eZ\Publish\SPI\Repository\Values\Filter\SortClauseQueryBuilder;
1414
use Ibexa\Contracts\Core\Repository\Values\Content\Query\SortClause\BookmarkId;
1515

16-
class IdSortClauseQueryBuilder implements SortClauseQueryBuilder
16+
final class IdSortClauseQueryBuilder implements SortClauseQueryBuilder
1717
{
1818
public function accepts(FilteringSortClause $sortClause): bool
1919
{

0 commit comments

Comments
 (0)