Code Duplication    Length = 15-15 lines in 2 locations

src/widgets/ActionBox.php 1 location

@@ 152-166 (lines=15) @@
149
        ]);
150
    }
151
152
    public function renderRepresentation()
153
    {
154
        $representation = Yii::$app->request->get('representation') ?: 'common';
155
156
        return ButtonDropdown::widget([
157
            'label' => Yii::t('synt', 'View') . ': ' . Yii::t('app', $representation),
158
            'options' => ['class' => 'btn-default'],
159
            'dropdown' => [
160
                'items' => [
161
                    ['label' => Yii::t('app', 'common'), 'url' => Url::current(['representation' => null])],
162
                    ['label' => Yii::t('app', 'report'), 'url' => Url::current(['representation' => 'report'])],
163
                ],
164
            ],
165
        ]);
166
    }
167
168
    public function renderSorter(array $options)
169
    {

src/widgets/IndexPage.php 1 location

@@ 98-112 (lines=15) @@
95
        ]);
96
    }
97
98
    public function renderRepresentation()
99
    {
100
        $representation = Yii::$app->request->get('representation') ?: 'common';
101
102
        return ButtonDropdown::widget([
103
            'label' => Yii::t('synt', 'View') . ': ' . Yii::t('app', $representation),
104
            'options' => ['class' => 'btn-default'],
105
            'dropdown' => [
106
                'items' => [
107
                    ['label' => Yii::t('app', 'common'), 'url' => Url::current(['representation' => null])],
108
                    ['label' => Yii::t('app', 'report'), 'url' => Url::current(['representation' => 'report'])],
109
                ],
110
            ],
111
        ]);
112
    }
113
114
    public function renderSorter(array $options)
115
    {