Skip to content

Commit

Permalink
Fix: spelling of length units
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanbrauer committed Nov 14, 2017
1 parent e0692c9 commit 5929e86
Show file tree
Hide file tree
Showing 13 changed files with 40 additions and 40 deletions.
4 changes: 2 additions & 2 deletions dev/examples.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
*/
class Centimeter extends LengthUnit
class Centimetre extends LengthUnit
{
protected function configure (): void
{
$this
->setName("centimeter")
->setName("centimetre")

->setSymbol("cm")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
*/
class Decimeter extends LengthUnit
class Decimetre extends LengthUnit
{
protected function configure (): void
{
$this
->setName("decimeter")
->setName("decimetre")

->setSymbol("dm")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
*/
class Kilometer extends LengthUnit
class Kilometre extends LengthUnit
{
protected function configure (): void
{
$this
->setName("kilometer")
->setName("kilometre")

->setSymbol("km")

Expand Down
2 changes: 1 addition & 1 deletion src/UnitConverter/Unit/Length/LengthUnit.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ abstract class LengthUnit extends AbstractUnit
{
protected $unitOf = Measure::LENGTH;

protected $base = Meter::class;
protected $base = Metre::class;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
*/
class Meter extends LengthUnit
class Metre extends LengthUnit
{
protected function configure (): void
{
$this
->setName("meter")
->setName("metre")

->setSymbol("m")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
*/
class Micrometer extends LengthUnit
class Micrometre extends LengthUnit
{
protected function configure (): void
{
$this
->setName("micrometer")
->setName("micrometre")

->setSymbol("µm")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
*/
class Milimeter extends LengthUnit
class Millimetre extends LengthUnit
{
protected function configure (): void
{
$this
->setName("milimeter")
->setName("millimetre")

->setSymbol("mm")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
*/
class Nanometer extends LengthUnit
class Nanometre extends LengthUnit
{
protected function configure (): void
{
$this
->setName("nanometer")
->setName("nanometre")

->setSymbol("nm")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
*/
class Picometer extends LengthUnit
class Picometre extends LengthUnit
{
protected function configure (): void
{
$this
->setName("picometer")
->setName("picometre")

->setSymbol("pm")

Expand Down
16 changes: 8 additions & 8 deletions tests/unit/UnitConverter/Registry/UnitRegistry.spec.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
));
}
Expand Down Expand Up @@ -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"));
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/UnitConverter/Unit/AbstractUnit.spec.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
};
}
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/UnitConverter/UnitConverter.spec.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand All @@ -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
Expand All @@ -37,7 +37,7 @@ protected function setUp ()
{
$this->converter = new UnitConverter(
new UnitRegistry(array(
new Centimeter,
new Centimetre,
new Inch,
)),
new SimpleCalculator
Expand Down

0 comments on commit 5929e86

Please sign in to comment.