Paymarket   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 19
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A transformCollection() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AcquiroPay\Paymarket;
6
7
use AcquiroPay\Api;
8
use AcquiroPay\MakesHttpRequests;
9
use AcquiroPay\Paymarket\Actions\ManagesServices;
10
use AcquiroPay\Paymarket\Actions\ManagesTransactions;
11
12
class Paymarket
13
{
14
    use MakesHttpRequests,
15
        ManagesServices,
16
        ManagesTransactions;
17
18
    public function __construct(Api $api)
19
    {
20
        $this->api = $api;
21
        $this->serviceName = 'paymarket';
22
    }
23
24
    protected function transformCollection(array $collection, string $class): array
25
    {
26
        return array_map(function ($attributes) use ($class) {
27
            return new $class($attributes, $this);
28
        }, $collection);
29
    }
30
}
31