| Total Complexity | 5 |
| Total Lines | 69 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class Weather |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var Shobi\Weatherapp\Weather\Units\Temperature |
||
|
|
|||
| 11 | */ |
||
| 12 | private $temperature; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * the weather summary |
||
| 16 | * @var string |
||
| 17 | */ |
||
| 18 | private $summary; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var string |
||
| 22 | */ |
||
| 23 | private $location; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Weather constructor. |
||
| 27 | * @param string $summary |
||
| 28 | * @param string $temperature |
||
| 29 | * @param string $location |
||
| 30 | */ |
||
| 31 | public function __construct(string $summary, string $temperature, string $location) |
||
| 32 | { |
||
| 33 | $this->temperature = new Temperature($temperature); |
||
| 34 | $this->location = $location; |
||
| 35 | $this->summary = $summary; |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Returns the Temperature |
||
| 40 | * |
||
| 41 | * @return \Shobi\Weatherapp\Weather\Units\Temperature |
||
| 42 | */ |
||
| 43 | public function getTemperature(): Temperature |
||
| 46 | } |
||
| 47 | /** |
||
| 48 | * Returns the weather summary |
||
| 49 | * |
||
| 50 | * @return string |
||
| 51 | */ |
||
| 52 | public function getSummary(): string |
||
| 53 | { |
||
| 54 | return $this->summary; |
||
| 55 | } |
||
| 56 | /** |
||
| 57 | * Returns the location |
||
| 58 | * |
||
| 59 | * @return string |
||
| 60 | */ |
||
| 61 | public function getLocation(): string |
||
| 64 | } |
||
| 65 | |||
| 66 | /** |
||
| 67 | * @return string |
||
| 68 | */ |
||
| 69 | public function __toString(): string |
||
| 76 | } |
||
| 77 | } |