Skip to content

Commit

Permalink
Update documentation for v0.8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanbrauer committed Apr 28, 2020
1 parent a9c3de1 commit be778e1
Show file tree
Hide file tree
Showing 365 changed files with 56,172 additions and 16,317 deletions.
174 changes: 119 additions & 55 deletions docs/classes/UnitConverter.Calculator.BinaryCalculator.html

Large diffs are not rendered by default.

162 changes: 107 additions & 55 deletions docs/classes/UnitConverter.Calculator.Formula.AbstractFormula.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Calculator.Formula.FormulaInterface.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

162 changes: 107 additions & 55 deletions docs/classes/UnitConverter.Calculator.Formula.NullFormula.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

162 changes: 107 additions & 55 deletions docs/classes/UnitConverter.Calculator.Formula.UnitConversionFormula.html

Large diffs are not rendered by default.

166 changes: 111 additions & 55 deletions docs/classes/UnitConverter.Calculator.SimpleCalculator.html

Large diffs are not rendered by default.

170 changes: 115 additions & 55 deletions docs/classes/UnitConverter.ConverterBuilder.html

Large diffs are not rendered by default.

150 changes: 95 additions & 55 deletions docs/classes/UnitConverter.Exception.BadConverter.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Exception.BadMeasurement.html

Large diffs are not rendered by default.

150 changes: 95 additions & 55 deletions docs/classes/UnitConverter.Exception.BadRegistry.html

Large diffs are not rendered by default.

150 changes: 95 additions & 55 deletions docs/classes/UnitConverter.Exception.BadUnit.html

Large diffs are not rendered by default.

172 changes: 117 additions & 55 deletions docs/classes/UnitConverter.Measure.html

Large diffs are not rendered by default.

202 changes: 147 additions & 55 deletions docs/classes/UnitConverter.Support.Collection.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Area.Acre.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/classes/UnitConverter.Unit.Area.AreaUnit.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Area.Hectare.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Area.SquareCentimetre.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Area.SquareFoot.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Area.SquareKilometre.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Area.SquareMetre.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Area.SquareMile.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Area.SquareMillimetre.html

Large diffs are not rendered by default.

1,015 changes: 1,015 additions & 0 deletions docs/classes/UnitConverter.Unit.DigitalStorage.Bit.html

Large diffs are not rendered by default.

1,015 changes: 1,015 additions & 0 deletions docs/classes/UnitConverter.Unit.DigitalStorage.Byte.html

Large diffs are not rendered by default.

976 changes: 976 additions & 0 deletions docs/classes/UnitConverter.Unit.DigitalStorage.DigitalStorageUnit.html

Large diffs are not rendered by default.

1,015 changes: 1,015 additions & 0 deletions docs/classes/UnitConverter.Unit.DigitalStorage.Gibibit.html

Large diffs are not rendered by default.

1,015 changes: 1,015 additions & 0 deletions docs/classes/UnitConverter.Unit.DigitalStorage.Gigabit.html

Large diffs are not rendered by default.

1,015 changes: 1,015 additions & 0 deletions docs/classes/UnitConverter.Unit.DigitalStorage.Gigabyte.html

Large diffs are not rendered by default.

1,015 changes: 1,015 additions & 0 deletions docs/classes/UnitConverter.Unit.DigitalStorage.Kibibit.html

Large diffs are not rendered by default.

1,015 changes: 1,015 additions & 0 deletions docs/classes/UnitConverter.Unit.DigitalStorage.Kilobit.html

Large diffs are not rendered by default.

1,015 changes: 1,015 additions & 0 deletions docs/classes/UnitConverter.Unit.DigitalStorage.Kilobyte.html

Large diffs are not rendered by default.

1,015 changes: 1,015 additions & 0 deletions docs/classes/UnitConverter.Unit.DigitalStorage.Mebibit.html

Large diffs are not rendered by default.

1,015 changes: 1,015 additions & 0 deletions docs/classes/UnitConverter.Unit.DigitalStorage.Megabit.html

Large diffs are not rendered by default.

