Completed
Branch master (37a6f7)
by Václav
05:19
created
src/Calculators/AnnuityCalculator.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@
 block discarded – undo
143 143
         }
144 144
 
145 145
         /**
146
-         * @return mixed
146
+         * @return string
147 147
          */
148 148
         public function getAnnuityPeriodLengthInDays() {
149 149
             return $this->annuityPeriodLength->toDays();
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -60,9 +60,9 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/Calculators/BondFairValueCalculator.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
         }
74 74
 
75 75
         /**
76
-         * @return float
76
+         * @return string
77 77
          */
78 78
         public function getBondFairValue() {
79 79
             // we need to get the coupon rate per payment period = c/payment frequency
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,10 +47,10 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/Constants/ErrorMessages.php 1 patch
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
     {
13 13
         /**
14 14
          * @param $expectedTypeName [Name of the expected class as a string]
15
-         * @param $foundTypeName    [Name of the class that was used instead]
15
+         * @param string $foundTypeName    [Name of the class that was used instead]
16 16
          * @return string           [Concatenated message as a string]
17 17
          */
18 18
         static function getIncompatibleTypesMessage($expectedTypeName, $foundTypeName) {
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
         /**
65 65
          * @param $propertyName [Name of the property as a string]
66
-         * @param $className    [Name of the class as a string]
66
+         * @param string $className    [Name of the class as a string]
67 67
          * @return string       [Concatenated message as a string]
68 68
          */
69 69
         static function getNonExistentPropertyMessage($propertyName, $className) {
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 
104 104
         /**
105 105
          * @param $factoryClassName         [Name of the factory class as a string]
106
-         * @param $factoryClassAncestorName [Name of the factory class' expected parent class name as a string]
106
+         * @param string $factoryClassAncestorName [Name of the factory class' expected parent class name as a string]
107 107
          * @return string                   [Concatenated message as a string]
108 108
          */
109 109
         static function getFactoryClassExpectedAncestorMessage($factoryClassName, $factoryClassAncestorName) {
@@ -163,8 +163,8 @@  discard block
 block discarded – undo
163 163
         }
164 164
 
165 165
         /**
166
-         * @param $methodName [Name of the method]
167
-         * @param $className  [Name of the class]
166
+         * @param string $methodName [Name of the method]
167
+         * @param string $className  [Name of the class]
168 168
          * @return string     [Concatenated message as a string]
169 169
          */
170 170
         static function getMethodDoesNotExistMessage($methodName, $className) {
Please login to merge, or discard this patch.
src/Interfaces/Calculator/CalculatorAbstract.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,9 +14,9 @@
 block discarded – undo
14 14
         protected $propResultArray = null;
15 15
 
16 16
         /**
17
-         * @param $name
17
+         * @param string $name
18 18
          * @param $value
19
-         * @param null $callbackBefore
19
+         * @param \Closure $callbackBefore
20 20
          * @throws Exception
21 21
          */
22 22
         protected final function setProperty($name, $value, $callbackBefore = null) {
Please login to merge, or discard this patch.
src/Utils/Config.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
         }
32 32
 
33 33
         /**
34
-         * @param $key
34
+         * @param string $key
35 35
          * @return mixed
36 36
          * @throws Exception
37 37
          */
Please login to merge, or discard this patch.
src/Utils/Enum.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
         /**
17 17
          * Return string representation of this enum
18 18
          *
19
-         * @return string
19
+         * @return integer
20 20
          */
21 21
         public function getValue()
22 22
         {
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
          * </code>
72 72
          *
73 73
          * @param string $property
74
-         * @return string
74
+         * @return integer
75 75
          */
76 76
         function __get($property)
77 77
         {
Please login to merge, or discard this patch.
src/Utils/Helpers.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
         /**
29 29
          * @param $leftOperand
30 30
          * @param $rightOperand
31
-         * @param $messageOnException
31
+         * @param string $messageOnException
32 32
          * @return bool
33 33
          */
34 34
         static function checkIfLeftOperandGreaterOrThrowAnException($leftOperand, $rightOperand, $messageOnException) {
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
         }
65 65
 
66 66
         /**
67
-         * @param $checkedVariable
67
+         * @param null|\FinanCalc\Constants\AnnuityPaymentTypes $checkedVariable
68 68
          * @return bool
69 69
          */
70 70
         static function checkIfNotNull($checkedVariable) {
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 
106 106
         /**
107 107
          * @param $checkedVariable
108
-         * @param $expectedResult
108
+         * @param integer $expectedResult
109 109
          * @return bool|null
110 110
          */
111 111
         static function checkNumberRelativityToZero($checkedVariable, $expectedResult) {
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
         }
118 118
 
119 119
         /**
120
-         * @param $inputValue
120
+         * @param string $inputValue
121 121
          * @return string
122 122
          */
123 123
         static function roundMoneyForDisplay($inputValue) {
Please login to merge, or discard this patch.
src/Utils/Strings.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
         }
45 45
 
46 46
         /**
47
-         * @param $identifier
47
+         * @param string $identifier
48 48
          * @param $locale
49 49
          * @param null $formatArgs
50 50
          * @return string
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/FinanCalc.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -1,32 +1,32 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.