ThatGerber/dfp-ads

View on GitHub
includes/admin/Admin.php

Summary

Maintainability
A
25 mins
Test Coverage

Function add_sections has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function add_sections() {

        if ( $this->sections ) {
            foreach ( $this->sections as $section ) {
                $this->create_settings_section( $section );
Severity: Minor
Found in includes/admin/Admin.php - About 25 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Opening brace of a class must be on the line after the definition
Open

class Admin {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces between argument "$form" and closing bracket; 1 found
Open

    public function __construct( Admin\Form $form ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Method name "Admin::menu_page_init" is not in camel caps format
Open

    public function menu_page_init() {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Method name "Admin::register_menu_page" is not in camel caps format
Open

    public function register_menu_page() {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Method name "Admin::register_settings" is not in camel caps format
Open

    public function register_settings() {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces between opening bracket and type hint "Admin"; 1 found
Open

    public function __construct( Admin\Form $form ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Method name "Admin::add_sections" is not in camel caps format
Open

    public function add_sections() {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Method name "Admin::basic_section_callback" is not in camel caps format
Open

    public function basic_section_callback( $args ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces between opening bracket and argument "$settings"; 1 found
Open

    protected function create_settings_field( $settings ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Method name "Admin::new_error" is not in camel caps format
Open

    public function new_error( $message, $type ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Space found after opening bracket of FOREACH loop
Open

            foreach ( $this->sections as $section ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

            foreach ( $this->sections as $section ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Space found before closing bracket of FOREACH loop
Open

            foreach ( $this->fields as $setting ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces between opening bracket and argument "$args"; 1 found
Open

    public function basic_input_callback( $args ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

            if ( isset( $args['description'] ) ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Method name "Admin::add_errors" is not in camel caps format
Open

    public function add_errors() {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces between opening bracket and argument "$message"; 1 found
Open

    public function new_error( $message, $type ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces between opening bracket and argument "$input"; 1 found
Open

    public function options_validate( $input ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Method name "Admin::basic_input_callback" is not in camel caps format
Open

    public function basic_input_callback( $args ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces between argument "$args" and closing bracket; 1 found
Open

    public function basic_input_callback( $args ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces between argument "$section" and closing bracket; 1 found
Open

    protected function create_settings_section( $section ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

        if ( $this->sections ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Method name "Admin::create_settings_field" is not in camel caps format
Open

    protected function create_settings_field( $settings ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

        if ( $this->fields ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Space found after opening bracket of FOREACH loop
Open

            foreach ( $this->fields as $setting ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces between argument "$settings" and closing bracket; 1 found
Open

    protected function create_settings_field( $settings ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Method name "Admin::options_validate" is not in camel caps format
Open

    public function options_validate( $input ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces between opening bracket and argument "$args"; 1 found
Open

    public function basic_section_callback( $args ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces between argument "$type" and closing bracket; 1 found
Open

    public function new_error( $message, $type ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Function closing brace must go on the next line following the body; found 1 blank lines before brace
Open

    }
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Space found before closing bracket of FOREACH loop
Open

            foreach ( $this->sections as $section ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces between argument "$args" and closing bracket; 1 found
Open

    public function basic_section_callback( $args ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Method name "Admin::create_settings_section" is not in camel caps format
Open

    protected function create_settings_section( $section ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

            foreach ( $this->fields as $setting ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces between argument "$input" and closing bracket; 1 found
Open

    public function options_validate( $input ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces between opening bracket and argument "$section"; 1 found
Open

    protected function create_settings_section( $section ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public $user_cap;
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @since  0.2.0
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * User capability necessary to access page
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @var string
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @since  0.2.0
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Title of the menu page
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public $menu_title;
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @since  0.2.0
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * String identifier for the options
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @access public
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @var string
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @since  0.2.0
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @access public
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @since  0.2.0
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Slug for the page
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public $plugin_slug;
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public $options_str;
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @var string
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @access public
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @var string
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @access public
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * String identifier for the options group
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @var string
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @since  0.0.1
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @since  0.0.1
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @var Admin\Form
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public $fields = array();
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @access public
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    private $hook_suffix = '';
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Form Input Values
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * PHP5 Constructor
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->form->title             = $this->page_title;
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @since  0.0.1
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->form->render_form();
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @access public
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @var string
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Individual fields to be added
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->form = $form;
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        );
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        add_action( 'admin_notices', array( $this, 'add_errors' ) );
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @var array
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @var array
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public $values;
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public $sections = array();
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->form->options_str       = $this->options_str;
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @access public
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @since  0.0.1
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->values      = get_option( $this->options_str );
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            'edit.php?post_type=' . $this->post_type,
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $this->page_title,     // Page Title
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            array( $this, 'form' ) // Function
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->form->settings_fields   = $this->options_grp;
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public $page_title;
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @var array
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public $post_type;
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @access public
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public function register_menu_page() {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->fields      = apply_filters( strtolower( $this->options_str ) . '_fields', array() );
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->register_settings();
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public function form() {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->form->values            = $this->values;
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @since  0.0.1
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @since  0.0.1
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public $form;
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Created by page registration
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Tells the settings page which menu item to queue on
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        // Errors
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public function __construct( Admin\Form $form ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->form->settings_sections = $this->plugin_slug;
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Register the Menu Page.
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Displays Form. WordPress requires a function be used to display the input form.
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public function register_settings() {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public $options_grp;
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @access public
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->hook_suffix = add_submenu_page(
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /*
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @access public
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @since  0.0.1
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Settings Page Title
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Stores the Form creation object. Form creation functions run through here.
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @access public
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @access public
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $this->menu_title,     // Menu Title
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->add_sections();
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param Admin\Form $form Handles form functions.
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $this->plugin_slug,    // Menu Slug
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        // Register settings
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @since  0.0.1
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @access public
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @access public
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Register the plugin settings in WordPress.
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Sections of content
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @since  0.0.1
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @since  0.2.0
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $this->user_cap,       // Capability
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        // Creates the settings var to be referred to
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @var string
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public function menu_page_init() {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @since  0.0.1
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @access public
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @var string $hook_suffix
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->sections    = apply_filters( strtolower( $this->options_str ) . '_sections', array() );
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @access public
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $this->options_str,
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return array $new_input
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @access public
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        // Why is it so nested?
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $values = get_option( $this->options_str );
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param array $settings
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *              Callback = Callback function
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            array( $this, 'options_validate' )
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @access public
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *              Description = Description below field
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Basic section callback. Creates the settings header.
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        </div>
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *              Title = Name of field,
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @access public
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

                   id="<?php _e( $id, 'dfp-ads' ); ?>"
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        ?>
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @since  0.0.1
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    protected function create_settings_section( $section ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $section['id'], //    'basic_settings', // ID
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *              ID = input ID,
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @TODO   Set up validation
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

                   name="<?php _e( $id, 'dfp-ads' ); ?>"
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @access protected
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $section['title'], // 'Tags', // Title
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $this->plugin_slug // Page
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *              Field = Type of field,
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            array( $this->form, $settings['callback'] ), // Callback
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @since  0.0.1
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            'settings_updated',
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

                $this->create_settings_field( $setting );
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @TODO   Add Labels
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        // Field values
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            ?>
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Add Error or Update Message to admin page.
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public function add_sections() {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @access public
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Will warn users of an issue or add a message saying it was successful.
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            }
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Sanitize and validate input. Accepts an array, return a sanitized array.
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param array $input
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            }
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public function options_validate( $input ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return $input;
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $args = $args[0];
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $id     = $this->options_str . '[' . $args['id'] . ']';
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $title  = $args['title'];
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $value  = $values[ $args['id'] ];
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

                   value="<?php _e( $value, 'dfp-ads' ); ?>"/>
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $settings['id'], // ID
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @since  0.0.1
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        settings_errors( $this->options_str );
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            foreach ( $this->sections as $section ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        );
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $this->plugin_slug, // Page
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

                echo '<p><em>' . $args['description'] . '</em></p>';
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Creates settings fields
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        add_settings_field(
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $settings['section'], // Section
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Queue up the errors
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        add_settings_error(
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        );
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @since  0.0.1
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public function basic_section_callback( $args ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Create form for plugin settings.
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            }
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    protected function create_settings_field( $settings ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            foreach ( $this->fields as $setting ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            array( $settings ) // Args
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public function add_errors() {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param string $message Message to send to user
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param string $type    Type of Message: Error / Updated
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public function basic_input_callback( $args ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            <?php
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            if ( isset( $args['description'] ) ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        register_setting(
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Creates the settings sections
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @since  0.0.1
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        if ( $this->fields ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *                       Title = Name of field,
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            array( $this, 'basic_section_callback' ), // Callback
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $message,
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $type
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

                $this->create_settings_section( $section );
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @since  0.0.1
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param $args array
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Creates input
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        <div>
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        <?php
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        add_settings_section(
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        );
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        // register our settings
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $this->options_grp,
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $settings['title'], // Title
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @since  0.0.1
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        );
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @access public
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        if ( $this->sections ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @since  0.0.1
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param $args array
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            <input type="<?php echo $args->field; ?>"
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param array $section ID = input ID,
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @access protected
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @access public
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public function new_error( $message, $type ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $this->options_str,
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

        $this->values      = get_option( $this->options_str );
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Opening brace should be on a new line
Open

    public function register_menu_page() {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

        $this->sections    = apply_filters( strtolower( $this->options_str ) . '_sections', array() );
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

        $this->sections    = apply_filters( strtolower( $this->options_str ) . '_sections', array() );
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

        $this->fields      = apply_filters( strtolower( $this->options_str ) . '_fields', array() );
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Opening brace should be on a new line
Open

    public function form() {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

        add_action( 'admin_notices', array( $this, 'add_errors' ) );
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

        $this->fields      = apply_filters( strtolower( $this->options_str ) . '_fields', array() );
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Opening brace should be on a new line
Open

    public function menu_page_init() {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

        $this->fields      = apply_filters( strtolower( $this->options_str ) . '_fields', array() );
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

        $this->sections    = apply_filters( strtolower( $this->options_str ) . '_sections', array() );
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

        $this->sections    = apply_filters( strtolower( $this->options_str ) . '_sections', array() );
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Opening brace should be on a new line
Open

    public function register_settings() {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

        add_action( 'admin_notices', array( $this, 'add_errors' ) );
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Opening brace should be on a new line
Open

    public function __construct( Admin\Form $form ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

        $this->fields      = apply_filters( strtolower( $this->options_str ) . '_fields', array() );
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

        $this->values      = get_option( $this->options_str );
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

                   name="<?php _e( $id, 'dfp-ads' ); ?>"
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

                $this->create_settings_field( $setting );
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Opening brace should be on a new line
Open

    public function add_sections() {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

        $values = get_option( $this->options_str );
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces after opening bracket; 1 found
Open

            foreach ( $this->fields as $setting ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

                   id="<?php _e( $id, 'dfp-ads' ); ?>"
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

        settings_errors( $this->options_str );
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces after opening bracket; 1 found
Open

        if ( $this->sections ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

                $this->create_settings_section( $section );
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

            if ( isset( $args['description'] ) ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Opening brace should be on a new line
Open

    protected function create_settings_field( $settings ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

                   value="<?php _e( $value, 'dfp-ads' ); ?>"/>
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

                   value="<?php _e( $value, 'dfp-ads' ); ?>"/>
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Opening brace should be on a new line
Open

    protected function create_settings_section( $section ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Opening brace should be on a new line
Open

    public function options_validate( $input ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

                   name="<?php _e( $id, 'dfp-ads' ); ?>"
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Opening brace should be on a new line
Open

    public function basic_section_callback( $args ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

            if ( isset( $args['description'] ) ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

        settings_errors( $this->options_str );
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

                $this->create_settings_field( $setting );
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

        $values = get_option( $this->options_str );
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

                $this->create_settings_section( $section );
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

                   id="<?php _e( $id, 'dfp-ads' ); ?>"
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces after opening bracket; 1 found
Open

        if ( $this->fields ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces after opening bracket; 1 found
Open

            foreach ( $this->sections as $section ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Opening brace should be on a new line
Open

    public function add_errors() {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Expected 0 spaces after opening bracket; 1 found
Open

            if ( isset( $args['description'] ) ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Opening brace should be on a new line
Open

    public function basic_input_callback( $args ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

Opening brace should be on a new line
Open

    public function new_error( $message, $type ) {
Severity: Minor
Found in includes/admin/Admin.php by phpcodesniffer

There are no issues that match your filters.

Category
Status