Skip to content

Commit 5eb7e59

Browse files
committed
Improved some of the code examples in the docblocks
1 parent 426befd commit 5eb7e59

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

src/Omnipay/Common/AbstractGateway.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,15 +247,19 @@ public function supportsUpdateCard()
247247
* Example:
248248
*
249249
* <code>
250-
* class myRequest extends \Omnipay\Common\Message\AbstractRequest {};
250+
* class MyRequest extends \Omnipay\Common\Message\AbstractRequest {};
251251
*
252-
* class myGateway extends \Omnipay\Common\AbstractGateway {
252+
* class MyGateway extends \Omnipay\Common\AbstractGateway {
253253
* function myRequest($parameters) {
254-
* $this->createRequest('myRequest', $parameters);
254+
* $this->createRequest('MyRequest', $parameters);
255255
* }
256256
* }
257257
*
258-
* $myRequest = myGateway->myRequest($someParameters);
258+
* // Create the gateway object
259+
* $gw = Omnipay::create('MyGateway');
260+
*
261+
* // Create the request object
262+
* $myRequest = $gw->myRequest($someParameters);
259263
* </code>
260264
*
261265
* @see \Omnipay\Common\Message\AbstractRequest

src/Omnipay/Common/Message/AbstractRequest.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,19 @@
2828
* Example -- creating a request:
2929
*
3030
* <code>
31-
* class myRequest extends \Omnipay\Common\Message\AbstractRequest {};
31+
* class MyRequest extends \Omnipay\Common\Message\AbstractRequest {};
3232
*
33-
* class myGateway extends \Omnipay\Common\AbstractGateway {
33+
* class MyGateway extends \Omnipay\Common\AbstractGateway {
3434
* function myRequest($parameters) {
35-
* $this->createRequest('myRequest', $parameters);
35+
* $this->createRequest('MyRequest', $parameters);
3636
* }
3737
* }
3838
*
39-
* $myRequest = myGateway->myRequest($someParameters);
39+
* // Create the gateway object
40+
* $gw = Omnipay::create('MyGateway');
41+
*
42+
* // Create the request object
43+
* $myRequest = $gw->myRequest($someParameters);
4044
* </code>
4145
*
4246
* Example -- validating and sending a request:

0 commit comments

Comments
 (0)