src/utils/FrontendFilesLoader.php
Showing 21 of 21 total issues
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 11 and the first side effect is on line 6. Open
Open
<?php
- Exclude checks
Opening brace of a class must be on the line after the definition Open
Open
class FrontendFilesLoader {
- Exclude checks
Visibility must be declared on method "__construct" Open
Open
function __construct() {
- Exclude checks
Line exceeds 120 characters; contains 149 characters Open
Open
wp_register_script('jquery-mask', plugins_url('/assets/js/jquery.mask.min.js', plugin_dir_path(__FILE__)), array('jquery'), VINDI_VERSION, true);
- Exclude checks
Line exceeds 120 characters; contains 169 characters Open
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);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
exit; // Exit if accessed directly
- Exclude checks
Line exceeds 120 characters; contains 144 characters Open
Open
wp_register_style('vindi_woocommerce_admin_style', plugins_url('/assets/css/admin.css', plugin_dir_path(__FILE__)), array(), VINDI_VERSION);
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
Open
{
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
Open
die();
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
wp_register_style('vindi_woocommerce_admin_style', plugins_url('/assets/css/admin.css', plugin_dir_path(__FILE__)), array(), VINDI_VERSION);
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
Open
public static function adminFiles()
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
wp_enqueue_style('vindi_woocommerce_admin_style');
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
add_action('admin_enqueue_scripts', array($this, 'adminFiles'));
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
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);
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
add_action('wp_enqueue_scripts', array($this, 'frontendFiles'));
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
Open
function __construct() {
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
Open
}
- Exclude checks
Opening brace should be on a new line Open
Open
function __construct() {
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
Open
}
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
wp_enqueue_script('vindi_woocommerce_admin_js');
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
wp_register_script('jquery-mask', plugins_url('/assets/js/jquery.mask.min.js', plugin_dir_path(__FILE__)), array('jquery'), VINDI_VERSION, true);
- Exclude checks