GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 25-25 lines in 2 locations

symphony/lib/toolkit/fields/field.input.php 1 location

@@ 389-413 (lines=25) @@
386
            Grouping:
387
        -------------------------------------------------------------------------*/
388
389
        public function groupRecords($records)
390
        {
391
            if (!is_array($records) || empty($records)) {
392
                return;
393
            }
394
395
            $groups = array($this->get('element_name') => array());
396
397
            foreach ($records as $r) {
398
                $data = $r->getData($this->get('id'));
399
                $value = General::sanitize($data['value']);
400
401
                if (!isset($groups[$this->get('element_name')][$data['handle']])) {
402
                    $groups[$this->get('element_name')][$data['handle']] = array(
403
                        'attr' => array('handle' => $data['handle'], 'value' => $value),
404
                        'records' => array(),
405
                        'groups' => array()
406
                    );
407
                }
408
409
                $groups[$this->get('element_name')][$data['handle']]['records'][] = $r;
410
            }
411
412
            return $groups;
413
        }
414
    }
415

symphony/lib/toolkit/fields/field.select.php 1 location

@@ 535-559 (lines=25) @@
532
            Grouping:
533
        -------------------------------------------------------------------------*/
534
535
        public function groupRecords($records)
536
        {
537
            if (!is_array($records) || empty($records)) {
538
                return;
539
            }
540
541
            $groups = array($this->get('element_name') => array());
542
543
            foreach ($records as $r) {
544
                $data = $r->getData($this->get('id'));
545
                $value = General::sanitize($data['value']);
546
547
                if (!isset($groups[$this->get('element_name')][$data['handle']])) {
548
                    $groups[$this->get('element_name')][$data['handle']] = array(
549
                        'attr' => array('handle' => $data['handle'], 'value' => $value),
550
                        'records' => array(),
551
                        'groups' => array()
552
                    );
553
                }
554
555
                $groups[$this->get('element_name')][$data['handle']]['records'][] = $r;
556
            }
557
558
            return $groups;
559
        }
560
561
        /*-------------------------------------------------------------------------
562
            Events: