File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,7 @@ public function removeById($id)
106106 foreach ($ widgets as $ i => $ widget ) {
107107 if ($ widget ['id ' ] === $ id ) {
108108 unset($ this ->widgets [$ position ][$ i ]);
109+
109110 return ;
110111 }
111112 }
@@ -250,12 +251,13 @@ public function count()
250251
251252 return $ count ;
252253 }
253-
254+
254255 /**
255256 * Add a widget with a given type to the array.
256257 *
257258 * @param string $type
258- * @param array $arguments
259+ * @param array $arguments
260+ *
259261 * @return int
260262 */
261263 protected function addWidgetWithType ($ type , array $ arguments = [])
@@ -304,8 +306,8 @@ protected function resetPosition()
304306 * Wraps widget content in a special markup defined by $this->wrap().
305307 *
306308 * @param string $content
307- * @param int $index
308- * @param int $total
309+ * @param int $index
310+ * @param int $total
309311 *
310312 * @return string
311313 */
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ public function testWrap()
9999 $ this ->widgetGroup ->addWidget ('Slider ' , ['slides ' => 5 ]);
100100 $ this ->widgetGroup ->addAsyncWidget ('Slider ' );
101101
102- $ output = $ this ->widgetGroup ->wrap (function ($ content , $ index , $ count ) {
102+ $ output = $ this ->widgetGroup ->wrap (function ($ content , $ index , $ count ) {
103103 return "<div class='widget widget- {$ index }- {$ count }'> {$ content }</div> " ;
104104 })->display ();
105105
@@ -148,7 +148,7 @@ public function testCount()
148148 $ this ->widgetGroup ->position (50 )->addWidget ('Slider ' );
149149 $ this ->assertSame (3 , $ this ->widgetGroup ->count ());
150150 }
151-
151+
152152 public function testRemoveById ()
153153 {
154154 $ id1 = $ this ->widgetGroup ->addWidget ('Slider ' );
You can’t perform that action at this time.
0 commit comments