diff --git a/src/ReferenceIntegrity/Mapping/Validator.php b/src/ReferenceIntegrity/Mapping/Validator.php index 183645e325..20281e79a0 100644 --- a/src/ReferenceIntegrity/Mapping/Validator.php +++ b/src/ReferenceIntegrity/Mapping/Validator.php @@ -38,7 +38,9 @@ class Validator /** * Returns a list of available integrity actions * - * @return array + * @return string[] + * + * @phpstan-return array */ public function getIntegrityActions() { diff --git a/src/SoftDeleteable/Filter/ODM/SoftDeleteableFilter.php b/src/SoftDeleteable/Filter/ODM/SoftDeleteableFilter.php index 8ef4f00f4e..2a6aa7688f 100644 --- a/src/SoftDeleteable/Filter/ODM/SoftDeleteableFilter.php +++ b/src/SoftDeleteable/Filter/ODM/SoftDeleteableFilter.php @@ -39,7 +39,9 @@ class SoftDeleteableFilter extends BsonFilter /** * Gets the criteria part to add to a query. * - * @return array The criteria array, if there is available, empty array otherwise + * @return array|null>>|null> The criteria array, if there is available, empty array otherwise + * + * @phpstan-return array>|null> */ public function addFilterCriteria(ClassMetadata $targetEntity): array { @@ -96,7 +98,7 @@ public function enableForDocument($class) } /** - * @return SoftDeleteableListener|null + * @return SoftDeleteableListener */ protected function getListener() { diff --git a/src/Tree/Entity/Repository/ClosureTreeRepository.php b/src/Tree/Entity/Repository/ClosureTreeRepository.php index 8a77f48654..f8568b5b3c 100644 --- a/src/Tree/Entity/Repository/ClosureTreeRepository.php +++ b/src/Tree/Entity/Repository/ClosureTreeRepository.php @@ -412,7 +412,7 @@ public function getNodesHierarchyQueryBuilder($node = null, $direct = false, arr } /** - * @return array|bool + * @return array|bool */ public function verify() { diff --git a/src/Tree/Entity/Repository/NestedTreeRepository.php b/src/Tree/Entity/Repository/NestedTreeRepository.php index b2b9eaf7b8..cd82be56e3 100644 --- a/src/Tree/Entity/Repository/NestedTreeRepository.php +++ b/src/Tree/Entity/Repository/NestedTreeRepository.php @@ -937,7 +937,7 @@ public function reorderAll($sortByField = null, $direction = 'ASC', $verify = tr * options: * - treeRootNode: (object) Optional tree root node to verify, if not the whole forest (only available for forests, not for single trees). * - * @return array|bool true on success, error list on failure + * @return array|bool true on success, error list on failure */ public function verify(/* array $options = [] */) // @phpstan-ignore-line { @@ -1172,6 +1172,8 @@ protected function validate() /** * Collect errors on given tree if * where are any + * + * @param $errors array */ private function verifyTree(array &$errors, ?object $root = null): void { diff --git a/src/Tree/Hydrator/ORM/TreeObjectHydrator.php b/src/Tree/Hydrator/ORM/TreeObjectHydrator.php index 5389b9152c..a61badc813 100644 --- a/src/Tree/Hydrator/ORM/TreeObjectHydrator.php +++ b/src/Tree/Hydrator/ORM/TreeObjectHydrator.php @@ -61,7 +61,7 @@ public function setPropertyValue($object, $property, $value) /** * We hook into the `hydrateAllData` to map the children collection of the entity * - * @return mixed[] + * @return array */ protected function hydrateAllData() { @@ -93,9 +93,9 @@ protected function hydrateAllData() * [parentId => [child1, child2, ...], ...] * ``` * - * @param array $nodes + * @param array $nodes * - * @return array + * @return array> */ protected function buildChildrenHashmap($nodes) { @@ -116,8 +116,8 @@ protected function buildChildrenHashmap($nodes) } /** - * @param array $nodes - * @param array $childrenHashmap + * @param array $nodes + * @param array> $childrenHashmap * * @return void */ @@ -152,7 +152,7 @@ protected function populateChildrenArray($nodes, $childrenHashmap) /** * @param array $nodes * - * @return array + * @return array */ protected function getRootNodes($nodes) {