BaseRepository   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 8
c 1
b 0
f 0
dl 0
loc 37
ccs 8
cts 8
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getClient() 0 3 1
A getEndpoint() 0 3 1
A __construct() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Swis\JsonApi\Client;
6
7
use Swis\JsonApi\Client\Interfaces\DocumentClientInterface;
8
9
abstract class BaseRepository
10
{
11
    /**
12
     * @var \Swis\JsonApi\Client\Interfaces\DocumentClientInterface
13
     */
14
    protected $client;
15
16
    /**
17
     * @var \Swis\JsonApi\Client\DocumentFactory
18
     */
19
    protected $documentFactory;
20
21
    /**
22
     * @var string
23
     */
24
    protected $endpoint = '';
25
26 32
    public function __construct(DocumentClientInterface $client, DocumentFactory $documentFactory)
27
    {
28 32
        $this->client = $client;
29 32
        $this->documentFactory = $documentFactory;
30 16
    }
31
32
    /**
33
     * @return \Swis\JsonApi\Client\Interfaces\DocumentClientInterface
34
     */
35 28
    public function getClient()
36
    {
37 28
        return $this->client;
38
    }
39
40
    /**
41
     * @return string
42
     */
43 28
    public function getEndpoint()
44
    {
45 28
        return $this->endpoint;
46
    }
47
}
48