Skip to content

Commit

Permalink
php cs fixer: removed white space
Browse files Browse the repository at this point in the history
  • Loading branch information
frederikbosch committed Oct 15, 2014
1 parent 15b992e commit e12dce9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function getApiKey()
}

/**
* @param string $value
* @param string $value
* @return $this
*/
public function setApiKey($value)
Expand Down
8 changes: 4 additions & 4 deletions src/Message/PurchaseRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,27 @@ public function setMetadata($value)
public function getData()
{
$this->validate('apiKey', 'amount', 'description', 'returnUrl');

$data = array();
$data['amount'] = $this->getAmount();
$data['description'] = $this->getDescription();
$data['redirectUrl'] = $this->getReturnUrl();
$data['method'] = $this->getPaymentMethod();
$data['metadata'] = $this->getMetadata();
$data['issuer'] = $this->getIssuer();

$webhookUrl = $this->getNotifyUrl();
if (null !== $webhookUrl) {
$data['webhookUrl'] = $webhookUrl;
}

return $data;
}

public function sendData($data)
{
$httpResponse = $this->sendRequest('POST', '/payments', $data);

return $this->response = new PurchaseResponse($this, $httpResponse->json());
}
}
12 changes: 6 additions & 6 deletions tests/Message/PurchaseRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ public function testGetData()
'metadata' => 'meta',
'issuer' => 'my bank'
));

$data = $this->request->getData();

$this->assertSame("12.00", $data['amount']);
$this->assertSame('Description', $data['description']);
$this->assertSame('https://www.example.com/return', $data['redirectUrl']);
Expand All @@ -61,9 +61,9 @@ public function testGetDataWithWebhook()
'issuer' => 'my bank',
'notifyUrl' => 'https://www.example.com/hook'
));

$data = $this->request->getData();

$this->assertSame("12.00", $data['amount']);
$this->assertSame('Description', $data['description']);
$this->assertSame('https://www.example.com/return', $data['redirectUrl']);
Expand All @@ -78,7 +78,7 @@ public function testSendSuccess()
{
$this->setMockHttpResponse('PurchaseSuccess.txt');
$response = $this->request->send();

$this->assertInstanceOf('Omnipay\Mollie\Message\PurchaseResponse', $response);
$this->assertFalse($response->isSuccessful());
$this->assertTrue($response->isRedirect());
Expand All @@ -96,7 +96,7 @@ public function testSendFailure()
{
$this->setMockHttpResponse('PurchaseFailure.txt');
$response = $this->request->send();

$this->assertInstanceOf('Omnipay\Mollie\Message\PurchaseResponse', $response);
$this->assertFalse($response->isSuccessful());
$this->assertFalse($response->isRedirect());
Expand Down

0 comments on commit e12dce9

Please sign in to comment.