ApplePayStartSessionRequest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 24
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getRelativeUrl() 0 3 1
A createModel() 0 3 1
A getStrategy() 0 3 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Korobovn\CloudPayments\Message\Request;
6
7
use Korobovn\CloudPayments\Message\Request\Model\ModelInterface;
8
use Korobovn\CloudPayments\Message\Strategy\ApplePayStartSessionStrategy;
9
use Korobovn\CloudPayments\Message\Request\Model\ApplePayStartSessionModel;
10
use Korobovn\CloudPayments\Message\Strategy\StrategyInterface;
11
12
/**
13
 * @method ApplePayStartSessionModel getModel()
14
 * @method static ApplePayStartSessionRequest create()
15
 *
16
 * @see https://developers.cloudpayments.ru/#zapusk-sessii-dlya-oplaty-cherez-apple-pay
17
 */
18
class ApplePayStartSessionRequest extends AbstractRequest
19
{
20
    /**
21
     * {@inheritDoc}
22
     */
23
    protected function getRelativeUrl(): string
24
    {
25
        return '/applepay/startsession';
26
    }
27
28
    /**
29
     * {@inheritDoc}
30
     */
31
    public function createModel(): ModelInterface
32
    {
33
        return new ApplePayStartSessionModel;
34
    }
35
36
    /**
37
     * {@inheritDoc}
38
     */
39
    public function getStrategy(): StrategyInterface
40
    {
41
        return new ApplePayStartSessionStrategy;
42
    }
43
}
44