Total Complexity | 6 |
Total Lines | 52 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
7 | trait PropertyRecordTrait |
||
8 | { |
||
9 | /** |
||
10 | * @return \ByTIC\Models\SmartProperties\Properties\AbstractProperty\Generic|GenericType |
||
11 | */ |
||
12 | public function getType() |
||
15 | } |
||
16 | |||
17 | /** |
||
18 | * @param $status |
||
19 | * @return \ByTIC\Models\SmartProperties\Properties\AbstractProperty\Generic|GenericType |
||
20 | */ |
||
21 | public function getNewType($status) |
||
22 | { |
||
23 | /** @noinspection PhpUnhandledExceptionInspection */ |
||
24 | return $this->getNewSmartPropertyFromValue('Type', $status); |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * @param GenericType $type |
||
29 | * @return bool |
||
30 | * @throws \Nip\Logger\Exception |
||
31 | */ |
||
32 | public function updateType($type = null) |
||
33 | { |
||
34 | if ($this->setType($type)) { |
||
35 | $this->update(); |
||
36 | } |
||
37 | |||
38 | return false; |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * @param $value |
||
43 | */ |
||
44 | public function setType($value) |
||
45 | { |
||
46 | /** @noinspection PhpUnhandledExceptionInspection */ |
||
47 | $this->setSmartProperty('Type', $value); |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * @param $typeObject |
||
52 | * @return RecordTrait |
||
53 | */ |
||
54 | public function setTypeFromObject($typeObject) |
||
59 | } |
||
60 | } |
||
61 |