hnhdigital-os/laravel-resources-loader

View on GitHub
src/Assets/IcheckInput.php

Summary

Maintainability
A
0 mins
Test Coverage

Showing 3 of 3 total issues

The method __construct has a boolean flag argument $version, which is a certain sign of a Single Responsibility Principle violation.
Open

public function __construct($version = false)
Severity: Minor
Found in src/Assets/IcheckInput.php by phpmd

The method config uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

} else {
$version = Resource::version(class_basename(__CLASS__));
Resource::add('https://cdnjs.cloudflare.com/ajax/libs/iCheck/'.$version.'/skins/'.$skin.'/'.$colour.'.css');
}
Severity: Minor
Found in src/Assets/IcheckInput.php by phpmd

The method __construct uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

} else {
$version = Resource::version(class_basename(__CLASS__), $version);
Resource::add('https://cdnjs.cloudflare.com/ajax/libs/iCheck/'.$version.'/icheck.min.js');
}
Severity: Minor
Found in src/Assets/IcheckInput.php by phpmd
Category
Status