Skip to content

Commit 9d171d8

Browse files
committedSep 7, 2022
fix stan
1 parent e579300 commit 9d171d8

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed
 

‎src/Accordion.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,9 @@ public function jsBehavior($behavior, array $args, $when = null)
136136
/**
137137
* Return the index of an accordion section in collection.
138138
*
139-
* @param AccordionSection $section
140-
*
141139
* @return int
142140
*/
143-
public function getSectionIdx($section)
141+
public function getSectionIdx(AccordionSection $section)
144142
{
145143
$idx = -1;
146144
foreach ($this->sections as $key => $accordion_section) {

‎src/Form/Layout/Section/Accordion.php

+8
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,12 @@ public function addSection($title, \Closure $callback = null, $icon = 'dropdown'
5353

5454
return $section->add([$this->formLayout, 'form' => $this->form]);
5555
}
56+
57+
/**
58+
* @param AccordionSection|Form\Layout $section
59+
*/
60+
public function getSectionIdx($section)
61+
{
62+
return parent::getSectionIdx($section instanceof AccordionSection ? $section : $section->getOwner());
63+
}
5664
}

0 commit comments

Comments
 (0)