diff --git a/src/Admin/AbstractAdmin.php b/src/Admin/AbstractAdmin.php index 9a8fd654c8..5772399e3a 100644 --- a/src/Admin/AbstractAdmin.php +++ b/src/Admin/AbstractAdmin.php @@ -1749,6 +1749,8 @@ public function isCurrentChild(): bool /** * Returns the current child admin instance. + * + * @return AdminInterface|null the current child admin instance */ public function getCurrentChildAdmin(): ?AdminInterface { diff --git a/src/Admin/AdminInterface.php b/src/Admin/AdminInterface.php index 98c568e6fc..db61a3f317 100644 --- a/src/Admin/AdminInterface.php +++ b/src/Admin/AdminInterface.php @@ -135,6 +135,9 @@ public function getSecurityInformation(): array; public function setParentFieldDescription(FieldDescriptionInterface $parentFieldDescription): void; + /** + * @throws \LogicException + */ public function getParentFieldDescription(): FieldDescriptionInterface; /** diff --git a/src/Datagrid/DatagridMapper.php b/src/Datagrid/DatagridMapper.php index aa7fba8402..f7497e6466 100644 --- a/src/Datagrid/DatagridMapper.php +++ b/src/Datagrid/DatagridMapper.php @@ -118,7 +118,7 @@ final public function keys(): array return array_keys($this->datagrid->getFilters()); } - public function remove(string $key): BaseMapper + public function remove(string $key): self { $this->admin->removeFilterFieldDescription($key); $this->datagrid->removeFilter($key); @@ -126,7 +126,7 @@ public function remove(string $key): BaseMapper return $this; } - public function reorder(array $keys): BaseMapper + public function reorder(array $keys): self { $this->datagrid->reorderFilters($keys); diff --git a/src/Mapper/BaseMapper.php b/src/Mapper/BaseMapper.php index 88f1b5303e..5ce7676ec7 100644 --- a/src/Mapper/BaseMapper.php +++ b/src/Mapper/BaseMapper.php @@ -51,7 +51,10 @@ abstract public function get(string $key); abstract public function has(string $key): bool; - abstract public function remove(string $key): self; + /** + * @return static + */ + abstract public function remove(string $key); /** * Returns configured keys. @@ -62,6 +65,8 @@ abstract public function keys(): array; /** * @param string[] $keys field names + * + * @return static */ abstract public function reorder(array $keys): self; }