Skip to content

Commit 3c8c35b

Browse files
committed
feat: added helper functions for measurement system units
1 parent 487636b commit 3c8c35b

File tree

3 files changed

+48
-0
lines changed

3 files changed

+48
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
namespace ProgrammatorDev\OpenWeatherMap\MeasurementSystem;
4+
5+
class Fahrenheit
6+
{
7+
public const ATMOSPHERIC_PRESSURE_UNIT = 'hPa';
8+
public const CLOUDINESS_UNIT = '%';
9+
public const HUMIDITY_UNIT = '%';
10+
public const POLLUTANT_CONCENTRATION_UNIT = 'μg/m3';
11+
public const PRECIPITATION_UNIT = 'mm';
12+
public const PRECIPITATION_PROBABILITY_UNIT = '%';
13+
public const SPEED_UNIT = 'mph';
14+
public const TEMPERATURE_UNIT = '°F';
15+
public const VISIBILITY_UNIT = 'km';
16+
}

src/MeasurementSystem/Imperial.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
namespace ProgrammatorDev\OpenWeatherMap\MeasurementSystem;
4+
5+
class Imperial
6+
{
7+
public const ATMOSPHERIC_PRESSURE_UNIT = 'hPa';
8+
public const CLOUDINESS_UNIT = '%';
9+
public const HUMIDITY_UNIT = '%';
10+
public const POLLUTANT_CONCENTRATION_UNIT = 'μg/m3';
11+
public const PRECIPITATION_UNIT = 'mm';
12+
public const PRECIPITATION_PROBABILITY_UNIT = '%';
13+
public const SPEED_UNIT = 'm/s';
14+
public const TEMPERATURE_UNIT = '°C';
15+
public const VISIBILITY_UNIT = 'km';
16+
}

src/MeasurementSystem/Standard.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
namespace ProgrammatorDev\OpenWeatherMap\MeasurementSystem;
4+
5+
class Standard
6+
{
7+
public const ATMOSPHERIC_PRESSURE_UNIT = 'hPa';
8+
public const CLOUDINESS_UNIT = '%';
9+
public const HUMIDITY_UNIT = '%';
10+
public const POLLUTANT_CONCENTRATION_UNIT = 'μg/m3';
11+
public const PRECIPITATION_UNIT = 'mm';
12+
public const PRECIPITATION_PROBABILITY_UNIT = '%';
13+
public const SPEED_UNIT = 'm/s';
14+
public const TEMPERATURE_UNIT = 'K';
15+
public const VISIBILITY_UNIT = 'km';
16+
}

0 commit comments

Comments
 (0)