Method addCommands
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function addCommands()
{
$this->commands([
// Buckets
\Seat\Eveapi\Commands\Seat\Buckets\Info::class,
The class EveapiServiceProvider has a coupling between objects value of 34. Consider to reduce the number of dependencies under 13. Open
class EveapiServiceProvider extends AbstractSeatPlugin
{
/**
* Bootstrap the application services.
*
- 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 using static access to class '\Seat\Eveapi\Models\RefreshToken' in method 'addObservers'. Open
RefreshToken::observe(\Seat\Eveapi\Observers\RefreshTokenObserver::class);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Seat\Eveapi\Models\Character\CharacterAffiliation' in method 'addObservers'. Open
CharacterAffiliation::observe(\Seat\Eveapi\Observers\CharacterAffiliationObserver::class);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method add_migrations is not named in camelCase. Open
private function add_migrations()
{
$this->loadMigrationsFrom(__DIR__ . '/database/migrations/');
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method add_sde_seeders is not named in camelCase. Open
private function add_sde_seeders()
{
// skipped until method is added back into services.
// $this->registerSdeSeeders([
// \Seat\Eveapi\Database\Seeders\Sde\MapDenormalizeSeeder::class,
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method configure_api is not named in camelCase. Open
private function configure_api()
{
$this->registerApiAnnotationsPath([
__DIR__ . '/Models',
]);
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}