@@ -167,6 +167,9 @@ discard block |
||
| 167 | 167 | return false; |
| 168 | 168 | } |
| 169 | 169 | |
| 170 | + /** |
|
| 171 | + * @param string $prop |
|
| 172 | + */ |
|
| 170 | 173 | private function with($prop, $value) |
| 171 | 174 | { |
| 172 | 175 | $card = clone $this; |
@@ -251,7 +254,7 @@ discard block |
||
| 251 | 254 | /** |
| 252 | 255 | * Gets expiry date card. |
| 253 | 256 | * |
| 254 | - * @return ExpireDate |
|
| 257 | + * @return ExpiryDate |
|
| 255 | 258 | */ |
| 256 | 259 | public function getExpiryDate() |
| 257 | 260 | { |
@@ -311,9 +311,8 @@ |
||
| 311 | 311 | |
| 312 | 312 | if (null !== $card->number) { |
| 313 | 313 | $lastDigits = strlen($card->number) <= 4 |
| 314 | - ? $card->number : |
|
| 315 | - substr($card->number, -4); |
|
| 316 | - $card->number = "XXXX-XXXX-XXXX-" . $lastDigits; |
|
| 314 | + ? $card->number : substr($card->number, -4); |
|
| 315 | + $card->number = "XXXX-XXXX-XXXX-".$lastDigits; |
|
| 317 | 316 | } |
| 318 | 317 | |
| 319 | 318 | $card->cvv = null; |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | public function __construct($month, $year) |
| 47 | 47 | { |
| 48 | 48 | $pad = "20"; # Since expiration would be in future, assuming start millenium is 2000. |
| 49 | - # Please correct this accordingly in next millenium :P. |
|
| 49 | + # Please correct this accordingly in next millenium :P. |
|
| 50 | 50 | $this->year = (int) str_pad($year, 4, $pad, STR_PAD_LEFT); |
| 51 | 51 | $this->month = (int) $month; |
| 52 | 52 | |