Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Paweł Niedzielski <[email protected]>
Co-authored-by: Konrad Oboza <[email protected]>
  • Loading branch information
3 people authored Nov 8, 2024
1 parent ffa945c commit 203853c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
4 changes: 3 additions & 1 deletion eZ/Publish/Core/Repository/BookmarkService.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ public function loadBookmarks(int $offset = 0, int $limit = 25): BookmarkList

$result = $this->repository->getlocationService()->find($filter, []);
} catch (BadStateException $e) {
$this->logger->debug($e);
$this->logger->debug($e, [
'exception' => $e,
]);

return new BookmarkList();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public function testLoadBookmarks()

$locationServiceMock = $this->createMock(LocationService::class);
$locationServiceMock
->expects($this->once())
->expects(self::once())
->method('find')
->willReturn($locationList);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,15 @@
/**
* A criterion that matches locations of bookmarks for a given user id.
*
*
* Supported operators:
* - EQ: matches against a unique user id
*/
class IsBookmarked extends Criterion implements FilteringCriterion
final class IsBookmarked extends Criterion implements FilteringCriterion
{
/**
* Creates a new IsBookmarked criterion.
*
* @param int $value UserID for which bookmarked locations must be matched against
* @param int $value user id for which bookmarked locations must be matched against
*
* @throws \InvalidArgumentException if a non numeric id is given
* @throws \InvalidArgumentException if the value type doesn't match the operator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
use eZ\Publish\SPI\Repository\Values\Filter\FilteringSortClause;

/**
* Sets sort direction on the Bookmark ID for a location query containing a IsBookmarked criterion.
* Sets sort direction on the bookmark id for a location query containing IsBookmarked criterion.
*/
class BookmarkId extends SortClause implements FilteringSortClause
final class BookmarkId extends SortClause implements FilteringSortClause
{
public function __construct(string $sortDirection = Query::SORT_ASC)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use eZ\Publish\SPI\Repository\Values\Filter\SortClauseQueryBuilder;
use Ibexa\Contracts\Core\Repository\Values\Content\Query\SortClause\BookmarkId;

class IdSortClauseQueryBuilder implements SortClauseQueryBuilder
final class IdSortClauseQueryBuilder implements SortClauseQueryBuilder
{
public function accepts(FilteringSortClause $sortClause): bool
{
Expand Down

0 comments on commit 203853c

Please sign in to comment.