| Total Complexity | 3 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class Image |
||
| 6 | { |
||
| 7 | /** @var string */ |
||
| 8 | protected $name; |
||
| 9 | |||
| 10 | /** @var string|null */ |
||
| 11 | protected $localPath; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * Image constructor. |
||
| 15 | * |
||
| 16 | * @param $name |
||
| 17 | * @param string|null $localPath |
||
| 18 | */ |
||
| 19 | 14 | public function __construct($name, $localPath = null) |
|
| 20 | { |
||
| 21 | 14 | $this->name = $name; |
|
| 22 | 14 | $this->localPath = $localPath; |
|
| 23 | 14 | } |
|
| 24 | |||
| 25 | /** |
||
| 26 | * Return the name for this image. |
||
| 27 | * |
||
| 28 | * @return string |
||
| 29 | */ |
||
| 30 | 11 | public function getName() |
|
| 31 | { |
||
| 32 | 11 | return $this->name; |
|
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Return the local path for the image, if it is local. |
||
| 37 | * |
||
| 38 | * @return string|null |
||
| 39 | */ |
||
| 40 | 5 | public function getLocalPath() |
|
| 43 | } |
||
| 44 | } |
||
| 45 |