| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 26 | public function update () { |
||
| 27 | if ($this->isDiff()) { |
||
|
1 ignored issue
–
show
|
|||
| 28 | /** @var Api $api */ |
||
| 29 | $api = $this->api; |
||
| 30 | $remote = $api->put($this, $this->getDiff(), ['expand' => 'this']); |
||
|
1 ignored issue
–
show
|
|||
| 31 | $this->_setData($remote); |
||
|
1 ignored issue
–
show
|
|||
| 32 | /** @var AbstractEntity $that */ |
||
| 33 | $that = $this; |
||
| 34 | $api->getCache()->add($that); |
||
| 35 | $this->onUpdate(); |
||
| 36 | } |
||
| 37 | return $this; |
||
| 38 | } |
||
| 39 | } |