diff --git a/dev/examples.php b/dev/examples.php index b83f0d25..708b4ede 100644 --- a/dev/examples.php +++ b/dev/examples.php @@ -10,14 +10,14 @@ use UnitConverter\Calculator\SimpleCalculator; use UnitConverter\Registry\UnitRegistry; use UnitConverter\Unit\AbstractUnit; -use UnitConverter\Unit\Length\Centimeter; +use UnitConverter\Unit\Length\Centimetre; use UnitConverter\Unit\Length\Inch; # Configuring a New Converter # =========================== $units = array( - new Centimeter, + new Centimetre, new Inch, ); diff --git a/src/UnitConverter/Unit/Length/Centimeter.php b/src/UnitConverter/Unit/Length/Centimetre.php similarity index 85% rename from src/UnitConverter/Unit/Length/Centimeter.php rename to src/UnitConverter/Unit/Length/Centimetre.php index 5766f23d..552e910d 100644 --- a/src/UnitConverter/Unit/Length/Centimeter.php +++ b/src/UnitConverter/Unit/Length/Centimetre.php @@ -15,18 +15,18 @@ namespace UnitConverter\Unit\Length; /** - * Centimeter data class. + * Centimetre data class. * * @version 1.0.0 * @since 0.0.1 * @author Jordan Brauer */ -class Centimeter extends LengthUnit +class Centimetre extends LengthUnit { protected function configure (): void { $this - ->setName("centimeter") + ->setName("centimetre") ->setSymbol("cm") diff --git a/src/UnitConverter/Unit/Length/Decimeter.php b/src/UnitConverter/Unit/Length/Decimetre.php similarity index 86% rename from src/UnitConverter/Unit/Length/Decimeter.php rename to src/UnitConverter/Unit/Length/Decimetre.php index 58e241ed..77a578fb 100644 --- a/src/UnitConverter/Unit/Length/Decimeter.php +++ b/src/UnitConverter/Unit/Length/Decimetre.php @@ -15,18 +15,18 @@ namespace UnitConverter\Unit\Length; /** - * Decimeter data class. + * Decimetre data class. * * @version 1.0.0 * @since 0.0.1 * @author Jordan Brauer */ -class Decimeter extends LengthUnit +class Decimetre extends LengthUnit { protected function configure (): void { $this - ->setName("decimeter") + ->setName("decimetre") ->setSymbol("dm") diff --git a/src/UnitConverter/Unit/Length/Kilometer.php b/src/UnitConverter/Unit/Length/Kilometre.php similarity index 86% rename from src/UnitConverter/Unit/Length/Kilometer.php rename to src/UnitConverter/Unit/Length/Kilometre.php index fb9ab9de..5c9f7c70 100644 --- a/src/UnitConverter/Unit/Length/Kilometer.php +++ b/src/UnitConverter/Unit/Length/Kilometre.php @@ -15,18 +15,18 @@ namespace UnitConverter\Unit\Length; /** - * Kilometer data class. + * Kilometre data class. * * @version 1.0.0 * @since 0.0.1 * @author Jordan Brauer */ -class Kilometer extends LengthUnit +class Kilometre extends LengthUnit { protected function configure (): void { $this - ->setName("kilometer") + ->setName("kilometre") ->setSymbol("km") diff --git a/src/UnitConverter/Unit/Length/LengthUnit.php b/src/UnitConverter/Unit/Length/LengthUnit.php index ced6ac89..5c0a0237 100644 --- a/src/UnitConverter/Unit/Length/LengthUnit.php +++ b/src/UnitConverter/Unit/Length/LengthUnit.php @@ -30,5 +30,5 @@ abstract class LengthUnit extends AbstractUnit { protected $unitOf = Measure::LENGTH; - protected $base = Meter::class; + protected $base = Metre::class; } diff --git a/src/UnitConverter/Unit/Length/Meter.php b/src/UnitConverter/Unit/Length/Metre.php similarity index 82% rename from src/UnitConverter/Unit/Length/Meter.php rename to src/UnitConverter/Unit/Length/Metre.php index e8af3fe7..6fcc2d79 100644 --- a/src/UnitConverter/Unit/Length/Meter.php +++ b/src/UnitConverter/Unit/Length/Metre.php @@ -15,18 +15,18 @@ namespace UnitConverter\Unit\Length; /** - * Meter data class. All units of Length are based off of Meter. + * Metre data class. All units of Length are based off of Metre. * * @version 1.0.0 * @since 0.0.1 * @author Jordan Brauer */ -class Meter extends LengthUnit +class Metre extends LengthUnit { protected function configure (): void { $this - ->setName("meter") + ->setName("metre") ->setSymbol("m") diff --git a/src/UnitConverter/Unit/Length/Micrometer.php b/src/UnitConverter/Unit/Length/Micrometre.php similarity index 86% rename from src/UnitConverter/Unit/Length/Micrometer.php rename to src/UnitConverter/Unit/Length/Micrometre.php index af31414a..504ef3f9 100644 --- a/src/UnitConverter/Unit/Length/Micrometer.php +++ b/src/UnitConverter/Unit/Length/Micrometre.php @@ -15,18 +15,18 @@ namespace UnitConverter\Unit\Length; /** - * Micrometer data class. + * Micrometre data class. * * @version 1.0.0 * @since 0.0.1 * @author Jordan Brauer */ -class Micrometer extends LengthUnit +class Micrometre extends LengthUnit { protected function configure (): void { $this - ->setName("micrometer") + ->setName("micrometre") ->setSymbol("µm") diff --git a/src/UnitConverter/Unit/Length/Milimeter.php b/src/UnitConverter/Unit/Length/Millimetre.php similarity index 85% rename from src/UnitConverter/Unit/Length/Milimeter.php rename to src/UnitConverter/Unit/Length/Millimetre.php index 6451984c..5e1e4612 100644 --- a/src/UnitConverter/Unit/Length/Milimeter.php +++ b/src/UnitConverter/Unit/Length/Millimetre.php @@ -15,18 +15,18 @@ namespace UnitConverter\Unit\Length; /** - * Milimeter data class. + * Millimetre data class. * * @version 1.0.0 * @since 0.0.1 * @author Jordan Brauer */ -class Milimeter extends LengthUnit +class Millimetre extends LengthUnit { protected function configure (): void { $this - ->setName("milimeter") + ->setName("millimetre") ->setSymbol("mm") diff --git a/src/UnitConverter/Unit/Length/Nanometer.php b/src/UnitConverter/Unit/Length/Nanometre.php similarity index 86% rename from src/UnitConverter/Unit/Length/Nanometer.php rename to src/UnitConverter/Unit/Length/Nanometre.php index 65d61068..7b330916 100644 --- a/src/UnitConverter/Unit/Length/Nanometer.php +++ b/src/UnitConverter/Unit/Length/Nanometre.php @@ -15,18 +15,18 @@ namespace UnitConverter\Unit\Length; /** - * Nanometer data class. + * Nanometre data class. * * @version 1.0.0 * @since 0.0.1 * @author Jordan Brauer */ -class Nanometer extends LengthUnit +class Nanometre extends LengthUnit { protected function configure (): void { $this - ->setName("nanometer") + ->setName("nanometre") ->setSymbol("nm") diff --git a/src/UnitConverter/Unit/Length/Picometer.php b/src/UnitConverter/Unit/Length/Picometre.php similarity index 86% rename from src/UnitConverter/Unit/Length/Picometer.php rename to src/UnitConverter/Unit/Length/Picometre.php index 489c6736..e240a2c2 100644 --- a/src/UnitConverter/Unit/Length/Picometer.php +++ b/src/UnitConverter/Unit/Length/Picometre.php @@ -15,18 +15,18 @@ namespace UnitConverter\Unit\Length; /** - * Picometer data class. + * Picometre data class. * * @version 1.0.0 * @since 0.0.1 * @author Jordan Brauer */ -class Picometer extends LengthUnit +class Picometre extends LengthUnit { protected function configure (): void { $this - ->setName("picometer") + ->setName("picometre") ->setSymbol("pm") diff --git a/tests/unit/UnitConverter/Registry/UnitRegistry.spec.php b/tests/unit/UnitConverter/Registry/UnitRegistry.spec.php index e6f11e65..9284083b 100644 --- a/tests/unit/UnitConverter/Registry/UnitRegistry.spec.php +++ b/tests/unit/UnitConverter/Registry/UnitRegistry.spec.php @@ -18,26 +18,26 @@ use UnitConverter\Registry\UnitRegistry; use UnitConverter\Unit\UnitInterface; use UnitConverter\Unit\AbstractUnit; -use UnitConverter\Unit\Length\Centimeter; +use UnitConverter\Unit\Length\Centimetre; use UnitConverter\Unit\Length\Inch; -use UnitConverter\Unit\Length\Meter; -use UnitConverter\Unit\Length\Milimeter; +use UnitConverter\Unit\Length\Metre; +use UnitConverter\Unit\Length\Millimetre; /** * @coversDefaultClass UnitConverter\Registry\UnitRegistry * @uses UnitConverter\Registry\UnitRegistry * @uses UnitConverter\Unit\AbstractUnit * @uses UnitConverter\Unit\Length\Inch - * @uses UnitConverter\Unit\Length\Centimeter - * @uses UnitConverter\Unit\Length\Meter - * @uses UnitConverter\Unit\Length\Milimeter + * @uses UnitConverter\Unit\Length\Centimetre + * @uses UnitConverter\Unit\Length\Metre + * @uses UnitConverter\Unit\Length\Millimetre */ class UnitRegistrySpec extends TestCase { protected function setUp () { $this->registry = new UnitRegistry(array( - new Centimeter, + new Centimetre, new Inch, )); } @@ -173,7 +173,7 @@ protected function configure () : void ; } }); - $this->registry->registerUnits([new Meter, new Milimeter]); + $this->registry->registerUnits([new Metre, new Millimetre]); $this->assertTrue($this->registry->isUnitRegistered("sP")); $this->assertTrue($this->registry->isUnitRegistered("m")); diff --git a/tests/unit/UnitConverter/Unit/AbstractUnit.spec.php b/tests/unit/UnitConverter/Unit/AbstractUnit.spec.php index 191260af..0015285e 100644 --- a/tests/unit/UnitConverter/Unit/AbstractUnit.spec.php +++ b/tests/unit/UnitConverter/Unit/AbstractUnit.spec.php @@ -18,7 +18,7 @@ use UnitConverter\Measure; use UnitConverter\Unit\AbstractUnit;; use UnitConverter\Unit\Length\Inch; -use UnitConverter\Unit\Length\Meter; +use UnitConverter\Unit\Length\Metre; /** * @coversDefaultClass UnitConverter\Unit\AbstractUnit @@ -35,7 +35,7 @@ protected function setUp () protected $symbol = "sP"; protected $scientificSymbol = "Ω·m"; protected $unitOf = Measure::LENGTH; - protected $base = Meter::class; + protected $base = Metre::class; protected $units = 9001; }; } diff --git a/tests/unit/UnitConverter/UnitConverter.spec.php b/tests/unit/UnitConverter/UnitConverter.spec.php index 0a151c05..f698e08c 100644 --- a/tests/unit/UnitConverter/UnitConverter.spec.php +++ b/tests/unit/UnitConverter/UnitConverter.spec.php @@ -18,7 +18,7 @@ use UnitConverter\UnitConverter; use UnitConverter\Calculator\SimpleCalculator; use UnitConverter\Registry\UnitRegistry; -use UnitConverter\Unit\Length\Centimeter; +use UnitConverter\Unit\Length\Centimetre; use UnitConverter\Unit\Length\Inch; /** @@ -28,7 +28,7 @@ * @uses UnitConverter\Calculator\SimpleCalculator * @uses UnitConverter\Registry\UnitRegistry * @uses UnitConverter\Unit\AbstractUnit - * @uses UnitConverter\Unit\Length\Centimeter + * @uses UnitConverter\Unit\Length\Centimetre * @uses UnitConverter\Unit\Length\Inch */ class UnitConverterSpec extends TestCase @@ -37,7 +37,7 @@ protected function setUp () { $this->converter = new UnitConverter( new UnitRegistry(array( - new Centimeter, + new Centimetre, new Inch, )), new SimpleCalculator