src/Spiritix/LadaCache/LadaCacheServiceProvider.php
The class LadaCacheServiceProvider has a coupling between objects value of 13. Consider to reduce the number of dependencies under 13. Open
Open
class LadaCacheServiceProvider extends ServiceProvider
{
/**
* The package configuration file.
*/
- Read upRead up
- Exclude checks
CouplingBetweenObjects
Since: 1.1.0
A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability
Example
class Foo {
/**
* @var \foo\bar\X
*/
private $x = null;
/**
* @var \foo\bar\Y
*/
private $y = null;
/**
* @var \foo\bar\Z
*/
private $z = null;
public function setFoo(\Foo $foo) {}
public function setBar(\Bar $bar) {}
public function setBaz(\Baz $baz) {}
/**
* @return \SplObjectStorage
* @throws \OutOfRangeException
* @throws \InvalidArgumentException
* @throws \ErrorException
*/
public function process(\Iterator $it) {}
// ...
}
Source https://phpmd.org/rules/design.html#couplingbetweenobjects
Avoid unused parameters such as '$app'. Open
Open
$this->app->bind('db.connection.sqlserver', function ($app, $parameters) {
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Expected 1 space after FUNCTION keyword; 0 found Open
Open
$this->app->singleton('command.lada-cache.flush', function() {
- Exclude checks
Expected 1 space after FUNCTION keyword; 0 found Open
Open
$this->app->singleton('command.lada-cache.disable', function() {
- Exclude checks
Expected 1 space after FUNCTION keyword; 0 found Open
Open
$this->app->singleton('lada.invalidator', function($app) {
- Exclude checks
Expected 1 space after FUNCTION keyword; 0 found Open
Open
$this->app->singleton('lada.handler', function($app) {
- Exclude checks
Expected 1 space after FUNCTION keyword; 0 found Open
Open
$this->app->singleton('lada.collector', function() {
- Exclude checks
Expected 1 space after FUNCTION keyword; 0 found Open
Open
$this->app->singleton('command.lada-cache.enable', function() {
- Exclude checks
Expected 1 space after FUNCTION keyword; 0 found Open
Open
$this->app->singleton('lada.cache', function($app) {
- Exclude checks
Expected 1 space after FUNCTION keyword; 0 found Open
Open
$this->app->singleton('lada.redis', function($app) {
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
Open
__DIR__ . '/../../../config/' . self::CONFIG_FILE, str_replace('.php', '', self::CONFIG_FILE)
- Exclude checks