@@ -10,29 +10,29 @@ |
||
10 | 10 | abstract class AbstractEntity implements EntityInterface |
11 | 11 | { |
12 | 12 | |
13 | - protected $id; |
|
13 | + protected $id; |
|
14 | 14 | |
15 | 15 | protected $deleted; |
16 | 16 | |
17 | 17 | public function getId() |
18 | - { |
|
19 | - return $this->id; |
|
20 | - } |
|
18 | + { |
|
19 | + return $this->id; |
|
20 | + } |
|
21 | 21 | |
22 | - public function setId($id) |
|
23 | - { |
|
24 | - if ($this->id !== null) { |
|
25 | - throw new BadMethodCallException( |
|
26 | - "Идентификатор у сущности уже установлен"); |
|
27 | - } |
|
22 | + public function setId($id) |
|
23 | + { |
|
24 | + if ($this->id !== null) { |
|
25 | + throw new BadMethodCallException( |
|
26 | + "Идентификатор у сущности уже установлен"); |
|
27 | + } |
|
28 | 28 | |
29 | - if (empty($id)) {//$id < 1 |
|
30 | - throw new InvalidArgumentException("Неверный индентификатор"); |
|
31 | - } |
|
29 | + if (empty($id)) {//$id < 1 |
|
30 | + throw new InvalidArgumentException("Неверный индентификатор"); |
|
31 | + } |
|
32 | 32 | |
33 | - $this->id = $id; |
|
34 | - return $this; |
|
35 | - } |
|
33 | + $this->id = $id; |
|
34 | + return $this; |
|
35 | + } |
|
36 | 36 | |
37 | 37 | public function setDeleted($deleted){ |
38 | 38 | $this->deleted = $deleted; |