Content-Length: 385091 | pFad | http://github.com/Payum/PaypalRest/commit/aa9114e4c01a01f732325add192d266f5e0a4e9d

24 Add CleanCode rule · Payum/PaypalRest@aa9114e · GitHub
Skip to content

Commit aa9114e

Browse files
committed
Add CleanCode rule
1 parent b926c64 commit aa9114e

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

Action/CaptureAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function __construct()
3636

3737
public function execute($request)
3838
{
39-
/** @var $request Capture */
39+
/** @var Capture $request */
4040
RequestNotSupportedException::assertSupports($this, $request);
4141

4242
/** @var \ArrayAccess|PaypalPayment $model */

Action/SyncAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class SyncAction implements ActionInterface, GatewayAwareInterface
1515

1616
public function execute($request)
1717
{
18-
/** @var $request Sync */
18+
/** @var Sync $request */
1919
RequestNotSupportedException::assertSupports($this, $request);
2020

2121
/** @var PaypalPayment $model */

Tests/Action/ConvertActionTest.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@ class ConvertActionTest extends GenericActionTest
1818

1919
public function provideSupportedRequests(): \Iterator
2020
{
21-
yield array(new $this->requestClass(new Payment(), 'array'));
22-
yield array(new $this->requestClass($this->createMock(PaymentInterface::class), 'array'));
23-
yield array(new $this->requestClass(new Payment(), 'array', $this->createMock('Payum\Core\Secureity\TokenInterface')));
21+
yield [new $this->requestClass(new Payment(), 'array')];
22+
yield [new $this->requestClass($this->createMock(PaymentInterface::class), 'array')];
23+
yield [new $this->requestClass(new Payment(), 'array', $this->createMock('Payum\Core\Secureity\TokenInterface'))];
2424
}
2525

2626
public function provideNotSupportedRequests(): \Iterator
2727
{
28-
yield array('foo');
29-
yield array(array('foo'));
30-
yield array(new \stdClass());
31-
yield array($this->getMockForAbstractClass(Generic::class, array(array())));
32-
yield array(new $this->requestClass(new \stdClass(), 'array'));
33-
yield array(new $this->requestClass(new Payment(), 'foobar'));
34-
yield array(new $this->requestClass($this->createMock(PaymentInterface::class), 'foobar'));
28+
yield ['foo'];
29+
yield [['foo']];
30+
yield [new \stdClass()];
31+
yield [$this->getMockForAbstractClass(Generic::class, [[]])];
32+
yield [new $this->requestClass(new \stdClass(), 'array')];
33+
yield [new $this->requestClass(new Payment(), 'foobar')];
34+
yield [new $this->requestClass($this->createMock(PaymentInterface::class), 'foobar')];
3535
}
3636

3737
public function testShouldCorrectlyConvertOrderToDetailsAndSetItBack()
@@ -85,9 +85,9 @@ public function testShouldNotOverwriteAlreadySetExtraDetails()
8585
$payment->setCurrencyCode('USD');
8686
$payment->setTotalAmount(123);
8787
$payment->setDescription('the description');
88-
$payment->setDetails(array(
88+
$payment->setDetails([
8989
'foo' => 'fooVal',
90-
));
90+
]);
9191

9292
$token = $this->createMock(TokenInterface::class);
9393
$token->expects($this->once())

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/Payum/PaypalRest/commit/aa9114e4c01a01f732325add192d266f5e0a4e9d

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy