Completed
Push — work-fleets ( 4ec5b3...fe2ede )
by SuperNova.WS
10:06
created

EntityContainer   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
dl 0
loc 37
rs 10
c 2
b 0
f 0
ccs 0
cts 9
cp 0
wmc 3
lcom 0
cbo 2

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A setModel() 0 3 1
A getModel() 0 3 1
1
<?php
2
3
namespace Entity;
4
5
use Common\ContainerAccessors;
6
7
/**
8
 * Class Entity\EntityContainer
9
 *
10
 * @property array $row - Entity row read from DB
11
 */
12
class EntityContainer extends ContainerAccessors {
13
  /**
14
   * @var EntityModel $model
15
   */
16
  protected $model;
17
18
  /**
19
   * @var \Common\Accessors $accessors
20
   */
21
  protected $accessors;
22
23
  /** @noinspection PhpMissingParentConstructorInspection */
24
  /**
25
   * Entity\EntityContainer constructor.
26
   *
27
   * @param EntityModel $model
28
   */
29
  public function __construct($model) {
30
    $this->model = $model;
31
    $this->accessors = $model->getAccessors();
32
  }
33
34
  /**
35
   * @param EntityModel $model
36
   */
37
  public function setModel(EntityModel $model) {
38
    $this->model = $model;
39
  }
40
41
  /**
42
   * @return EntityModel
43
   */
44
  public function getModel() {
45
    return $this->model;
46
  }
47
48
}
49