src/Chippyash/SAccounts/Chart.php
The class Chart has a coupling between objects value of 15. Consider to reduce the number of dependencies under 13. Open
Open
class Chart implements Identifiable
{
use Identifying;
/**@+
- 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
Expected 1 space before opening brace; found 0 Open
Open
->accnt(function () use ($nId){
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
Open
(($account->getType()->getValue() & AccountType::DR) == AccountType::DR), false)
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
->account( function ($accnt) {
- Exclude checks
Closing parenthesis of a multi-line function call must be on a line by itself Open
Open
(($account->getType()->getValue() & AccountType::DR) == AccountType::DR), false)
- Exclude checks
Expected 0 spaces before closing bracket; newline found Open
Open
Match::on(Option::create(
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 20 Open
Open
(($account->getType()->getValue() & AccountType::DR) == AccountType::DR), false)
- Exclude checks