From 56105c620f1e423f7005f1e99bb05d31fd2beb7e Mon Sep 17 00:00:00 2001 From: Colin Viebrock Date: Thu, 2 Oct 2025 19:32:33 -0400 Subject: [PATCH 1/7] Fix level 0 phpstan issues; rebuild baseline --- Swat/SwatActionItem.php | 2 +- Swat/SwatChangeOrder.php | 2 +- Swat/SwatForm.php | 2 -- Swat/SwatHtmlHeadEntry.php | 2 +- Swat/SwatInputCell.php | 4 ++-- Swat/SwatRadioNoteBook.php | 5 ++-- Swat/SwatTreeNode.php | 2 +- Swat/SwatUIObject.php | 5 ---- Swat/SwatYUIComponent.php | 2 +- phpstan-baseline.neon | 48 -------------------------------------- 10 files changed, 9 insertions(+), 65 deletions(-) diff --git a/Swat/SwatActionItem.php b/Swat/SwatActionItem.php index 536279ec..e2346a7f 100644 --- a/Swat/SwatActionItem.php +++ b/Swat/SwatActionItem.php @@ -143,7 +143,7 @@ public function getHtmlHeadEntrySet() */ public function getAvailableHtmlHeadEntrySet() { - $set = parent::geAvailabletHtmlHeadEntrySet(); + $set = parent::getAvailableHtmlHeadEntrySet(); if ($this->widget !== null) { $set->addEntrySet($this->widget->getAvailableHtmlHeadEntrySet()); diff --git a/Swat/SwatChangeOrder.php b/Swat/SwatChangeOrder.php index 2cf9b4f2..eb513412 100644 --- a/Swat/SwatChangeOrder.php +++ b/Swat/SwatChangeOrder.php @@ -84,7 +84,7 @@ public function display() $list_div->class = 'swat-change-order-list'; $list_div->open(); - $option_div = new SwatHtmltag('div'); + $option_div = new SwatHtmlTag('div'); $option_div->class = 'swat-change-order-item'; foreach ($ordered_options as $option) { diff --git a/Swat/SwatForm.php b/Swat/SwatForm.php index 7b94940a..8b866601 100644 --- a/Swat/SwatForm.php +++ b/Swat/SwatForm.php @@ -319,8 +319,6 @@ public function display() * * This form is only marked as processed if it was submitted by the user. * - * @return true if this form was actually submitted, false otherwise - * * @see SwatContainer::process() */ public function process() diff --git a/Swat/SwatHtmlHeadEntry.php b/Swat/SwatHtmlHeadEntry.php index 419dea32..77b0594c 100644 --- a/Swat/SwatHtmlHeadEntry.php +++ b/Swat/SwatHtmlHeadEntry.php @@ -103,7 +103,7 @@ public function getType() */ public function getIECondition() { - return $this->ie_conditional; + return $this->ie_condition; } /** diff --git a/Swat/SwatInputCell.php b/Swat/SwatInputCell.php index 5cf3e597..7d3a429f 100644 --- a/Swat/SwatInputCell.php +++ b/Swat/SwatInputCell.php @@ -428,8 +428,8 @@ public function copy($id_suffix = '') $copy_clone = $clone->copy($id_suffix); $copy_clone->parent = $copy; $copy->clones[$replicator_id] = $copy_clone; - if ($copy_child->id !== null) { - $copy->children_by_id[$copy_child->id] = $copy_child; + if ($copy_clone->id !== null) { + $copy->children_by_id[$copy_clone->id] = $copy_clone; } $clone->widgets[$replicator_id] = []; diff --git a/Swat/SwatRadioNoteBook.php b/Swat/SwatRadioNoteBook.php index bc2deb53..d7804ac5 100644 --- a/Swat/SwatRadioNoteBook.php +++ b/Swat/SwatRadioNoteBook.php @@ -219,10 +219,9 @@ public function printWidgetTree() { echo get_class($this), ' ', $this->id; - $children = $this->getChildren(); - if (count($children) > 0) { + if (count($this->children) > 0) { echo '