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 ( 81a8a0...75582b )
by Vincent
11:02 queued 02:43
created

Custom   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 22
rs 10
c 0
b 0
f 0
wmc 4
lcom 0
cbo 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A registerPostTypes() 0 6 2
A registerTaxonomies() 0 6 2
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 8 and the first side effect is on line 31.

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\Custom;
4
5
/**
6
 * Get paths for assets
7
 */
8
class Custom
9
{
10
    /**
11
     * Load all files from the inc/post-types/ folder
12
     */
13
    public function registerPostTypes()
14
    {
15
        foreach (glob(get_template_directory() . "/inc/post-types/*.php") as $filename) {
16
            include_once $filename;
17
        }
18
    }
19
20
    /**
21
     * Load all files from the inc/post-types/ folder
22
     */
23
    public function registerTaxonomies()
24
    {
25
        foreach (glob(get_template_directory() . "/inc/taxonomies/*.php") as $filename) {
26
            include_once $filename;
27
        }
28
    }
29
}
30
31
add_action('init', function () {
32
    $custom = new Custom();
33
    $custom->registerPostTypes();
34
    $custom->registerTaxonomies();
35
}, 100);