src/Calculators/BondFairValueCalculator.php
Method getBondFairValue
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getBondFairValue()
{
// we need to get the coupon rate per payment period = c/payment frequency
$couponRateForPeriod = MathFuncs::div(
$this->bondAnnualCouponRate,
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$bondFaceValue,
$bondAnnualCouponRate,
$bondVIR,
$bondYearsToMaturity,
$bondPaymentFrequency = 1
Line exceeds 120 characters; contains 123 characters Open
Open
// now we can use the formula to calculate the real value of the bond (i.e., the present value of its payments)
- Exclude checks
The variable $PVofUnitBondAnnuity is not named in camelCase. Open
Open
public function getBondFairValue()
{
// we need to get the coupon rate per payment period = c/payment frequency
$couponRateForPeriod = MathFuncs::div(
$this->bondAnnualCouponRate,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $VIRForPeriod is not named in camelCase. Open
Open
public function getBondFairValue()
{
// we need to get the coupon rate per payment period = c/payment frequency
$couponRateForPeriod = MathFuncs::div(
$this->bondAnnualCouponRate,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $VIRForPeriod is not named in camelCase. Open
Open
public function getBondFairValue()
{
// we need to get the coupon rate per payment period = c/payment frequency
$couponRateForPeriod = MathFuncs::div(
$this->bondAnnualCouponRate,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $VIRForPeriod is not named in camelCase. Open
Open
public function getBondFairValue()
{
// we need to get the coupon rate per payment period = c/payment frequency
$couponRateForPeriod = MathFuncs::div(
$this->bondAnnualCouponRate,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $VIRForPeriod is not named in camelCase. Open
Open
public function getBondFairValue()
{
// we need to get the coupon rate per payment period = c/payment frequency
$couponRateForPeriod = MathFuncs::div(
$this->bondAnnualCouponRate,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $PVofUnitBondAnnuity is not named in camelCase. Open
Open
public function getBondFairValue()
{
// we need to get the coupon rate per payment period = c/payment frequency
$couponRateForPeriod = MathFuncs::div(
$this->bondAnnualCouponRate,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}