Fix phpstan issues

This commit is contained in:
Sukhwinder Dhillon 2024-03-27 13:58:09 +01:00
parent 520d027dcb
commit 2dbfe86f16

View file

@ -45,10 +45,12 @@ class CleanupNodeForm extends BpConfigBaseForm
{
$changes = ProcessChanges::construct($this->bp, $this->session);
/** @var string[] $nodesToCleanup */
$nodesToCleanup = $this->getValue('cleanup_all') === '1'
? array_keys($this->bp->getMissingChildren())
: $this->getValue('nodes');
$nodeName = null;
foreach ($nodesToCleanup as $nodeName) {
$node = $this->bp->getNode($nodeName);
$changes->deleteNode($node);