A simple php library to generate and convert degree numbers. It's also compatible with fzaninotto/Faker.
The package installation can be done with composer by the following command:
composer require tamperdata/exiges
Exiges does not provides Facades or ServiceProviders, they aren't needed.
use Tamperdata\Exiges\Conversor;
$conversor = new Conversor;
$num = 100;
$result1 = $conversor->celsiusToFahrenheit($num);
$result2 = $conversor->celsiusToKelvin($num);
$result3 = $conversor->fahrenheitToCelsius($num);
$result4 = $conversor->fahrenheitToKelvin($num);
$result5 = $conversor->kelvinToCelsius($num);
$result6 = $conversor->kelvinToFahrenheit($num);
use Tamperdata\Exiges\Generator;
$generator = new Generator;
$degree = 'C';
$num1 = 10;
$num2 = 50;
$result = $generator->temperatureForHumans($degree, $num1, $num2);
You can also use it with the fantastic Faker library! (It's actually what its designed for)
https://github.com/fzaninotto/Faker
$faker = \Faker\Factory::create();
$conversor = new \Tamperdata\Exiges\Conversor();
$generator = new \Tamperdata\Exiges\Generator();
$faker->addProvider($generator);
$faker->addProvider($conversor);
$faker->temperatureForHumans('C', -10, 50);
$faker->celsiusToFahrenheit(10);
Exiges library is licensed under [The MIT License (MIT)] (https://github.com/tamperdata/exiges/blob/master/LICENSE)(LICENSE).