Skip to content

Commit

Permalink
Fix getSortBy and getSortOrder return typehint
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet authored and jordisala1991 committed Aug 16, 2020
1 parent f256676 commit 1a3b072
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/Datagrid/ProxyQueryInterface.php
Expand Up @@ -40,11 +40,11 @@ public function execute(array $params = [], ?int $hydrationMode = null);
*/
public function setSortBy(array $parentAssociationMappings, array $fieldMapping): self;

public function getSortBy(): string;
public function getSortBy(): ?string;

public function setSortOrder(string $sortOrder): self;

public function getSortOrder(): string;
public function getSortOrder(): ?string;

/**
* @return mixed
Expand All @@ -62,6 +62,8 @@ public function getMaxResults(): ?int;
public function getUniqueParameterId(): int;

/**
* Join entities from the given association mappings and return the last alias created.
*
* @param mixed[] $associationMappings
*/
public function entityJoin(array $associationMappings): string;
Expand Down
4 changes: 2 additions & 2 deletions tests/App/Datagrid/ProxyQuery.php
Expand Up @@ -31,7 +31,7 @@ public function setSortBy(array $parentAssociationMappings, array $fieldMapping)
throw new \BadMethodCallException('Not implemented.');
}

public function getSortBy(): string
public function getSortBy(): ?string
{
return 'e.id';
}
Expand All @@ -41,7 +41,7 @@ public function setSortOrder(string $sortOrder): ProxyQueryInterface
throw new \BadMethodCallException('Not implemented.');
}

public function getSortOrder(): string
public function getSortOrder(): ?string
{
return 'ASC';
}
Expand Down

0 comments on commit 1a3b072

Please sign in to comment.