diff --git a/src/SelectTree.php b/src/SelectTree.php index f21fe7b..8354133 100644 --- a/src/SelectTree.php +++ b/src/SelectTree.php @@ -170,7 +170,7 @@ private function buildTree(): Collection // Store results for additional functionality if ($this->storeResults) { - $this->results = $combinedResults; + $this->results = $combinedResults; } return $this->buildTreeFromResults($combinedResults); @@ -192,7 +192,7 @@ private function buildTreeFromResults($results, $parent = null): Collection // Group results by their parent IDs foreach ($results as $result) { $parentId = $result->{$this->getParentAttribute()}; - if (!isset($resultMap[$parentId])) { + if (! isset($resultMap[$parentId])) { $resultMap[$parentId] = []; } $resultMap[$parentId][] = $result; @@ -520,7 +520,7 @@ public function getCreateOptionAction(): ?Action return null; } - if (!$this->hasCreateOptionActionFormSchema()) { + if (! $this->hasCreateOptionActionFormSchema()) { return null; } @@ -531,7 +531,7 @@ public function getCreateOptionAction(): ?Action )); }) ->action(static function (Action $action, array $arguments, SelectTree $component, array $data, ComponentContainer $form) { - if (!$component->getCreateOptionUsing()) { + if (! $component->getCreateOptionUsing()) { throw new Exception("Select field [{$component->getStatePath()}] must have a [createOptionUsing()] closure set."); } @@ -550,7 +550,7 @@ public function getCreateOptionAction(): ?Action $component->state($state); $component->callAfterStateUpdated(); - if (!($arguments['another'] ?? false)) { + if (! ($arguments['another'] ?? false)) { return; }