Skip to content

Commit

Permalink
More fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
phansys committed Sep 3, 2023
1 parent 3754da4 commit c764934
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 17 deletions.
6 changes: 3 additions & 3 deletions src/Mapping/Event/AdapterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public function recomputeSingleObjectChangeSet($uow, $meta, $object);
*
* @param ORMUnitOfWork|MongoDBUnitOfWork $uow The UnitOfWork as provided by the object manager
*
* @return array
* @return array<int|string, object>
*/
public function getScheduledObjectUpdates($uow);

Expand All @@ -134,7 +134,7 @@ public function getScheduledObjectUpdates($uow);
*
* @param ORMUnitOfWork|MongoDBUnitOfWork $uow The UnitOfWork as provided by the object manager
*
* @return array
* @return array<int|string, object>
*/
public function getScheduledObjectInsertions($uow);

Expand All @@ -143,7 +143,7 @@ public function getScheduledObjectInsertions($uow);
*
* @param ORMUnitOfWork|MongoDBUnitOfWork $uow The UnitOfWork as provided by the object manager
*
* @return array
* @return array<int|string, object>
*/
public function getScheduledObjectDeletions($uow);

Expand Down
2 changes: 1 addition & 1 deletion src/Mapping/ExtensionMetadataFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public function __construct(ObjectManager $objectManager, string $extensionNames
*
* @param ClassMetadata&(DocumentClassMetadata|EntityClassMetadata) $meta
*
* @return array the metatada configuration
* @return array<string, mixed> the metatada configuration
*/
public function getExtensionMetadata($meta)
{
Expand Down
15 changes: 5 additions & 10 deletions src/Tree/Entity/Repository/ClosureTreeRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function getPathQuery($node)
*
* @param object $node
*
* @return array list of Nodes in path
* @return array<int, object|null> list of Nodes in path
*/
public function getPath($node)
{
Expand Down Expand Up @@ -207,7 +207,7 @@ public function childrenQuery($node = null, $direct = false, $sortByField = null
* @param string|string[] $direction Sort order ('asc'|'desc'|'ASC'|'DESC'). If $sortByField is an array, this may also be an array with matching number of elements
* @param bool $includeNode Include the root node in results?
*
* @return array<int, object>|null List of children or null on failure
* @return array<int, object|null> List of children or null on failure
*
* @phpstan-param 'asc'|'desc'|'ASC'|'DESC'|array<int, 'asc'|'desc'|'ASC'|'DESC'> $direction
*/
Expand All @@ -233,6 +233,9 @@ public function getChildrenQuery($node = null, $direct = false, $sortByField = n
return $this->childrenQuery($node, $direct, $sortByField, $direction, $includeNode);
}

/**
* @return array<int, object|null>
*/
public function getChildren($node = null, $direct = false, $sortByField = null, $direction = 'ASC', $includeNode = false)
{
return $this->children($node, $direct, $sortByField, $direction, $includeNode);
Expand Down Expand Up @@ -312,14 +315,6 @@ public function removeFromTree($node)
$node = null;
}

/**
* Process nodes and produce an array with the
* structure of the tree
*
* @param array $nodes Array of nodes
*
* @return array Array with tree structure
*/
public function buildTreeArray(array $nodes)
{
$meta = $this->getClassMetadata();
Expand Down
2 changes: 1 addition & 1 deletion src/Tree/Entity/Repository/MaterializedPathRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function getTreeQuery($rootNode = null)
*
* @param object $rootNode
*
* @return array
* @return array<int, object>
*/
public function getTree($rootNode = null)
{
Expand Down
5 changes: 4 additions & 1 deletion src/Tree/Entity/Repository/NestedTreeRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ public function childrenQuery($node = null, $direct = false, $sortByField = null
* @param string|string[] $direction Sort order ('asc'|'desc'|'ASC'|'DESC'). If $sortByField is an array, this may also be an array with matching number of elements
* @param bool $includeNode Flag indicating whether the given node should be included in the results
*
* @return array<int, object>|null List of children or null on failure
* @return array<int, object> List of children or null on failure
*
* @phpstan-param 'asc'|'desc'|'ASC'|'DESC'|array<int, 'asc'|'desc'|'ASC'|'DESC'> $direction
*/
Expand All @@ -424,6 +424,9 @@ public function getChildrenQuery($node = null, $direct = false, $sortByField = n
return $this->childrenQuery($node, $direct, $sortByField, $direction, $includeNode);
}

/**
* @return array<int, object|null>
*/
public function getChildren($node = null, $direct = false, $sortByField = null, $direction = 'ASC', $includeNode = false)
{
return $this->children($node, $direct, $sortByField, $direction, $includeNode);
Expand Down
2 changes: 1 addition & 1 deletion src/Tree/RepositoryUtilsInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function buildTree(array $nodes, array $options = []);
*
* @param object[] $nodes The nodes to build the tree from
*
* @return array
* @return array<int, array<string, mixed>>
*/
public function buildTreeArray(array $nodes);

Expand Down

0 comments on commit c764934

Please sign in to comment.