From adeeb15b8cbb140a532b6cb481cd6849c171144a Mon Sep 17 00:00:00 2001 From: "DESKTOP-8RHQV24\\Teun" Date: Wed, 11 Oct 2017 22:00:03 +0200 Subject: [PATCH 1/5] Added millibar as pressure unit --- src/UnitConverter/Unit/Pressure/Millibar.php | 39 ++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/UnitConverter/Unit/Pressure/Millibar.php diff --git a/src/UnitConverter/Unit/Pressure/Millibar.php b/src/UnitConverter/Unit/Pressure/Millibar.php new file mode 100644 index 00000000..635a4544 --- /dev/null +++ b/src/UnitConverter/Unit/Pressure/Millibar.php @@ -0,0 +1,39 @@ + + * @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\Pressure; + +use UnitConverter\Measure; +use UnitConverter\Unit\{ AbstractUnit, UnitInterface }; + +/** + * Bar unit data class. + * + * @version 1.0.0 + * @since 1.0.0 + * @author Jordan Brauer + */ +class Millibar extends PressureUnit +{ + protected function configure () : void + { + $this + ->setName("bar") + + ->setSymbol("bar") + + ->setUnits(100) + ; + } +} \ No newline at end of file From 4a145d2645e4ad81752ce68dcf30b368525feccc Mon Sep 17 00:00:00 2001 From: "DESKTOP-8RHQV24\\Teun" Date: Wed, 11 Oct 2017 22:31:49 +0200 Subject: [PATCH 2/5] Fixed wrong millibar, also fixed documentation block --- src/UnitConverter/Unit/Pressure/Millibar.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/UnitConverter/Unit/Pressure/Millibar.php b/src/UnitConverter/Unit/Pressure/Millibar.php index 635a4544..61401422 100644 --- a/src/UnitConverter/Unit/Pressure/Millibar.php +++ b/src/UnitConverter/Unit/Pressure/Millibar.php @@ -18,11 +18,11 @@ use UnitConverter\Unit\{ AbstractUnit, UnitInterface }; /** - * Bar unit data class. + * Millibar unit data class. * * @version 1.0.0 * @since 1.0.0 - * @author Jordan Brauer + * @author Teun Willems */ class Millibar extends PressureUnit { @@ -33,7 +33,7 @@ protected function configure () : void ->setSymbol("bar") - ->setUnits(100) + ->setUnits(100000000) ; } } \ No newline at end of file From 6f8f2b745280a26241cedd52f8b4afd41b9cdc1f Mon Sep 17 00:00:00 2001 From: "DESKTOP-8RHQV24\\Teun" Date: Thu, 12 Oct 2017 19:25:46 +0200 Subject: [PATCH 3/5] Added requested changes --- src/UnitConverter/Unit/Pressure/Millibar.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/UnitConverter/Unit/Pressure/Millibar.php b/src/UnitConverter/Unit/Pressure/Millibar.php index 61401422..28d28d08 100644 --- a/src/UnitConverter/Unit/Pressure/Millibar.php +++ b/src/UnitConverter/Unit/Pressure/Millibar.php @@ -14,9 +14,6 @@ namespace UnitConverter\Unit\Pressure; -use UnitConverter\Measure; -use UnitConverter\Unit\{ AbstractUnit, UnitInterface }; - /** * Millibar unit data class. * @@ -31,9 +28,9 @@ protected function configure () : void $this ->setName("bar") - ->setSymbol("bar") + ->setSymbol("mbar") - ->setUnits(100000000) + ->setUnits(1) ; } } \ No newline at end of file From 4b254664398502dcaf3d47b4a4fb8b7211e49de7 Mon Sep 17 00:00:00 2001 From: "DESKTOP-8RHQV24\\Teun" Date: Thu, 12 Oct 2017 19:26:29 +0200 Subject: [PATCH 4/5] Added requested changes --- src/UnitConverter/Unit/Pressure/Millibar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/UnitConverter/Unit/Pressure/Millibar.php b/src/UnitConverter/Unit/Pressure/Millibar.php index 28d28d08..e9be281b 100644 --- a/src/UnitConverter/Unit/Pressure/Millibar.php +++ b/src/UnitConverter/Unit/Pressure/Millibar.php @@ -26,7 +26,7 @@ class Millibar extends PressureUnit protected function configure () : void { $this - ->setName("bar") + ->setName("millibar") ->setSymbol("mbar") From 98cc0a5ec450d9e0b7ca9dc2b49b58fbe7ea6f25 Mon Sep 17 00:00:00 2001 From: Teun Date: Mon, 16 Oct 2017 19:30:52 +0200 Subject: [PATCH 5/5] Fixed millibar units --- src/UnitConverter/Unit/Pressure/Millibar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/UnitConverter/Unit/Pressure/Millibar.php b/src/UnitConverter/Unit/Pressure/Millibar.php index e9be281b..a0694412 100644 --- a/src/UnitConverter/Unit/Pressure/Millibar.php +++ b/src/UnitConverter/Unit/Pressure/Millibar.php @@ -30,7 +30,7 @@ protected function configure () : void ->setSymbol("mbar") - ->setUnits(1) + ->setUnits(100) ; } } \ No newline at end of file