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 = 28-28 lines in 3 locations

symphony/content/content.blueprintsdatasources.php 1 location

@@ 38-65 (lines=28) @@
35
    {
36
        $formHasErrors = (is_array($this->_errors) && !empty($this->_errors));
37
38
        if ($formHasErrors) {
39
            $this->pageAlert(
40
                __('An error occurred while processing this form. See below for details.'),
41
                Alert::ERROR
42
            );
43
44
            // These alerts are only valid if the form doesn't have errors
45
        } elseif (isset($this->_context[2])) {
46
            $time = Widget::Time();
47
48
            switch ($this->_context[2]) {
49
                case 'saved':
50
                    $message = __('Data Source updated at %s.', array($time->generate()));
51
                    break;
52
                case 'created':
53
                    $message = __('Data Source created at %s.', array($time->generate()));
54
            }
55
56
            $this->pageAlert(
57
                $message
58
                . ' <a href="' . SYMPHONY_URL . '/blueprints/datasources/new/" accesskey="c">'
59
                . __('Create another?')
60
                . '</a> <a href="' . SYMPHONY_URL . '/blueprints/datasources/" accesskey="a">'
61
                . __('View all Data Sources')
62
                . '</a>',
63
                Alert::SUCCESS
64
            );
65
        }
66
67
        $providers = Symphony::ExtensionManager()->getProvidersOf(iProvider::DATASOURCE);
68
        $canonical_link = null;

symphony/content/content.blueprintsevents.php 1 location

@@ 42-69 (lines=28) @@
39
    {
40
        $formHasErrors = (is_array($this->_errors) && !empty($this->_errors));
41
42
        if ($formHasErrors) {
43
            $this->pageAlert(
44
                __('An error occurred while processing this form. See below for details.'),
45
                Alert::ERROR
46
            );
47
48
            // These alerts are only valid if the form doesn't have errors
49
        } elseif (isset($this->_context[2])) {
50
            $time = Widget::Time();
51
52
            switch ($this->_context[2]) {
53
                case 'saved':
54
                    $message = __('Event updated at %s.', array($time->generate()));
55
                    break;
56
                case 'created':
57
                    $message = __('Event created at %s.', array($time->generate()));
58
            }
59
60
            $this->pageAlert(
61
                $message
62
                . ' <a href="' . SYMPHONY_URL . '/blueprints/events/new/" accesskey="c">'
63
                . __('Create another?')
64
                . '</a> <a href="' . SYMPHONY_URL . '/blueprints/events/" accesskey="a">'
65
                . __('View all Events')
66
                . '</a>',
67
                Alert::SUCCESS
68
            );
69
        }
70
71
        $isEditing = ($readonly ? true : false);
72
        $fields = array('name' => null, 'filters' => null);

symphony/content/content.blueprintssections.php 1 location

@@ 331-358 (lines=28) @@
328
329
        $formHasErrors = (is_array($this->_errors) && !empty($this->_errors));
330
331
        if ($formHasErrors) {
332
            $this->pageAlert(
333
                __('An error occurred while processing this form. See below for details.'),
334
                Alert::ERROR
335
            );
336
337
            // These alerts are only valid if the form doesn't have errors
338
        } elseif (isset($this->_context[2])) {
339
            $time = Widget::Time();
340
341
            switch ($this->_context[2]) {
342
                case 'saved':
343
                    $message = __('Section updated at %s.', array($time->generate()));
344
                    break;
345
                case 'created':
346
                    $message = __('Section created at %s.', array($time->generate()));
347
            }
348
349
            $this->pageAlert(
350
                $message
351
                . ' <a href="' . SYMPHONY_URL . '/blueprints/sections/new/" accesskey="c">'
352
                . __('Create another?')
353
                . '</a> <a href="' . SYMPHONY_URL . '/blueprints/sections/" accesskey="a">'
354
                . __('View all Sections')
355
                . '</a>',
356
                Alert::SUCCESS
357
            );
358
        }
359
360
        if (isset($_POST['fields'])) {
361
            $fields = array();