soderlind/plugin-customizer

View on GitHub
src/Blank_Slate.php

Summary

Maintainability
A
2 hrs
Test Coverage

Method init has 52 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        function init( $slug = '', $plugin_url, $plugin_root ) {
            // self::$param_name = sanitize_title( get_called_class() , 'plugin_customizer' );
            if ( '' == $slug ) {
                wp_die( 'slug missing', $title = 'BlankSlate::init' );
            }
Severity: Major
Found in src/Blank_Slate.php - About 2 hrs to fix

    Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space
    Open

                $this->plugin_url = $plugin_url;
    Severity: Minor
    Found in src/Blank_Slate.php by phpcodesniffer

    Assignments must be the first block of code on a line
    Open

                    wp_die( 'slug missing', $title = 'BlankSlate::init' );
    Severity: Minor
    Found in src/Blank_Slate.php by phpcodesniffer

    Equals sign not aligned with surrounding assignments; expected 7 spaces but found 1 space
    Open

                    $src = $this->plugin_url . 'assets/js/plugin-customizer-blank-slate.js';
    Severity: Minor
    Found in src/Blank_Slate.php by phpcodesniffer

    Equals sign not aligned with surrounding assignments; expected 8 spaces but found 1 space
    Open

                $this->slug = $slug;
    Severity: Minor
    Found in src/Blank_Slate.php by phpcodesniffer

    Array double arrow not aligned correctly; expected 2 space(s) between "'queryParamName'" and double arrow, but found 1.
    Open

                        'queryParamName' => $this->slug,
    Severity: Minor
    Found in src/Blank_Slate.php by phpcodesniffer

    Equals sign not aligned with surrounding assignments; expected 7 spaces but found 1 space
    Open

                    $ver = false;
    Severity: Minor
    Found in src/Blank_Slate.php by phpcodesniffer

    Equals sign not aligned with surrounding assignments; expected 6 spaces but found 1 space
    Open

                    $deps = array( 'customize-controls' );
    Severity: Minor
    Found in src/Blank_Slate.php by phpcodesniffer

    Equals sign not aligned with surrounding assignments; expected 4 spaces but found 1 space
    Open

                    $handle = 'plugin-customizer-blank-slate';
    Severity: Minor
    Found in src/Blank_Slate.php by phpcodesniffer

    There are no issues that match your filters.

    Category
    Status