| Total Complexity | 3 |
| Total Lines | 21 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | class Image extends Simple |
||
| 14 | { |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @return string |
||
| 18 | */ |
||
| 19 | 1 | public function getPath() |
|
| 20 | { |
||
| 21 | 1 | return trim((string)$this->xml); |
|
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @return string |
||
| 26 | */ |
||
| 27 | 1 | public function getCaption() |
|
| 28 | { |
||
| 29 | 1 | if ($xml = $this->xpath('//c:ЗначениеРеквизита[contains(c:Значение, :path)]', ['path' => "{$this->path}#"])) { |
|
| 30 | 1 | return (string)current(\array_slice(explode('#', (string)$xml[0]->Значение), 1)); |
|
|
|
|||
| 31 | } |
||
| 32 | |||
| 33 | 1 | return ''; |
|
| 34 | } |
||
| 35 | } |