chippyash/Simple-Accounts

View on GitHub

Showing 5 of 113 total issues

Method createTransactionFromElement has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function createTransactionFromElement(\DOMElement $txn, $crcyCode, \DOMXPath $xpath)
    {
        $drNodes = $xpath->query("./split[@type='DR']", $txn);
        $transaction = (new SplitTransaction(
            new \DateTime($txn->attributes->getNamedItem('date')->nodeValue),
Severity: Minor
Found in src/Chippyash/SAccounts/Storage/Journal/Xml.php - About 1 hr to fix

    Method buildTree has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        protected function buildTree(Node $tree, \DOMNode $node, Chart $chart, array $accountTypes)
        {
            //create current node
            list($nominal, $type, $name, $id) = FFor::create()
                ->attributes(function () use ($node) {
    Severity: Minor
    Found in src/Chippyash/SAccounts/Accountant.php - About 1 hr to fix

      Method writeSplit has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          protected function writeSplit(\DOMDocument $dom, \DOMElement $txn, $type, $amount, $nominal)
      Severity: Minor
      Found in src/Chippyash/SAccounts/Storage/Journal/Xml.php - About 35 mins to fix

        Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            public function __construct(Nominal $drAc, Nominal $crAc, Currency $amount, StringType $note = null, \DateTime $date = null)
        Severity: Minor
        Found in src/Chippyash/SAccounts/Transaction/SimpleTransaction.php - About 35 mins to fix

          Avoid too many return statements within this method.
          Open

                          return new IntType($attributes->getNamedItem('id')->nodeValue);
          Severity: Major
          Found in src/Chippyash/SAccounts/Accountant.php - About 30 mins to fix
            Severity
            Category
            Status
            Source
            Language