Skip to content

Commit 928bf25

Browse files
aderuweamacneil
authored andcommitted
PHPDoc fixes. Closes #85
1 parent 3511d40 commit 928bf25

File tree

4 files changed

+24
-13
lines changed

4 files changed

+24
-13
lines changed

src/Omnipay/Common/CreditCard.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ public function getSupportedBrands()
8181
*
8282
* If any unknown parameters passed, they will be ignored.
8383
*
84-
* @param array An associative array of parameters
84+
* @param array $parameters An associative array of parameters
85+
*
86+
* @return $this
8587
*/
8688
public function initialize($parameters = null)
8789
{
@@ -234,9 +236,11 @@ public function setExpiryYear($value)
234236
}
235237

236238
/**
237-
* Get the card expiry date, using the specified date format string
239+
* Get the card expiry date, using the specified date format string.
240+
*
241+
* @param string $format
238242
*
239-
* @param string
243+
* @return string
240244
*/
241245
public function getExpiryDate($format)
242246
{
@@ -266,7 +270,9 @@ public function setStartYear($value)
266270
/**
267271
* Get the card start date, using the specified date format string
268272
*
269-
* @param string
273+
* @param string $format
274+
*
275+
* @return string
270276
*/
271277
public function getStartDate($format)
272278
{

src/Omnipay/Common/GatewayInterface.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function getDefaultParameters();
4646
/**
4747
* Initialize gateway with parameters
4848
*/
49-
public function initialize(array $paramters = array());
49+
public function initialize(array $parameters = array());
5050

5151
/**
5252
* Get all gateway parameters
@@ -58,8 +58,9 @@ public function getParameters();
5858
/**
5959
* Create a new charge (combined authorize + capture).
6060
*
61-
* @param array An array of options
62-
* @return Omnipay\ResponseInterface
61+
* @param array $parameters An array of options
62+
*
63+
* @return \Omnipay\Common\Message\RequestInterface
6364
*/
6465
public function purchase(array $parameters = array());
6566
}

src/Omnipay/Common/Message/AbstractRequest.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,11 @@ public function __construct(ClientInterface $httpClient, HttpRequest $httpReques
6363
*
6464
* If any unknown parameters passed, they will be ignored.
6565
*
66-
* @param array An associative array of parameters
66+
* @param array $parameters An associative array of parameters
67+
*
68+
* @return $this
69+
*
70+
* @throws RuntimeException
6771
*/
6872
public function initialize(array $parameters = array())
6973
{
@@ -110,12 +114,14 @@ public function setTestMode($value)
110114
}
111115

112116
/**
113-
* Validate the request
117+
* Validate the request.
114118
*
115119
* This method is called internally by gateways to avoid wasting time with an API call
116120
* when the request is clearly invalid.
117121
*
118-
* @param string a variable length list of required parameters
122+
* @param string ... a variable length list of required parameters
123+
*
124+
* @throws InvalidRequestException
119125
*/
120126
public function validate()
121127
{

src/Omnipay/Common/Message/RequestInterface.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
namespace Omnipay\Common\Message;
1313

14-
use Omnipay\Common\Message\RequestInterface;
15-
1614
/**
1715
* Request Interface
1816
*/
@@ -21,7 +19,7 @@ interface RequestInterface extends MessageInterface
2119
/**
2220
* Initialize request with parameters
2321
*/
24-
public function initialize(array $paramters = array());
22+
public function initialize(array $parameters = array());
2523

2624
/**
2725
* Get all request parameters

0 commit comments

Comments
 (0)