JoryHogeveen/view-admin-as

View on GitHub

Showing 56 of 72 total issues

Expected 1 space after comma in function call; 7 found
Open

    define( 'VIEW_ADMIN_AS_FILE',       __FILE__ );
Severity: Minor
Found in view-admin-as.php by phpcodesniffer

When a multi-item array uses associative keys, each value should start on a new line.
Open

                'values'     => array( 'role' => '', 'new_name' => '' ),

Method name "_get_identifier" should not be prefixed with an underscore to indicate visibility
Open

    protected function _get_identifier( $hook, $callback, $priority ) {
Severity: Minor
Found in includes/class-hooks.php by phpcodesniffer

Method name "_get_actions" should not be prefixed with an underscore to indicate visibility
Open

    public function _get_actions( $keys = null, $objects = false ) {
Severity: Minor
Found in includes/class-hooks.php by phpcodesniffer

Found precision alignment of 1 spaces.
Open

                         *

Found precision alignment of 1 spaces.
Open

                         * http://wordpress.stackexchange.com/a/44539

When a multi-item array uses associative keys, each value should start on a new line.
Open

                'values'     => array( 'role' => '', 'capabilities' => '' ),

Method name "_remove_own" should not be prefixed with an underscore to indicate visibility
Open

    protected function _remove_own( $hooks, $hook, $priority, $function, $class ) {
Severity: Minor
Found in includes/class-hooks.php by phpcodesniffer

Method name "_validate_priority" should not be prefixed with an underscore to indicate visibility
Open

    protected function _validate_priority( $hooks, $hook, $callback, $priority ) {
Severity: Minor
Found in includes/class-hooks.php by phpcodesniffer

Method name "_autoload" should not be prefixed with an underscore to indicate visibility
Open

    public function _autoload( $class ) {
Severity: Minor
Found in includes/class-vaa.php by phpcodesniffer

Overriding WordPress globals is prohibited. Found assignment to $GLOBALS
Open

                $GLOBALS['super_admins'] = $super_admins;
Severity: Minor
Found in includes/class-view.php by phpcodesniffer

Missing class import via use statement (line '137', column '26').
Open

            $this->selected = new Groups_Group( $this->store->get_view( $this->type ) );
Severity: Minor
Found in modules/class-groups.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '917', column '32').
Open

                    $users[ $user->ID ] = new WP_User( $user );
Severity: Minor
Found in modules/class-users.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Avoid too many return statements within this method.
Open

        return $data;
Severity: Major
Found in modules/class-role-manager.php - About 30 mins to fix

    Missing class import via use statement (line '237', column '27').
    Open

            $this->hooks      = new VAA_View_Admin_As_Hooks();
    Severity: Minor
    Found in includes/class-vaa.php by phpmd

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

    Whitespace found at end of line
    Open

            
    Severity: Minor
    Found in includes/class-util.php by phpcodesniffer
    Severity
    Category
    Status
    Source
    Language