uruba/FinanCalc

View on GitHub

Showing 109 of 109 total issues

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

            $bondFaceValue,
            $bondAnnualCouponRate,
            $bondAnnualYield,
            $bondYearsToMaturity,
            $bondPaymentFrequency
Severity: Minor
Found in src/Calculators/Factories/BondDurationCalculatorFactory.php - About 35 mins to fix

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

                $bondFaceValue,
                $bondMarketValue,
                $bondAnnualCouponRate,
                $bondYearsToMaturity,
                $bondPaymentFrequency
    Severity: Minor
    Found in src/Calculators/Factories/BondYTMCalculatorFactory.php - About 35 mins to fix

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

                  $bondFaceValue,
                  $bondAnnualCouponRate,
                  $bondVIR,
                  $bondYearsToMaturity,
                  $bondPaymentFrequency
      Severity: Minor
      Found in src/Calculators/Factories/BondFairValueCalculatorFactory.php - About 35 mins to fix

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

                    $bondFaceValue,
                    $bondAnnualCouponRate,
                    $bondAnnualYield,
                    $bondYearsToMaturity,
                    $bondPaymentFrequency = 1
        Severity: Minor
        Found in src/Calculators/BondDurationCalculator.php - About 35 mins to fix

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

                      $bondFaceValue,
                      $bondAnnualCouponRate,
                      $bondVIR,
                      $bondYearsToMaturity,
                      $bondPaymentFrequency = 1
          Severity: Minor
          Found in src/Calculators/BondFairValueCalculator.php - About 35 mins to fix

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

                        $bondFaceValue,
                        $bondMarketValue,
                        $bondAnnualCouponRate,
                        $bondYearsToMaturity,
                        $bondPaymentFrequency = 1
            Severity: Minor
            Found in src/Calculators/BondYTMCalculator.php - About 35 mins to fix

              Expected 1 space before USE keyword; found 16
              Open

                              use ($domDocument, &$funcArrayToXML) {

              Function closing brace must go on the next line following the body; found 1 blank lines before brace
              Open

                      }
              Severity: Minor
              Found in src/Utils/Time/TimeSpan.php by phpcodesniffer

              The closing brace for the class must go on the next line after the body
              Open

                  }

              There must be one blank line after the last USE statement; 2 found;
              Open

                  use FinanCalc\Utils\MathFuncs;

              Function closing brace must go on the next line following the body; found 1 blank lines before brace
              Open

                      }

              The closing brace for the class must go on the next line after the body
              Open

                  }

              Blank line found at start of control structure
              Open

                          if (Helpers::checkIfNotNull($annuityPaymentType)) {

              There must be one blank line after the last USE statement; 2 found;
              Open

                  use FinanCalc\Interfaces\Calculator\CalculatorFactoryAbstract;

              There must be one blank line after the namespace declaration
              Open

              namespace FinanCalc\Calculators\Factories {

              The closing brace for the class must go on the next line after the body
              Open

                  }

              The closing brace for the class must go on the next line after the body
              Open

                  }
              Severity: Minor
              Found in src/Utils/Helpers.php by phpcodesniffer

              There must be one blank line after the last USE statement; 2 found;
              Open

                  use FinanCalc\Interfaces\Calculator\CalculatorFactoryAbstract;

              The closing brace for the class must go on the next line after the body
              Open

                  }
              Severity: Minor
              Found in src/Utils/Lambdas.php by phpcodesniffer

              Missing class import via use statement (line '23', column '32').
              Open

                          $domDocument = new \DOMDocument('1.0', 'UTF-8');

              MissingImport

              Since: 2.7.0

              Importing all external classes in a file through use statements makes them clearly visible.

              Example

              function make() {
                  return new \stdClass();
              }

              Source http://phpmd.org/rules/cleancode.html#MissingImport

              Severity
              Category
              Status
              Source
              Language