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
Pull Request — master (#76)
by Vincent
05:44
created

setup.php ➔ setControllers()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 6
rs 9.4285
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 16.

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