ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
CashFlowValidations.php
Go to the documentation of this file.
1
<?
php
2
3
namespace
PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow
;
4
5
use
PhpOffice\PhpSpreadsheet\Calculation\Exception
;
6
use
PhpOffice\PhpSpreadsheet\Calculation\Financial\Constants
as FinancialConstants;
7
use
PhpOffice\PhpSpreadsheet\Calculation\Financial\FinancialValidations
;
8
use
PhpOffice\PhpSpreadsheet\Calculation\Functions
;
9
10
class
CashFlowValidations
extends
FinancialValidations
11
{
15
public
static
function
validateRate
($rate): float
16
{
17
$rate = self::validateFloat($rate);
18
if
($rate < 0.0) {
19
throw
new
Exception
(
Functions::NAN
());
20
}
21
22
return
$rate;
23
}
24
28
public
static
function
validatePeriodType
(
$type
): int
29
{
30
$rate = self::validateInt(
$type
);
31
if
(
32
$type
!== FinancialConstants::PAYMENT_END_OF_PERIOD &&
33
$type
!== FinancialConstants::PAYMENT_BEGINNING_OF_PERIOD
34
) {
35
throw
new
Exception
(
Functions::NAN
());
36
}
37
38
return
$rate;
39
}
40
44
public
static
function
validatePresentValue
($presentValue): float
45
{
46
return
self::validateFloat($presentValue);
47
}
48
52
public
static
function
validateFutureValue
($futureValue): float
53
{
54
return
self::validateFloat($futureValue);
55
}
56
}
PhpOffice\PhpSpreadsheet\Calculation\Financial\Constants
Definition:
Constants.php:5
PhpOffice\PhpSpreadsheet\Calculation\Financial\FinancialValidations
Definition:
FinancialValidations.php:10
PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\CashFlowValidations\validatePresentValue
static validatePresentValue($presentValue)
Definition:
CashFlowValidations.php:44
$type
$type
Definition:
proxy_ylocal.php:10
PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\CashFlowValidations\validateRate
static validateRate($rate)
Definition:
CashFlowValidations.php:15
PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow
Definition:
CashFlowValidations.php:3
PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\CashFlowValidations\validatePeriodType
static validatePeriodType($type)
Definition:
CashFlowValidations.php:28
PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\CashFlowValidations\validateFutureValue
static validateFutureValue($futureValue)
Definition:
CashFlowValidations.php:52
PhpOffice\PhpSpreadsheet\Calculation\Functions\NAN
static NAN()
NaN.
Definition:
Functions.php:181
Exception
PhpOffice\PhpSpreadsheet\Calculation\Financial\CashFlow\CashFlowValidations
Definition:
CashFlowValidations.php:10
Functions
php
FinancialValidations
Exception
libs
composer
vendor
phpoffice
phpspreadsheet
src
PhpSpreadsheet
Calculation
Financial
CashFlow
CashFlowValidations.php
Generated on Thu Jan 30 2025 19:01:22 for ILIAS by
1.8.13 (using
Doxyfile
)