@@ -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 |
@@ -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; |
@@ -139,6 +139,9 @@ |
||
139 | 139 | return $detector->detect($this->number); |
140 | 140 | } |
141 | 141 | |
142 | + /** |
|
143 | + * @param string $prop |
|
144 | + */ |
|
142 | 145 | private function with($prop, $value) |
143 | 146 | { |
144 | 147 | $card = clone $this; |