vindi/vindi-woocommerce

View on GitHub
src/utils/FrontendFilesLoader.php

Summary

Maintainability
A
0 mins
Test Coverage

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 10 and the first side effect is on line 6.
Open

<?php

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

class FrontendFilesLoader {

Visibility must be declared on method "__construct"
Open

  function __construct() {

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

    exit; // Exit if accessed directly

Line exceeds 120 characters; contains 149 characters
Open

    wp_register_script('jquery-mask', plugins_url('/assets/js/jquery.mask.min.js', plugin_dir_path(__FILE__)), array('jquery'), VINDI_VERSION, true);

Line exceeds 120 characters; contains 144 characters
Open

    wp_register_style('vindi_woocommerce_admin_style', plugins_url('/assets/css/admin.css', plugin_dir_path(__FILE__)), array(), VINDI_VERSION);

Line exceeds 120 characters; contains 169 characters
Open

    wp_register_script('vindi_woocommerce_admin_js', plugins_url('/assets/js/admin.js', plugin_dir_path(__FILE__)), array('jquery', 'jquery-mask'), VINDI_VERSION, true);

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    wp_register_script('jquery-mask', plugins_url('/assets/js/jquery.mask.min.js', plugin_dir_path(__FILE__)), array('jquery'), VINDI_VERSION, true);

Line indented incorrectly; expected at least 4 spaces, found 2
Open

  die();

Opening brace should be on a new line
Open

  function __construct() {

Line indented incorrectly; expected at least 4 spaces, found 2
Open

  {

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    add_action('wp_enqueue_scripts', array($this, 'frontendFiles'));

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    wp_enqueue_script('vindi_woocommerce_admin_js');

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    add_action('admin_enqueue_scripts', array($this, 'adminFiles'));

Line indented incorrectly; expected 4 spaces, found 2
Open

  }

Line indented incorrectly; expected 4 spaces, found 2
Open

  }

Line indented incorrectly; expected 4 spaces, found 2
Open

  function __construct() {

Line indented incorrectly; expected 4 spaces, found 2
Open

  public static function adminFiles()

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    wp_register_style('vindi_woocommerce_admin_style', plugins_url('/assets/css/admin.css', plugin_dir_path(__FILE__)), array(), VINDI_VERSION);

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    wp_register_script('vindi_woocommerce_admin_js', plugins_url('/assets/js/admin.js', plugin_dir_path(__FILE__)), array('jquery', 'jquery-mask'), VINDI_VERSION, true);

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    wp_enqueue_style('vindi_woocommerce_admin_style');

There are no issues that match your filters.

Category
Status