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.

Issues (3647)

symphony/content/content.ajaxsections.php (2 issues)

1
<?php
2
/**
3
 * @package content
4
 */
5
/**
6
 * The AjaxSections page return an object of all sections and their fields
7
 * that are available for pre-population
8
 */
9
10
class contentAjaxSections extends JSONPage
0 ignored issues
show
This class is not in CamelCase format.

Classes in PHP are usually named in CamelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. The whole name starts with a capital letter as well.

Thus the name database provider becomes DatabaseProvider.

Loading history...
11
{
12
    public function view()
13
    {
14
        $sort = General::sanitize($_REQUEST['sort']);
15
        if (empty($sort)) {
16
            $sort = 'sortorder';
17
        }
0 ignored issues
show
No blank line found after control structure
Loading history...
18
        $sections = SectionManager::fetch(null, 'ASC', $sort);
19
        $options = array();
20
21
        if (is_array($sections) && !empty($sections)) {
22
            foreach ($sections as $section) {
23
                $section_fields = $section->fetchFields();
24
25
                if (!is_array($section_fields)) {
26
                    continue;
27
                }
28
29
                $fields = array();
30
31
                foreach ($section_fields as $f) {
32
                    if ($f->canPrePopulate()) {
33
                        $fields[] = array(
34
                            'id' => $f->get('id'),
35
                            'name' => $f->get('label'),
36
                            'handle' => $f->get('element_name'),
37
                            'type' => $f->get('type')
38
                        );
39
                    }
40
                }
41
42
                if (!empty($fields)) {
43
                    $options[] = array(
44
                        'id' => $section->get('id'),
45
                        'name' => $section->get('name'),
46
                        'handle' => $section->get('handle'),
47
                        'fields' => $fields
48
                    );
49
                }
50
            }
51
        }
52
53
        $this->_Result['sections'] = $options;
54
    }
55
}
56