Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,16 @@ jobs:
phpunit-version: '8.5.15'
experimental: false
- php-versions: '8.1'
phpunit-version: '9.5.27'
phpunit-version: '9.6.29'
experimental: false
- php-versions: '8.2'
phpunit-version: '9.5.27'
phpunit-version: '9.6.29'
experimental: false
- php-versions: '8.3'
phpunit-version: '9.5.27'
phpunit-version: '9.6.29'
experimental: false
- php-versions: '8.4'
phpunit-version: '9.6.29'
experimental: false
steps:
- name: Checkout
Expand Down
6 changes: 3 additions & 3 deletions Cmfcmf/OpenWeatherMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -635,12 +635,12 @@ private function buildUrl($query, $units, $lang, $appid, $mode, $url)
* @param float $lat The location's latitude.
* @param float $lon The location's longitude.
* @param int $cnt Number of returned days.
* @param \DateTime $start Starting point of time period.
* @param \DateTime $end Final point of time period.
* @param \DateTime|null $start Starting point of time period.
* @param \DateTime|null $end Final point of time period.
*
* @return string
*/
private function buildUVIndexUrl($mode, $lat, $lon, $cnt = null, \DateTime $start = null, \DateTime $end = null)
private function buildUVIndexUrl($mode, $lat, $lon, $cnt = null, ?\DateTime $start = null, ?\DateTime $end = null)
{
$params = array(
'appid' => $this->apiKey,
Expand Down
22 changes: 11 additions & 11 deletions Cmfcmf/OpenWeatherMap/Util/Temperature.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ class Temperature
* @var Unit The day temperature. Might not be null.
*/
public $day;

/**
* @var Unit The morning temperature. Might not be null.
*/
public $morning;

/**
* @var Unit The evening temperature. Might not be null.
*/
public $evening;

/**
* @var Unit The night temperature. Might not be null.
*/
Expand Down Expand Up @@ -111,17 +111,17 @@ public function getFormatted()
/**
* Create a new temperature object.
*
* @param Unit $now The current temperature.
* @param Unit $min The minimal temperature.
* @param Unit $max The maximal temperature.
* @param Unit $day The day temperature. Might not be null.
* @param Unit $morning The morning temperature. Might not be null.
* @param Unit $evening The evening temperature. Might not be null.
* @param Unit $night The night temperature. Might not be null.
* @param Unit $now The current temperature.
* @param Unit $min The minimal temperature.
* @param Unit $max The maximal temperature.
* @param Unit|null $day The day temperature. Might not be null.
* @param Unit|null $morning The morning temperature. Might not be null.
* @param Unit|null $evening The evening temperature. Might not be null.
* @param Unit|null $night The night temperature. Might not be null.
*
* @internal
*/
public function __construct(Unit $now, Unit $min, Unit $max, Unit $day = null, Unit $morning = null, Unit $evening = null, Unit $night = null)
public function __construct(Unit $now, Unit $min, Unit $max, ?Unit $day = null, ?Unit $morning = null, ?Unit $evening = null, ?Unit $night = null)
{
$this->now = $now;
$this->min = $min;
Expand Down
6 changes: 3 additions & 3 deletions Cmfcmf/OpenWeatherMap/Util/Wind.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ class Wind
/**
* Create a new wind object.
*
* @param Unit $speed The wind speed.
* @param Unit $direction The wind direction.
* @param Unit $speed The wind speed.
* @param Unit|null $direction The wind direction.
*
* @internal
*/
public function __construct(Unit $speed, Unit $direction = null)
public function __construct(Unit $speed, ?Unit $direction = null)
{
$this->speed = $speed;
$this->direction = $direction;
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"source": "https://github.com/cmfcmf/OpenWeatherMap-PHP-API.git"
},
"require": {
"php": ">=7.0.0",
"php": ">=7.1.0",
"ext-json": "*",
"ext-libxml": "*",
"ext-simplexml": "*",
Expand Down
Loading
Loading