From 9b4536697a2d349a8ee96468481d6cdd260f36cf Mon Sep 17 00:00:00 2001 From: Craig Paul Date: Fri, 21 Oct 2016 09:57:03 -0600 Subject: [PATCH] Adds credit card object --- src/CreditCard.php | 59 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 src/CreditCard.php diff --git a/src/CreditCard.php b/src/CreditCard.php new file mode 100644 index 0000000..4e88856 --- /dev/null +++ b/src/CreditCard.php @@ -0,0 +1,59 @@ +number = $number; + $this->expiry = $expiry; + $this->crypt = $crypt; + } + + /** + * Create a new CreditCard instance. + * + * @param string $number + * @param string $expiry + * @param int $crypt + * + * @return $this + */ + public static function create(string $number, string $expiry, int $crypt = 7) + { + return new static($number, $expiry, $crypt); + } +} \ No newline at end of file