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.
Completed
Push — master ( 078d1e...95441f )
by
unknown
10s
created

setup.php ➔ setControllers()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
1
<?php
0 ignored issues
show
Coding Style Compatibility introduced by
For compatibility and reusability of your code, PSR1 recommends that a file should introduce either new symbols (like classes, functions, etc.) or have side-effects (like outputting something, or including other files), but not both at the same time. The first symbol is defined on line 9 and the first side effect is on line 19.

The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.

The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.

To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.

Loading history...
2
3
namespace Undefined\Stash;
4
5
/**
6
 * Theme setup
7
 */
8
9
function setControllers()
10
{
11
    /**
12
     * Add the main language page id and name for the controller here
13
     */
14
    Controller::Instance()->setPages([
15
        2 => "sample",
16
    ]);
17
}
18
19
add_action('init', __NAMESPACE__ . '\\setControllers');
20
21
function setup()
22
{
23
    // Enable features from Soil when plugin is activated
24
    // https://roots.io/plugins/soil/
25
    add_theme_support('soil-clean-up');
26
    add_theme_support('soil-nav-walker');
27
    add_theme_support('soil-nice-search');
28
    add_theme_support('soil-jquery-cdn');
29
    add_theme_support('soil-relative-urls');
30
31
    // Make theme available for translation
32
    // Community translations can be found at https://github.com/roots/sage-translations
33
    load_theme_textdomain('stash', get_template_directory() . '/lang');
34
35
    // Enable plugins to manage the document title
36
    // http://codex.wordpress.org/Function_Reference/add_theme_support#Title_Tag
37
    add_theme_support('title-tag');
38
39
    // Register wp_nav_menu() menus
40
    // http://codex.wordpress.org/Function_Reference/register_nav_menus
41
    register_nav_menus([
42
        'primary_navigation' => __('Primary Navigation', 'stash')
43
    ]);
44
45
    // Enable post thumbnails
46
    // http://codex.wordpress.org/Post_Thumbnails
47
    // http://codex.wordpress.org/Function_Reference/set_post_thumbnail_size
48
    // http://codex.wordpress.org/Function_Reference/add_image_size
49
    add_theme_support('post-thumbnails');
50
51
    // Enable post formats
52
    // http://codex.wordpress.org/Post_Formats
53
    add_theme_support('post-formats', ['aside', 'gallery', 'link', 'image', 'quote', 'video', 'audio']);
54
55
    // Enable HTML5 markup support
56
    // http://codex.wordpress.org/Function_Reference/add_theme_support#HTML5
57
    add_theme_support('html5', ['caption', 'comment-form', 'comment-list', 'gallery', 'search-form']);
58
59
    add_theme_support('menus');
60
}
61
62
add_action('after_setup_theme', __NAMESPACE__ . '\\setup');
63