Entity   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 4
Bugs 0 Features 0
Metric Value
wmc 3
c 4
b 0
f 0
lcom 0
cbo 0
dl 0
loc 39
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getTransport() 0 4 1
A setTransport() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the Rutube PHP API Client package.
5
 *
6
 * (c) Rutube
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Rutube;
13
14
use Rutube\Transports\DefaultTransport as Transport;
15
16
/**
17
 * Базовый класс
18
 *
19
 * @package Rutube
20
 */
21
abstract class Entity
22
{
23
    /**
24
     * Транспорт выполнения запроса к API
25
     *
26
     * @var Transport
27
     */
28
    protected $transport;
29
30
    /**
31
     * Инициализация транспорта
32
     *
33
     * @param Transport $transport
34
     */
35
    public function __construct(Transport $transport)
36
    {
37
        $this->setTransport($transport);
38
    }
39
40
    /**
41
     * Возвращает текущий транспорт
42
     *
43
     * @return Transport
44
     */
45
    public function getTransport()
46
    {
47
        return $this->transport;
48
    }
49
50
    /**
51
     * Устанавливает транспорт
52
     *
53
     * @param mixed $transport
54
     */
55
    public function setTransport($transport)
56
    {
57
        $this->transport = $transport;
58
    }
59
}
60