Code Duplication    Length = 10-10 lines in 2 locations

Apps/Controller/Admin/Comments.php 2 locations

@@ 137-146 (lines=10) @@
134
    public function actionDelete($type, $id = 0)
135
    {
136
        // sounds like a multiply delete definition
137
        if ($id === 0 || (int)$id < 1) {
138
            $ids = App::$Request->query->get('selected');
139
            if (Obj::isArray($ids) && Arr::onlyNumericValues($ids)) {
140
                $id = $ids;
141
            } else {
142
                throw new NotFoundException('Bad conditions');
143
            }
144
        } else {
145
            $id = [$id];
146
        }
147
148
        // prepare query to db
149
        $query = null;
@@ 190-199 (lines=10) @@
187
    public function actionPublish($type, $id = 0)
188
    {
189
        // check if it multiple accept ids
190
        if ($id === 0 || (int)$id < 1) {
191
            $ids = App::$Request->query->get('selected');
192
            if (Obj::isArray($ids) && Arr::onlyNumericValues($ids)) {
193
                $id = $ids;
194
            } else {
195
                throw new NotFoundException('Bad conditions');
196
            }
197
        } else {
198
            $id = [$id];
199
        }
200
201
        // build query
202
        $query = null;