From 1661d84890ee474a7b1ce3ae4dcc20c4ff0d3c1d Mon Sep 17 00:00:00 2001 From: Del Date: Sun, 11 Jan 2015 11:41:45 +0700 Subject: [PATCH] Adding documentation, adding documentation generation script --- .gitignore | 3 +++ makedoc.sh | 23 ++++++++++++++++++++ src/Omnipay/Common/AbstractGateway.php | 8 +++++++ src/Omnipay/Common/CreditCard.php | 6 +++++ src/Omnipay/Common/Currency.php | 7 ++++++ src/Omnipay/Common/GatewayFactory.php | 14 ++++++++++++ src/Omnipay/Common/GatewayInterface.php | 6 +++++ src/Omnipay/Common/Helper.php | 12 ++++++++++ src/Omnipay/Common/Issuer.php | 29 +++++++++++++++++++++++++ src/Omnipay/Common/Item.php | 7 ++++++ src/Omnipay/Common/ItemBag.php | 19 ++++++++++++++++ src/Omnipay/Common/ItemInterface.php | 6 +++++ src/Omnipay/Common/PaymentMethod.php | 22 +++++++++++++++++++ src/Omnipay/Omnipay.php | 24 +++++++++++++++++++- 14 files changed, 185 insertions(+), 1 deletion(-) create mode 100755 makedoc.sh diff --git a/.gitignore b/.gitignore index 8a282a56..389e6006 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,6 @@ composer.lock composer.phar phpunit.xml +.directory +reports/ +documents/ diff --git a/makedoc.sh b/makedoc.sh new file mode 100755 index 00000000..4b8be761 --- /dev/null +++ b/makedoc.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +mkdir -p ./reports +mkdir -p ./documents/apigen + +if [ -z "$1" ]; then + apigen \ + --title 'Onmipay Common API documentation' \ + --source ./src \ + --destination ./documents/apigen \ + --report ./reports/apigen.xml + +# +# Left here for further expansion, ignore this for the time being. +# +elif [ "$1" = "common" ]; then + apigen \ + --title 'Omnipay Common API documentation' \ + --source ./src/Omnipay/Common \ + --destination ./documents/apigen \ + --report ./reports/apigen.xml + +fi diff --git a/src/Omnipay/Common/AbstractGateway.php b/src/Omnipay/Common/AbstractGateway.php index d5fc17ce..a93635c2 100644 --- a/src/Omnipay/Common/AbstractGateway.php +++ b/src/Omnipay/Common/AbstractGateway.php @@ -1,4 +1,7 @@ \Omnipay\Stripe\Gateway * PayPal\Express => \Omnipay\PayPal\ExpressGateway * PayPal_Express => \Omnipay\PayPal\ExpressGateway + * + * @param string $shortName The short gateway name + * @return string The fully namespaced gateway class name */ public static function getGatewayClassName($shortName) { diff --git a/src/Omnipay/Common/Issuer.php b/src/Omnipay/Common/Issuer.php index 91f2d7f8..fcbfc327 100644 --- a/src/Omnipay/Common/Issuer.php +++ b/src/Omnipay/Common/Issuer.php @@ -1,19 +1,46 @@