Skip to content

Commit

Permalink
Add fire warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
mohit-rocks committed Jan 24, 2024
1 parent f7a65bb commit fd7cc97
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/Forecast/ForecastPeriod.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ final class ForecastPeriod {
*/
protected ?string $winds = NULL;

/**
* The fire danger value.
*/
protected ?string $fireDanger = NULL;

/**
* Gets the start time.
*/
Expand Down Expand Up @@ -311,4 +316,19 @@ public function setWinds(string $winds): ForecastPeriod {
return $this;
}

/**
* Gets the fire danger value.
*/
public function getFireDanger(): ?string {
return $this->fireDanger;
}

/**
* Sets the fire danger value.
*/
public function setFireDanger(?string $fireDanger): ForecastPeriod {
$this->fireDanger = $fireDanger;
return $this;
}

}
4 changes: 4 additions & 0 deletions src/Forecast/Serializer/ForecastPeriodNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ public function setTextValue(array $text, ForecastPeriod $period): void {
$period->setWinds($text['#']);
break;

case 'fire_danger':
$period->setFireDanger($text['#']);
break;

}
}

Expand Down

0 comments on commit fd7cc97

Please sign in to comment.