| @@ 211-220 (lines=10) @@ | ||
| 208 | return (int) $installments; |
|
| 209 | } |
|
| 210 | ||
| 211 | private function isValidExpiryFormatDate($date) |
|
| 212 | { |
|
| 213 | if (preg_match("/([0-9]{2})\/([0-9]{2})\/([0-9]{4})/", $date, $matches)) { |
|
| 214 | if (checkdate($matches[2], $matches[1], $matches[3])) { |
|
| 215 | return true; |
|
| 216 | } |
|
| 217 | } |
|
| 218 | ||
| 219 | return false; |
|
| 220 | } |
|
| 221 | ||
| 222 | /** |
|
| 223 | * @return Payment |
|
| @@ 298-308 (lines=11) @@ | ||
| 295 | return false; |
|
| 296 | } |
|
| 297 | ||
| 298 | private function isValidStartFormatDate($date) |
|
| 299 | { |
|
| 300 | /* dd/mm/yyyy */ |
|
| 301 | if (preg_match("/([0-9]{2})\/([0-9]{2})\/([0-9]{4})/", $date, $matches)) { |
|
| 302 | if (checkdate($matches[2], $matches[1], $matches[3])) { |
|
| 303 | return true; |
|
| 304 | } |
|
| 305 | } |
|
| 306 | ||
| 307 | return false; |
|
| 308 | } |
|
| 309 | ||
| 310 | private function isValidCycle($cycle) |
|
| 311 | { |
|