Total Complexity | 9 |
Total Lines | 83 |
Duplicated Lines | 0 % |
Coverage | 94.74% |
Changes | 0 |
1 | <?php |
||
18 | abstract class Entity |
||
19 | { |
||
20 | /** |
||
21 | * the table's name |
||
22 | * |
||
23 | * @var string |
||
24 | */ |
||
25 | private $tableName; |
||
26 | |||
27 | /** |
||
28 | * List of fields changed |
||
29 | * |
||
30 | * @var array |
||
31 | */ |
||
32 | private $changedFields = []; |
||
33 | |||
34 | /** |
||
35 | * Returns the tableName property |
||
36 | * |
||
37 | * @return string |
||
38 | */ |
||
39 | 8 | public function getTableName() |
|
42 | } |
||
43 | |||
44 | /** |
||
45 | * Returns a list with the fields changed |
||
46 | * |
||
47 | * @return array |
||
48 | */ |
||
49 | 1 | public function getChangedFields() |
|
52 | } |
||
53 | |||
54 | /** |
||
55 | * Sets the tableName property |
||
56 | * |
||
57 | * @param string $tableName |
||
58 | * |
||
59 | * @return null |
||
60 | */ |
||
61 | 22 | public function setTableName($tableName) |
|
64 | 22 | } |
|
65 | |||
66 | /** |
||
67 | * Sets all entity properties passed in the array |
||
68 | * |
||
69 | * @param array $data |
||
70 | * |
||
71 | * @return null |
||
72 | */ |
||
73 | 2 | public function exchangeArray($data) |
|
85 | ); |
||
86 | } |
||
87 | } |
||
88 | 2 | } |
|
89 | |||
90 | /** |
||
91 | * Constructor |
||
92 | * |
||
93 | * @param array $data |
||
94 | * |
||
95 | * @return null |
||
96 | */ |
||
97 | 22 | public function __construct($data) |
|
104 |