Code Duplication    Length = 18-18 lines in 2 locations

src/widgets/ActionBox.php 1 location

@@ 116-133 (lines=18) @@
113
        return AdvancedSearch::begin(array_merge(['model' => $this->model], $options));
114
    }
115
116
    public function renderSearchForm(array $data = [], $advancedSearchOptions = [])
117
    {
118
        ob_start();
119
        ob_implicit_flush(false);
120
        try {
121
            $search = $this->beginSearchForm($advancedSearchOptions);
122
            foreach (['per_page', 'representation'] as $key) {
123
                echo Html::hiddenInput($key, Yii::$app->request->get($key));
124
            }
125
            echo Yii::$app->view->render('_search', array_merge(compact('search'), $data));
126
            $search->end();
127
        } catch (\Exception $e) {
128
            ob_end_clean();
129
            throw $e;
130
        }
131
132
        return ob_get_clean();
133
    }
134
135
    public function renderPerPage()
136
    {

src/widgets/IndexPage.php 1 location

@@ 52-69 (lines=18) @@
49
        return $this->render('horizontal' . 'IndexPage');
50
    }
51
52
    public function renderSearchForm(array $data = [], $advancedSearchOptions = [])
53
    {
54
        ob_start();
55
        ob_implicit_flush(false);
56
        try {
57
            $search = $this->beginSearchForm($advancedSearchOptions);
58
            foreach (['per_page', 'representation'] as $key) {
59
                echo Html::hiddenInput($key, Yii::$app->request->get($key));
60
            }
61
            echo Yii::$app->view->render('_search', array_merge(compact('search'), $data));
62
            $search->end();
63
        } catch (\Exception $e) {
64
            ob_end_clean();
65
            throw $e;
66
        }
67
68
        return ob_get_clean();
69
    }
70
71
    public function beginSearchForm($options = [])
72
    {