uruba/FinanCalc

View on GitHub
src/Calculators/BondYTMCalculator.php

Summary

Maintainability
A
1 hr
Test Coverage

Method getApproxBondYTM has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        public function getApproxBondYTM()
        {
            // we need to calculate the coupon payment C = F*(c/payment frequency)
            $couponPayment =
                MathFuncs::mul(
Severity: Minor
Found in src/Calculators/BondYTMCalculator.php - About 1 hr 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

      TODO found
      Open

              // TODO – add a method for precise bond YTM calculation by means of a polynomial equation
      Severity: Minor
      Found in src/Calculators/BondYTMCalculator.php by fixme

      Multi-line function call not indented correctly; expected 28 spaces but found 32
      Open

                                      $this->bondMarketValue),

      Multi-line function call not indented correctly; expected 20 spaces but found 24
      Open

                              2));

      Closing parenthesis of a multi-line function call must be on a line by itself
      Open

                              2));

      Multi-line function call not indented correctly; expected 16 spaces but found 24
      Open

                              2));

      Closing parenthesis of a multi-line function call must be on a line by itself
      Open

                                      $this->bondMarketValue),

      Closing parenthesis of a multi-line function call must be on a line by itself
      Open

                              2));

      There are no issues that match your filters.

      Category
      Status