diff --git a/src/UnitConverter/Unit/Energy/Calorie.php b/src/UnitConverter/Unit/Energy/Calorie.php index 14cc7998..a5847681 100644 --- a/src/UnitConverter/Unit/Energy/Calorie.php +++ b/src/UnitConverter/Unit/Energy/Calorie.php @@ -14,9 +14,6 @@ namespace UnitConverter\Unit\Energy; -use UnitConverter\Measure; -use UnitConverter\Unit\{ AbstractUnit, UnitInterface }; - /** * Calorie unit data class. * diff --git a/src/UnitConverter/Unit/Energy/EnergyUnit.php b/src/UnitConverter/Unit/Energy/EnergyUnit.php index 09a98b6b..787925d7 100644 --- a/src/UnitConverter/Unit/Energy/EnergyUnit.php +++ b/src/UnitConverter/Unit/Energy/EnergyUnit.php @@ -15,7 +15,7 @@ namespace UnitConverter\Unit\Energy; use UnitConverter\Measure; -use UnitConverter\Unit\{ AbstractUnit, UnitInterface }; +use UnitConverter\Unit\{ AbstractUnit }; /** * Energy base data class. Any new energy units should diff --git a/src/UnitConverter/Unit/Energy/FootPound.php b/src/UnitConverter/Unit/Energy/FootPound.php index 9ca2126b..0d6a9518 100644 --- a/src/UnitConverter/Unit/Energy/FootPound.php +++ b/src/UnitConverter/Unit/Energy/FootPound.php @@ -14,9 +14,6 @@ namespace UnitConverter\Unit\Energy; -use UnitConverter\Measure; -use UnitConverter\Unit\{ AbstractUnit, UnitInterface }; - /** * FootPound unit data class. * diff --git a/src/UnitConverter/Unit/Energy/Joule.php b/src/UnitConverter/Unit/Energy/Joule.php index 2d42d9f3..d5701f81 100644 --- a/src/UnitConverter/Unit/Energy/Joule.php +++ b/src/UnitConverter/Unit/Energy/Joule.php @@ -14,9 +14,6 @@ namespace UnitConverter\Unit\Energy; -use UnitConverter\Measure; -use UnitConverter\Unit\{ AbstractUnit, UnitInterface }; - /** * Joule unit data class. * @@ -31,7 +28,7 @@ protected function configure () : void $this ->setName("joule") - ->setSymbol("j") + ->setSymbol("J") ->setUnits(1) ; diff --git a/src/UnitConverter/Unit/Energy/Kilojoule.php b/src/UnitConverter/Unit/Energy/Kilojoule.php new file mode 100644 index 00000000..91619fe8 --- /dev/null +++ b/src/UnitConverter/Unit/Energy/Kilojoule.php @@ -0,0 +1,36 @@ + + * @license MIT + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types = 1); + +namespace UnitConverter\Unit\Energy; + +/** + * Kilojoule unit data class. + * + * @version 1.0.0 + * @since 1.0.0 + * @author Andrew Boerema <1569403+andrewboerema@users.noreply.github.com> + */ +class Kilojoule extends EnergyUnit +{ + protected function configure () : void + { + $this + ->setName("kilojoule") + + ->setSymbol("kJ") + + ->setUnits(1000) + ; + } +} diff --git a/src/UnitConverter/Unit/Energy/KilowattHour.php b/src/UnitConverter/Unit/Energy/KilowattHour.php new file mode 100644 index 00000000..bd89205e --- /dev/null +++ b/src/UnitConverter/Unit/Energy/KilowattHour.php @@ -0,0 +1,36 @@ + + * @license MIT + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types = 1); + +namespace UnitConverter\Unit\Energy; + +/** + * KilowattHour unit data class. + * + * @version 1.0.0 + * @since 1.0.0 + * @author Andrew Boerema <1569403+andrewboerema@users.noreply.github.com> + */ +class KilowattHour extends EnergyUnit +{ + protected function configure () : void + { + $this + ->setName("kilowatt hour") + + ->setSymbol("kWh") + + ->setUnits(3600005.4468) + ; + } +} diff --git a/src/UnitConverter/Unit/Energy/Megaelectronvolt.php b/src/UnitConverter/Unit/Energy/Megaelectronvolt.php new file mode 100644 index 00000000..e827ee89 --- /dev/null +++ b/src/UnitConverter/Unit/Energy/Megaelectronvolt.php @@ -0,0 +1,36 @@ + + * @license MIT + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types = 1); + +namespace UnitConverter\Unit\Energy; + +/** + * Megaelectronvolt unit data class. + * + * @version 1.0.0 + * @since 1.0.0 + * @author Andrew Boerema <1569403+andrewboerema@users.noreply.github.com> + */ +class Megaelectronvolt extends EnergyUnit +{ + protected function configure () : void + { + $this + ->setName("megaelectronvolt") + + ->setSymbol("MeV") + + ->setUnits(1.60218e-13) + ; + } +} diff --git a/src/UnitConverter/Unit/Energy/Megajoule.php b/src/UnitConverter/Unit/Energy/Megajoule.php new file mode 100644 index 00000000..6349788c --- /dev/null +++ b/src/UnitConverter/Unit/Energy/Megajoule.php @@ -0,0 +1,36 @@ + + * @license MIT + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types = 1); + +namespace UnitConverter\Unit\Energy; + +/** + * Megajoule unit data class. + * + * @version 1.0.0 + * @since 1.0.0 + * @author Andrew Boerema <1569403+andrewboerema@users.noreply.github.com> + */ +class Megajoule extends EnergyUnit +{ + protected function configure () : void + { + $this + ->setName("megajoule") + + ->setSymbol("MJ") + + ->setUnits(1000000) + ; + } +} diff --git a/src/UnitConverter/Unit/Energy/MegawattHour.php b/src/UnitConverter/Unit/Energy/MegawattHour.php new file mode 100644 index 00000000..b102b127 --- /dev/null +++ b/src/UnitConverter/Unit/Energy/MegawattHour.php @@ -0,0 +1,36 @@ + + * @license MIT + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types = 1); + +namespace UnitConverter\Unit\Energy; + +/** + * MegawattHour unit data class. + * + * @version 1.0.0 + * @since 1.0.0 + * @author Andrew Boerema <1569403+andrewboerema@users.noreply.github.com> + */ +class MegawattHour extends EnergyUnit +{ + protected function configure () : void + { + $this + ->setName("megawatt hour") + + ->setSymbol("MWh") + + ->setUnits(3600005446.8) + ; + } +} diff --git a/src/UnitConverter/Unit/Energy/NewtonMeter.php b/src/UnitConverter/Unit/Energy/NewtonMeter.php new file mode 100644 index 00000000..c37c7e12 --- /dev/null +++ b/src/UnitConverter/Unit/Energy/NewtonMeter.php @@ -0,0 +1,36 @@ + + * @license MIT + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types = 1); + +namespace UnitConverter\Unit\Energy; + +/** + * NewtonMeter unit data class. + * + * @version 1.0.0 + * @since 1.0.0 + * @author Andrew Boerema <1569403+andrewboerema@users.noreply.github.com> + */ +class NewtonMeter extends EnergyUnit +{ + protected function configure () : void + { + $this + ->setName("newton meter") + + ->setSymbol("Nm") + + ->setUnits(1) + ; + } +} diff --git a/src/UnitConverter/Unit/Energy/WattHour.php b/src/UnitConverter/Unit/Energy/WattHour.php index d5591881..7bc074f7 100644 --- a/src/UnitConverter/Unit/Energy/WattHour.php +++ b/src/UnitConverter/Unit/Energy/WattHour.php @@ -14,9 +14,6 @@ namespace UnitConverter\Unit\Energy; -use UnitConverter\Measure; -use UnitConverter\Unit\{ AbstractUnit, UnitInterface }; - /** * WattHour unit data class. * @@ -31,7 +28,7 @@ protected function configure () : void $this ->setName("watt hour") - ->setSymbol("whr") + ->setSymbol("Wh") ->setUnits(3600.0054468) ;