@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Created by PhpStorm. |
|
4 | - * User: uruba |
|
5 | - * Date: 2/15/2016 |
|
6 | - * Time: 2:54 PM |
|
7 | - */ |
|
3 | + * Created by PhpStorm. |
|
4 | + * User: uruba |
|
5 | + * Date: 2/15/2016 |
|
6 | + * Time: 2:54 PM |
|
7 | + */ |
|
8 | 8 | |
9 | 9 | namespace FinanCalc\Utils { |
10 | 10 |
@@ -1,32 +1,32 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * FinanCalc |
|
4 | - * |
|
5 | - * A lightweight, simple and easy PHP library for calculating annuities (e.g., mortgages) |
|
6 | - * and other financial instruments according to various input data |
|
7 | - * |
|
8 | - * |
|
9 | - * DISCLAIMER |
|
10 | - * You are free to use/modify/extend the library as you please - for it to serve your purpose. |
|
11 | - * As per the (un)license, the software is provided as is and the original author cannot be held liable |
|
12 | - * for any losses/damages directly or indirectly resulting from using thereof. |
|
13 | - * Attribution is welcome, but certainly not required. |
|
14 | - * |
|
15 | - * NOTE |
|
16 | - * The library is currently work-in-progress and it is certain that new features will be added in the process. |
|
17 | - * Consider this, therefore, as a preview product prone to abrupt and extensive changes that may affect functionality |
|
18 | - * of an external code adapted to a prior version(s) of the library. |
|
19 | - * Always explore the provisional compatibility of the library with your project in case you upgrade to a new version |
|
20 | - * of the library (by means of an extensive testing of the code in which you are exerting the library's features). |
|
21 | - * |
|
22 | - * PREREQUISITES |
|
23 | - * PHP 5.5+ |
|
24 | - * Module php-bcmath |
|
25 | - * |
|
26 | - * @author Václav Uruba |
|
27 | - * @version 0.3 |
|
28 | - * @license http://unlicense.org The Unlicense |
|
29 | - */ |
|
3 | + * FinanCalc |
|
4 | + * |
|
5 | + * A lightweight, simple and easy PHP library for calculating annuities (e.g., mortgages) |
|
6 | + * and other financial instruments according to various input data |
|
7 | + * |
|
8 | + * |
|
9 | + * DISCLAIMER |
|
10 | + * You are free to use/modify/extend the library as you please - for it to serve your purpose. |
|
11 | + * As per the (un)license, the software is provided as is and the original author cannot be held liable |
|
12 | + * for any losses/damages directly or indirectly resulting from using thereof. |
|
13 | + * Attribution is welcome, but certainly not required. |
|
14 | + * |
|
15 | + * NOTE |
|
16 | + * The library is currently work-in-progress and it is certain that new features will be added in the process. |
|
17 | + * Consider this, therefore, as a preview product prone to abrupt and extensive changes that may affect functionality |
|
18 | + * of an external code adapted to a prior version(s) of the library. |
|
19 | + * Always explore the provisional compatibility of the library with your project in case you upgrade to a new version |
|
20 | + * of the library (by means of an extensive testing of the code in which you are exerting the library's features). |
|
21 | + * |
|
22 | + * PREREQUISITES |
|
23 | + * PHP 5.5+ |
|
24 | + * Module php-bcmath |
|
25 | + * |
|
26 | + * @author Václav Uruba |
|
27 | + * @version 0.3 |
|
28 | + * @license http://unlicense.org The Unlicense |
|
29 | + */ |
|
30 | 30 | namespace FinanCalc { |
31 | 31 | use Exception; |
32 | 32 | use FinanCalc\Constants\ErrorMessages; |
@@ -47,10 +47,10 @@ |
||
47 | 47 | * @param $bondPaymentFrequency |
48 | 48 | */ |
49 | 49 | function __construct($bondFaceValue, |
50 | - $bondAnnualCouponRate, |
|
51 | - $bondVIR, |
|
52 | - $bondYearsToMaturity, |
|
53 | - $bondPaymentFrequency = 1) { |
|
50 | + $bondAnnualCouponRate, |
|
51 | + $bondVIR, |
|
52 | + $bondYearsToMaturity, |
|
53 | + $bondPaymentFrequency = 1) { |
|
54 | 54 | $this->setBondFaceValue($bondFaceValue); |
55 | 55 | $this->setBondAnnualCouponRate($bondAnnualCouponRate); |
56 | 56 | $this->setBondVIR($bondVIR); |
@@ -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); |
@@ -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); |
@@ -60,9 +60,9 @@ |
||
60 | 60 | * @param $annuityInterest |
61 | 61 | */ |
62 | 62 | function __construct($annuitySinglePaymentAmount, |
63 | - $annuityNoOfCompoundingPeriods, |
|
64 | - TimeSpan $annuityPeriodLength, |
|
65 | - $annuityInterest) { |
|
63 | + $annuityNoOfCompoundingPeriods, |
|
64 | + TimeSpan $annuityPeriodLength, |
|
65 | + $annuityInterest) { |
|
66 | 66 | $this->setAnnuitySinglePaymentAmount($annuitySinglePaymentAmount); |
67 | 67 | $this->setAnnuityNoOfCompoundingPeriods($annuityNoOfCompoundingPeriods); |
68 | 68 | $this->setAnnuityPeriodLength($annuityPeriodLength); |
@@ -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); |
@@ -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); |