Skip to content

Commit

Permalink
Fix: using new ::configure() method over explicit value definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanbrauer committed Oct 11, 2017
1 parent 969a12f commit 35fadfc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
11 changes: 8 additions & 3 deletions src/UnitConverter/Unit/Temperature/Celsius.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,14 @@
*/
class Celsius extends TemperatureUnit
{
protected $name = "celsius";
protected function configure ()
{
$this
->setName("celsius")

protected $symbol = "c";
->setSymbol("c")

protected $units = -272.15;
->setUnits(-272.15)
;
}
}
8 changes: 5 additions & 3 deletions src/UnitConverter/Unit/Temperature/Fahrenheit.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@
*/
class Fahrenheit extends TemperatureUnit
{
protected $name = "fahrenheit";
$this
->setName("fahrenheit")

protected $symbol = "f";
->setSymbol("f")

protected $units = -457.87;
->setUnits(-457.87)
;
}
11 changes: 8 additions & 3 deletions src/UnitConverter/Unit/Temperature/Kelvin.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,14 @@
*/
class Kelvin extends TemperatureUnit
{
protected $name = "kelvin";
protected function configure ()
{
$this
->setName("kelvin")

protected $symbol = "k";
->setSymbol("k")

protected $units = 1;
->setUnits(1)
;
}
}

0 comments on commit 35fadfc

Please sign in to comment.