Code Duplication    Length = 13-13 lines in 2 locations

src/Action.php 2 locations

@@ 307-319 (lines=13) @@
304
     * @param $element
305
     * @return array
306
     */
307
    protected static function getIBlockElementPanelButtons($element)
308
    {
309
        if (!isset(static::$panelButtons['iblock_element'][$element['ID']])) {
310
            static::$panelButtons['iblock_element'][$element['ID']] = CIBlock::GetPanelButtons(
311
                $element["IBLOCK_ID"],
312
                $element['ID'],
313
                0,
314
                ['SECTION_BUTTONS' => false, 'SESSID' => false]
315
            );
316
        }
317
318
        return static::$panelButtons['iblock_element'][$element['ID']];
319
    }
320
321
    /**
322
     * @param $section
@@ 325-337 (lines=13) @@
322
     * @param $section
323
     * @return array
324
     */
325
    protected static function getIBlockSectionPanelButtons($section)
326
    {
327
        if (!isset(static::$panelButtons['iblock_section'][$section['ID']])) {
328
            static::$panelButtons['iblock_section'][$section['ID']] = CIBlock::GetPanelButtons(
329
                $section["IBLOCK_ID"],
330
                0,
331
                $section['ID'],
332
                ['SESSID' => false]
333
            );
334
        }
335
336
        return static::$panelButtons['iblock_section'][$section['ID']];
337
    }
338
    
339
    /**
340
     * @param int $id