Code Duplication    Length = 8-8 lines in 2 locations

src/controllers/HeldPaymentsController.php 2 locations

@@ 65-72 (lines=8) @@
62
                        'class' => RedirectAction::class,
63
                    ],
64
                ],
65
                'on beforeSave' => function (Event $event) {
66
                    /** @var \hipanel\actions\Action $action */
67
                    $action = $event->sender;
68
                    $comment = Yii::$app->request->post('comment');
69
                    foreach ($action->collection->models as $model) {
70
                        $model->setAttribute('comment', $comment);
71
                    }
72
                },
73
            ],
74
            'bulk-approve-modal' => [
75
                'class' => PrepareBulkAction::class,
@@ 93-100 (lines=8) @@
90
                        'class' => RedirectAction::class,
91
                    ],
92
                ],
93
                'on beforeSave' => function (Event $event) {
94
                    /** @var \hipanel\actions\Action $action */
95
                    $action = $event->sender;
96
                    $comment = Yii::$app->request->post('comment');
97
                    foreach ($action->collection->models as $model) {
98
                        $model->setAttribute('comment', $comment);
99
                    }
100
                },
101
            ],
102
            'bulk-reject-modal' => [
103
                'class' => PrepareBulkAction::class,