ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
SecurityValidations.php
Go to the documentation of this file.
1<?php
2
4
8
10{
14 public static function validateIssueDate($issue): float
15 {
16 return self::validateDate($issue);
17 }
18
23 public static function validateSecurityPeriod($settlement, $maturity): void
24 {
25 if ($settlement >= $maturity) {
26 throw new Exception(Functions::NAN());
27 }
28 }
29
33 public static function validateRedemption($redemption): float
34 {
35 $redemption = self::validateFloat($redemption);
36 if ($redemption <= 0.0) {
37 throw new Exception(Functions::NAN());
38 }
39
40 return $redemption;
41 }
42}
An exception for terminatinating execution or to throw for unit testing.