hnhdigital-os/laravel-resources-loader

View on GitHub
src/Assets/Bootstrap.php

Summary

Maintainability
A
0 mins
Test Coverage

Showing 2 of 2 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/Bootstrap.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://maxcdn.bootstrapcdn.com/bootstrap/'.$version.'/js/bootstrap.min.js');
}
Severity: Minor
Found in src/Assets/Bootstrap.php by phpmd
Category
Status