1,015 changes: 1,015 additions & 0 deletions docs/classes/UnitConverter.Unit.DigitalStorage.Megabyte.html

Large diffs are not rendered by default.

1,015 changes: 1,015 additions & 0 deletions docs/classes/UnitConverter.Unit.DigitalStorage.Tebibit.html

Large diffs are not rendered by default.

1,015 changes: 1,015 additions & 0 deletions docs/classes/UnitConverter.Unit.DigitalStorage.Terabit.html

Large diffs are not rendered by default.

1,015 changes: 1,015 additions & 0 deletions docs/classes/UnitConverter.Unit.DigitalStorage.Terabyte.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Energy.Calorie.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/classes/UnitConverter.Unit.Energy.EnergyUnit.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Energy.FootPound.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Energy.Joule.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Energy.Kilojoule.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Energy.KilowattHour.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Energy.Megaelectronvolt.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Energy.Megajoule.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Energy.MegawattHour.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Energy.NewtonMetre.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Energy.WattHour.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/classes/UnitConverter.Unit.Frequency.FrequencyUnit.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Frequency.Gigahertz.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Frequency.Hertz.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Frequency.Kilohertz.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Frequency.Megahertz.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Frequency.Millihertz.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Frequency.Terahertz.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/classes/UnitConverter.Unit.FuelEconomy.FuelEconomyUnit.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.FuelEconomy.KilometrePerLitre.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.FuelEconomy.LitrePer100Kilometres.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.FuelEconomy.MilesPerGallon.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Length.AstronomicalUnit.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Length.Centimetre.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Length.Decimetre.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Length.Foot.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Length.Hand.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Length.Inch.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Length.Kilometre.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/classes/UnitConverter.Unit.Length.LengthUnit.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Length.Lightyear.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Length.Metre.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Length.Micrometre.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Length.Mile.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Length.Millimetre.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Length.Nanometre.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Length.Parsec.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Length.Picometre.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Length.Yard.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Mass.Gram.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Mass.Kilogram.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Mass.LongTon.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/classes/UnitConverter.Unit.Mass.MassUnit.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Mass.Milligram.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Mass.Newton.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Mass.Ounce.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Mass.Pound.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Mass.ShortTon.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Mass.Stone.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Mass.Tonne.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.PlaneAngle.Degree.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/classes/UnitConverter.Unit.PlaneAngle.PlaneAngleUnit.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.PlaneAngle.Radian.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Pressure.Atmosphere.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Pressure.Bar.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Pressure.Kilopascal.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Pressure.Megapascal.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Pressure.Millibar.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Pressure.Pascal.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Pressure.PoundForcePerSquareInch.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/classes/UnitConverter.Unit.Pressure.PressureUnit.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Pressure.Torr.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/classes/UnitConverter.Unit.SiBaseUnitInterface.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/classes/UnitConverter.Unit.SiMultipleUnitInterface.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/classes/UnitConverter.Unit.SiSubmultipleUnitInterface.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Speed.KilometrePerHour.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Speed.MetrePerSecond.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Speed.MilePerHour.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/classes/UnitConverter.Unit.Speed.SpeedUnit.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Temperature.Celsius.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Temperature.Fahrenheit.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Temperature.Kelvin.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/classes/UnitConverter.Unit.Temperature.TemperatureUnit.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Time.Day.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Time.Hour.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Time.Microsecond.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Time.Millisecond.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Time.Minute.html

Large diffs are not rendered by default.

150 changes: 95 additions & 55 deletions docs/classes/UnitConverter.Unit.Time.Month.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Time.Nanosecond.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Time.Second.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/classes/UnitConverter.Unit.Time.TimeUnit.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Time.Week.html

Large diffs are not rendered by default.

150 changes: 95 additions & 55 deletions docs/classes/UnitConverter.Unit.Time.Year.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Volume.CubicMetre.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Volume.Gallon.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Volume.Litre.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Volume.Millilitre.html

Large diffs are not rendered by default.

