@@ -44,9 +44,9 @@ |
||
| 44 | 44 | * @param null $stockAnnualDividendsGrowth |
| 45 | 45 | */ |
| 46 | 46 | function __construct(StockDDMTypes $dividendDiscountModelType, |
| 47 | - $stockVIR, |
|
| 48 | - $stockAnnualDividendValue, |
|
| 49 | - $stockAnnualDividendsGrowth = null) { |
|
| 47 | + $stockVIR, |
|
| 48 | + $stockAnnualDividendValue, |
|
| 49 | + $stockAnnualDividendsGrowth = null) { |
|
| 50 | 50 | $this->setDividendDiscountModelType($dividendDiscountModelType); |
| 51 | 51 | $this->setStockVIR($stockVIR); |
| 52 | 52 | $this->setStockAnnualDividendsValue($stockAnnualDividendValue); |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | /** |
| 71 | 71 | * @param $stockVIR |
| 72 | 72 | */ |
| 73 | - public function setStockVIR($stockVIR){ |
|
| 73 | + public function setStockVIR($stockVIR) { |
|
| 74 | 74 | $this->setProperty("stockVIR", $stockVIR, Lambdas::checkIfPositive()); |
| 75 | 75 | } |
| 76 | 76 | |
@@ -26,8 +26,8 @@ |
||
| 26 | 26 | * @param TimeSpan $time |
| 27 | 27 | */ |
| 28 | 28 | function __construct($amountDue, |
| 29 | - $annualDiscountRate, |
|
| 30 | - TimeSpan $time) { |
|
| 29 | + $annualDiscountRate, |
|
| 30 | + TimeSpan $time) { |
|
| 31 | 31 | $this->setAmountDue($amountDue); |
| 32 | 32 | $this->setAnnualDiscountRate($annualDiscountRate); |
| 33 | 33 | $this->setTime($time); |
@@ -57,9 +57,9 @@ |
||
| 57 | 57 | * @param $debtInterest |
| 58 | 58 | */ |
| 59 | 59 | function __construct($debtPrincipal, |
| 60 | - $debtNoOfCompoundingPeriods, |
|
| 61 | - TimeSpan $debtPeriodLength, |
|
| 62 | - $debtInterest) { |
|
| 60 | + $debtNoOfCompoundingPeriods, |
|
| 61 | + TimeSpan $debtPeriodLength, |
|
| 62 | + $debtInterest) { |
|
| 63 | 63 | $this->setDebtPrincipalWithoutRecalculation($debtPrincipal); |
| 64 | 64 | $this->setDebtNoOfCompoundingPeriodsWithoutRecalculation($debtNoOfCompoundingPeriods); |
| 65 | 65 | $this->setDebtPeriodLength($debtPeriodLength); |
@@ -131,7 +131,7 @@ |
||
| 131 | 131 | // storing the debt repayments (i.e., representing the amortization schedule) |
| 132 | 132 | // NOTE: rounding to two decimal places takes place when calculating the interest and principal parts |
| 133 | 133 | // of a single repayment |
| 134 | - for($i = 1; $i <= $this->debtNoOfCompoundingPeriods; $i++) { |
|
| 134 | + for ($i = 1; $i <= $this->debtNoOfCompoundingPeriods; $i++) { |
|
| 135 | 135 | $interestAmount = MathFuncs::mul($this->debtInterest, $unpaidBalance); |
| 136 | 136 | $principalAmount = MathFuncs::sub($this->getDebtSingleRepayment(), $interestAmount); |
| 137 | 137 | |
@@ -37,8 +37,8 @@ |
||
| 37 | 37 | * @param $noOfStocks |
| 38 | 38 | */ |
| 39 | 39 | function __construct($totalDividends, |
| 40 | - $earningsAfterTaxes, |
|
| 41 | - $noOfStocks) { |
|
| 40 | + $earningsAfterTaxes, |
|
| 41 | + $noOfStocks) { |
|
| 42 | 42 | $this->setTotalDividends($totalDividends); |
| 43 | 43 | $this->setEarningsAfterTaxes($earningsAfterTaxes); |
| 44 | 44 | $this->setNoOfStocks($noOfStocks); |
@@ -52,10 +52,10 @@ |
||
| 52 | 52 | * @param $bondPaymentFrequency |
| 53 | 53 | */ |
| 54 | 54 | function __construct($bondFaceValue, |
| 55 | - $bondAnnualCouponRate, |
|
| 56 | - $bondAnnualYield, |
|
| 57 | - $bondYearsToMaturity, |
|
| 58 | - $bondPaymentFrequency = 1) { |
|
| 55 | + $bondAnnualCouponRate, |
|
| 56 | + $bondAnnualYield, |
|
| 57 | + $bondYearsToMaturity, |
|
| 58 | + $bondPaymentFrequency = 1) { |
|
| 59 | 59 | $this->setBondFaceValue($bondFaceValue); |
| 60 | 60 | $this->setBondAnnualCouponRate($bondAnnualCouponRate); |
| 61 | 61 | $this->setBondAnnualYield($bondAnnualYield); |
@@ -90,7 +90,7 @@ |
||
| 90 | 90 | public function getBondNominalCashFlows() { |
| 91 | 91 | // nominal cash flows = coupons each period + face value in the last period |
| 92 | 92 | $numberOfPayments = $this->getBondNoOfPayments(); |
| 93 | - $couponPayment = $this->getCouponPayment(); |
|
| 93 | + $couponPayment = $this->getCouponPayment(); |
|
| 94 | 94 | |
| 95 | 95 | $nominalCashFlows = array(); |
| 96 | 96 | for ($i = 1; $i <= $numberOfPayments; $i++) { |
@@ -28,8 +28,8 @@ |
||
| 28 | 28 | * @param TimeSpan $time |
| 29 | 29 | */ |
| 30 | 30 | function __construct($principal, |
| 31 | - $annualInterestRate, |
|
| 32 | - TimeSpan $time) { |
|
| 31 | + $annualInterestRate, |
|
| 32 | + TimeSpan $time) { |
|
| 33 | 33 | $this->setPrincipal($principal); |
| 34 | 34 | $this->setAnnualInterestRate($annualInterestRate); |
| 35 | 35 | $this->setTime($time); |
@@ -12,9 +12,9 @@ |
||
| 12 | 12 | $relative_class_path = implode("/", $exploded_class); |
| 13 | 13 | |
| 14 | 14 | $absolute_class_path = |
| 15 | - dirname(dirname(__FILE__)) . |
|
| 16 | - '/' . |
|
| 17 | - $relative_class_path . |
|
| 15 | + dirname(dirname(__FILE__)). |
|
| 16 | + '/'. |
|
| 17 | + $relative_class_path. |
|
| 18 | 18 | '.php'; |
| 19 | 19 | |
| 20 | 20 | if (file_exists($absolute_class_path)) { |