4444 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
4545 */
4646class filterbystandarderror extends preselect_task {
47-
4847 /**
4948 * @var progress
5049 */
5150 private progress $ progress ;
5251
53- /**
54- * @var callable $next
55- */
56- private $ next ;
57-
5852 /**
5953 * Run method.
6054 *
@@ -64,21 +58,20 @@ class filterbystandarderror extends preselect_task {
6458 * @return result
6559 *
6660 */
67- public function run (array &$ context, callable $ next ): result {
61+ public function run (array &$ context ): result {
6862 $ this ->context = $ context ;
69- $ this ->next = $ next ;
7063 $ this ->progress = $ context ['progress ' ];
7164
7265 if ($ this ->progress ->is_first_question ()) {
73- return $ next ($ context );
66+ return result:: ok ($ context );
7467 }
7568
7669 if (!$ this ->progress ->has_new_response ()) {
77- return $ next ($ context );
70+ return result:: ok ($ context );
7871 }
7972
8073 if ($ this ->progress ->get_last_question ()->is_pilot ) {
81- return $ next ($ context );
74+ return result:: ok ($ context );
8275 }
8376
8477 $ lastquestion = $ this ->progress ->get_last_question ();
@@ -98,7 +91,8 @@ public function run(array &$context, callable $next): result {
9891 getenv ('CATQUIZ_CREATE_TESTOUTPUT ' ) && printf (
9992 "%d: [SE] drop %s%s " ,
10093 count ($ this ->progress ->get_playedquestions ()),
101- (catscale::return_catscale_object ($ scaleid ))->name , PHP_EOL
94+ (catscale::return_catscale_object ($ scaleid ))->name ,
95+ PHP_EOL
10296 );
10397 $ this ->progress ->drop_scale ($ scaleid );
10498 $ inheritscales = $ this ->get_scale_heirs ($ scaleid );
@@ -144,7 +138,7 @@ public function run(array &$context, callable $next): result {
144138 }
145139 }
146140
147- return $ next ($ context );
141+ return result:: ok ($ context );
148142 }
149143
150144 /**
@@ -210,7 +204,7 @@ private function filter_for_cat(array $updatedscales): result {
210204 if ($ drop ) {
211205 return result::err (status::ERROR_NO_REMAINING_QUESTIONS );
212206 }
213- return ( $ this -> next ) ($ this ->context );
207+ return result:: ok ($ this ->context );
214208 }
215209
216210 /**
0 commit comments