146 changes: 91 additions & 55 deletions docs/classes/UnitConverter.Unit.Volume.Pint.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/classes/UnitConverter.Unit.Volume.VolumeUnit.html

Large diffs are not rendered by default.

154 changes: 99 additions & 55 deletions docs/classes/UnitConverter.UnitConverterInterface.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Calculator.AbstractCalculator.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Calculator.BinaryCalculator.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Calculator.CalculatorInterface.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Calculator.Formula.AbstractFormula.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Calculator.Formula.FormulaInterface.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Calculator.Formula.NullFormula.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Calculator.Formula.Temperature.Celsius.ToFahrenheit.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Calculator.Formula.Temperature.Celsius.ToKelvin.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Calculator.Formula.Temperature.Fahrenheit.ToCelsius.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Calculator.Formula.Temperature.Fahrenheit.ToKelvin.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Calculator.Formula.Temperature.TemperatureFormula.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Calculator.Formula.UnitConversionFormula.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Calculator.SimpleCalculator.html

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@ use UnitConverter\Calculator\Formula\AbstractFormula;
*/
class ToMilesPerGallon extends AbstractFormula
{

const MAGIC_NUMBER = 2.35215;

const FORMULA_STRING = 'mpg = 2.35215 * km/l';

const FORMULA_TEMPLATE = '%s mpg = 2.35215 * %skm/l';

const MAGIC_NUMBER = 2.35215;

/**
* {@inheritDoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@ use UnitConverter\Calculator\Formula\AbstractFormula;
*/
class ToMilesPerGallon extends AbstractFormula
{

const MAGIC_NUMBER = 235.215;

const FORMULA_STRING = 'mpg = 235.215 / L/100km';

const FORMULA_TEMPLATE = '%s mpg = 235.215 / %sL/100km';

const MAGIC_NUMBER = 235.215;

/**
* {@inheritDoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@ use UnitConverter\Calculator\Formula\AbstractFormula;
*/
class ToKilometrePerLitre extends AbstractFormula
{

const MAGIC_NUMBER = 0.425144;

const FORMULA_STRING = 'km/l = 0.425144 * mpg';

const FORMULA_TEMPLATE = '%s km/l = 0.425144 * %smpg';

const MAGIC_NUMBER = 0.425144;

/**
* {@inheritDoc}
*/
Expand Down
142 changes: 87 additions & 55 deletions docs/files/ConverterBuilder.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Exception.BadConverter.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Exception.BadMeasurement.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Exception.BadRegistry.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Exception.BadUnit.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Measure.html

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions docs/files/Measure.php.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,19 @@ use UnitConverter\Unit\Area\SquareKilometre;
use UnitConverter\Unit\Area\SquareMetre;
use UnitConverter\Unit\Area\SquareMile;
use UnitConverter\Unit\Area\SquareMillimetre;
use UnitConverter\Unit\DigitalStorage\Bit;
use UnitConverter\Unit\DigitalStorage\Gibibit;
use UnitConverter\Unit\DigitalStorage\Gigabit;
use UnitConverter\Unit\DigitalStorage\Gigabyte;
use UnitConverter\Unit\DigitalStorage\Kibibit;
use UnitConverter\Unit\DigitalStorage\Kilobit;
use UnitConverter\Unit\DigitalStorage\Kilobyte;
use UnitConverter\Unit\DigitalStorage\Mebibit;
use UnitConverter\Unit\DigitalStorage\Megabit;
use UnitConverter\Unit\DigitalStorage\Megabyte;
use UnitConverter\Unit\DigitalStorage\Tebibit;
use UnitConverter\Unit\DigitalStorage\Terabit;
use UnitConverter\Unit\DigitalStorage\Terabyte;
use UnitConverter\Unit\Energy\Calorie;
use UnitConverter\Unit\Energy\FootPound;
use UnitConverter\Unit\Energy\Joule;
Expand Down Expand Up @@ -112,6 +125,8 @@ class Measure
{
const AREA = "area";

const DIGITAL_STORAGE = "digital_storage";

const ENERGY = "energy";

const FREQUENCY = 'frequency';
Expand Down Expand Up @@ -245,6 +260,21 @@ class Measure
Terahertz::class,
Millihertz::class,
],
self::DIGITAL_STORAGE => [
Bit::class,
Kilobit::class,
Megabit::class,
Gigabit::class,
Terabit::class,
Kibibit::class,
Mebibit::class,
Gibibit::class,
Tebibit::class,
Kilobyte::class,
Megabyte::class,
Gigabyte::class,
Terabyte::class,
],
];

/**
Expand Down
142 changes: 87 additions & 55 deletions docs/files/Registry.UnitRegistry.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Registry.UnitRegistryInterface.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Support.ArrayDotNotation.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Support.Collection.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.AbstractUnit.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Area.Acre.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Area.AreaUnit.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Area.Hectare.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Area.SquareCentimetre.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Area.SquareFoot.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Area.SquareKilometre.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Area.SquareMetre.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Area.SquareMile.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Area.SquareMillimetre.html

Large diffs are not rendered by default.

842 changes: 842 additions & 0 deletions docs/files/Unit.DigitalStorage.Bit.html

Large diffs are not rendered by default.

842 changes: 842 additions & 0 deletions docs/files/Unit.DigitalStorage.Byte.html

Large diffs are not rendered by default.

844 changes: 844 additions & 0 deletions docs/files/Unit.DigitalStorage.DigitalStorageUnit.html

Large diffs are not rendered by default.

842 changes: 842 additions & 0 deletions docs/files/Unit.DigitalStorage.Gibibit.html

Large diffs are not rendered by default.

842 changes: 842 additions & 0 deletions docs/files/Unit.DigitalStorage.Gigabit.html

Large diffs are not rendered by default.

842 changes: 842 additions & 0 deletions docs/files/Unit.DigitalStorage.Gigabyte.html

Large diffs are not rendered by default.

842 changes: 842 additions & 0 deletions docs/files/Unit.DigitalStorage.Kibibit.html

Large diffs are not rendered by default.

842 changes: 842 additions & 0 deletions docs/files/Unit.DigitalStorage.Kilobit.html

Large diffs are not rendered by default.

842 changes: 842 additions & 0 deletions docs/files/Unit.DigitalStorage.Kilobyte.html

Large diffs are not rendered by default.

842 changes: 842 additions & 0 deletions docs/files/Unit.DigitalStorage.Mebibit.html

Large diffs are not rendered by default.

842 changes: 842 additions & 0 deletions docs/files/Unit.DigitalStorage.Megabit.html

Large diffs are not rendered by default.

842 changes: 842 additions & 0 deletions docs/files/Unit.DigitalStorage.Megabyte.html

Large diffs are not rendered by default.

842 changes: 842 additions & 0 deletions docs/files/Unit.DigitalStorage.Tebibit.html

Large diffs are not rendered by default.

842 changes: 842 additions & 0 deletions docs/files/Unit.DigitalStorage.Terabit.html

Large diffs are not rendered by default.

842 changes: 842 additions & 0 deletions docs/files/Unit.DigitalStorage.Terabyte.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Energy.Calorie.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Energy.EnergyUnit.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Energy.FootPound.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Energy.Joule.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Energy.Kilojoule.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Energy.KilowattHour.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Energy.Megaelectronvolt.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Energy.Megajoule.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Energy.MegawattHour.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Energy.NewtonMetre.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Energy.WattHour.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Frequency.FrequencyUnit.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Frequency.Gigahertz.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Frequency.Hertz.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Frequency.Kilohertz.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Frequency.Megahertz.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Frequency.Millihertz.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Frequency.Terahertz.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.FuelEconomy.FuelEconomyUnit.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.FuelEconomy.KilometrePerLitre.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.FuelEconomy.LitrePer100Kilometres.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.FuelEconomy.MilesPerGallon.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Length.AstronomicalUnit.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Length.Centimetre.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Length.Decimetre.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Length.Foot.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Length.Hand.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Length.Inch.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Length.Kilometre.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Length.LengthUnit.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Length.Lightyear.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Length.Metre.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Length.Micrometre.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Length.Mile.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Length.Millimetre.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Length.Nanometre.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Length.Parsec.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Length.Picometre.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Length.Yard.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Mass.Gram.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Mass.Kilogram.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Mass.LongTon.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Mass.MassUnit.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Mass.Milligram.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Mass.Newton.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Mass.Ounce.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Mass.Pound.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Mass.ShortTon.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Mass.Stone.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Mass.Tonne.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.PlaneAngle.Degree.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.PlaneAngle.PlaneAngleUnit.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.PlaneAngle.Radian.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Pressure.Atmosphere.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Pressure.Bar.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Pressure.Kilopascal.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Pressure.Megapascal.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Pressure.Millibar.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Pressure.Pascal.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Pressure.PoundForcePerSquareInch.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Pressure.PressureUnit.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Pressure.Torr.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.SiBaseUnitInterface.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.SiMultipleUnitInterface.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.SiSubmultipleUnitInterface.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Speed.KilometrePerHour.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Speed.MetrePerSecond.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Speed.MilePerHour.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Speed.SpeedUnit.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Temperature.Celsius.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Temperature.Fahrenheit.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Temperature.Kelvin.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Temperature.TemperatureUnit.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Time.Day.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Time.Hour.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Time.Microsecond.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Time.Millisecond.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Time.Minute.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Time.Month.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Time.Nanosecond.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Time.Second.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Time.TimeUnit.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Time.Week.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Time.Year.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.UnitInterface.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Volume.CubicMetre.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Volume.Gallon.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Volume.Litre.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Volume.Millilitre.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Volume.Pint.html

Large diffs are not rendered by default.

142 changes: 87 additions & 55 deletions docs/files/Unit.Volume.VolumeUnit.html

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion docs/files/Unit/AbstractUnit.php.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@ abstract class AbstractUnit implements UnitInterface
$this->configure();
}

/**
* String representation of a unit used for unique sorting.
*
* @return string
*/
public function __toString(): string
{
return $this->getScientificSymbol() ?? '';
}

public function addFormula(string $symbol, string $class): void
{
$this->formulae[$symbol] = $class;
Expand All @@ -108,7 +118,7 @@ abstract class AbstractUnit implements UnitInterface
{
return \UnitConverter\UnitConverter::createBuilder()
->{'add'.(($binary) ? 'Binary' : 'Simple').'Calculator'}() # ¯\_(ツ)_/¯
->addRegistryWith(array_unique([$this, $unit], SORT_REGULAR))
->addRegistryWith(array_unique([$this, $unit]))
->build()
// ->disableConversionLog() # TODO: when this returns interface, uncomment!
->convert((string) $this->getValue(), $precision)
Expand Down
38 changes: 38 additions & 0 deletions docs/files/Unit/DigitalStorage/Bit.php.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

declare(strict_types = 1);

/**
* This file is part of the jordanbrauer/unit-converter PHP package.
*
* @copyright 2018 Jordan Brauer <[email protected]>
* @license MIT
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace UnitConverter\Unit\DigitalStorage;

/**
* Bit unit data class
*
* @version 1.0.0
* @since 0.8.4
* @author Laurent Clouet <https://github.com/laurent35240>
*/
class Bit extends DigitalStorageUnit
{
protected function configure(): void
{
$this
->setName("bit")

->setSymbol("b")

->setScientificSymbol("b")

->setUnits(1);
}
}

38 changes: 38 additions & 0 deletions docs/files/Unit/DigitalStorage/Byte.php.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

declare(strict_types = 1);

/**
* This file is part of the jordanbrauer/unit-converter PHP package.
*
* @copyright 2018 Jordan Brauer <[email protected]>
* @license MIT
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace UnitConverter\Unit\DigitalStorage;

/**
* Byte unit data class
*
* @version 1.0.0
* @since 0.8.4
* @author Laurent Clouet <https://github.com/laurent35240>
*/
class Byte extends DigitalStorageUnit
{
protected function configure(): void
{
$this
->setName("byte")

->setSymbol("B")

->setScientificSymbol("B")

->setUnits(8);
}
}

35 changes: 35 additions & 0 deletions docs/files/Unit/DigitalStorage/DigitalStorageUnit.php.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

declare(strict_types = 1);

/**
* This file is part of the jordanbrauer/unit-converter PHP package.
*
* @copyright 2018 Jordan Brauer <[email protected]>
* @license MIT
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace UnitConverter\Unit\DigitalStorage;

use UnitConverter\Measure;
use UnitConverter\Unit\AbstractUnit;

/**
* Digital Storage unit base data class. Any new digital storage units should
* extend this class and implement their name, symbol and units;
* overriding the $unitOf and $base properties only if necessary.
*
* @version 1.0.0
* @since 0.8.4
* @author Laurent Clouet <https://github.com/laurent35240>
*/
abstract class DigitalStorageUnit extends AbstractUnit
{
protected $base = Bit::class;

protected $unitOf = Measure::DIGITAL_STORAGE;
}

38 changes: 38 additions & 0 deletions docs/files/Unit/DigitalStorage/Gibibit.php.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

declare(strict_types = 1);

/**
* This file is part of the jordanbrauer/unit-converter PHP package.
*
* @copyright 2018 Jordan Brauer <[email protected]>
* @license MIT
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace UnitConverter\Unit\DigitalStorage;

/**
* Gibibit unit data class
*
* @version 1.0.0
* @since 0.8.4
* @author Laurent Clouet <https://github.com/laurent35240>
*/
class Gibibit extends DigitalStorageUnit
{
protected function configure(): void
{
$this
->setName("mebibit")

->setSymbol("Gib")

->setScientificSymbol("Gib")

->setUnits(1073741824);
}
}

38 changes: 38 additions & 0 deletions docs/files/Unit/DigitalStorage/Gigabit.php.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

declare(strict_types = 1);

/**
* This file is part of the jordanbrauer/unit-converter PHP package.
*
* @copyright 2018 Jordan Brauer <[email protected]>
* @license MIT
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace UnitConverter\Unit\DigitalStorage;

/**
* Gigabit unit data class
*
* @version 1.0.0
* @since 0.8.4
* @author Laurent Clouet <https://github.com/laurent35240>
*/
class Gigabit extends DigitalStorageUnit
{
protected function configure(): void
{
$this
->setName("gigabit")

->setSymbol("Gb")

->setScientificSymbol("Gb")

->setUnits(1000000000);
}
}

38 changes: 38 additions & 0 deletions docs/files/Unit/DigitalStorage/Gigabyte.php.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

declare(strict_types = 1);

/**
* This file is part of the jordanbrauer/unit-converter PHP package.
*
* @copyright 2018 Jordan Brauer <[email protected]>
* @license MIT
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace UnitConverter\Unit\DigitalStorage;

/**
* Gigabyte unit data class
*
* @version 1.0.0
* @since 0.8.4
* @author Laurent Clouet <https://github.com/laurent35240>
*/
class Gigabyte extends DigitalStorageUnit
{
protected function configure(): void
{
$this
->setName("gigabyte")

->setSymbol("GB")

->setScientificSymbol("GB")

->setUnits(8000000000);
}
}

38 changes: 38 additions & 0 deletions docs/files/Unit/DigitalStorage/Kibibit.php.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

declare(strict_types = 1);

/**
* This file is part of the jordanbrauer/unit-converter PHP package.
*
* @copyright 2018 Jordan Brauer <[email protected]>
* @license MIT
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace UnitConverter\Unit\DigitalStorage;

/**
* Kibibit unit data class
*
* @version 1.0.0
* @since 0.8.4
* @author Laurent Clouet <https://github.com/laurent35240>
*/
class Kibibit extends DigitalStorageUnit
{
protected function configure(): void
{
$this
->setName("kibibit")

->setSymbol("Kib")

->setScientificSymbol("Kib")

->setUnits(1024);
}
}

Loading

0 comments on commit be778e1

Please sign in to comment.