From b28e62e880cc787a76c7904731f523d8f31dfa01 Mon Sep 17 00:00:00 2001 From: David Rushton Date: Sat, 4 Jun 2016 17:02:40 +0100 Subject: [PATCH] Fixed config parameter in static make call. --- src/Distance.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Distance.php b/src/Distance.php index ba26625..e13c92d 100644 --- a/src/Distance.php +++ b/src/Distance.php @@ -24,29 +24,29 @@ public function __construct($value, $unit = 'meters', $config = null) } } - public static function make($distance, $unit = 'meters') + public static function make($distance, $unit = 'meters', $config = null) { - return new static($distance, $unit, $this->config); + return new static($distance, $unit, $config); } public static function fromMeters($distance) { - return new static($distance, 'meters', $this->config); + return new static($distance, 'meters'); } public static function fromKilometers($distance) { - return new static($distance, 'kilometers', $this->config); + return new static($distance, 'kilometers'); } public static function fromMiles($distance) { - return new static($distance, 'miles', $this->config); + return new static($distance, 'miles'); } public static function fromFootsteps($distance) { - return new static($distance, 'footsteps', $this->config); + return new static($distance, 'footsteps'); } public static function fromSteps($distance) @@ -56,7 +56,7 @@ public static function fromSteps($distance) public function copy() { - return new static($this->value, $this->unit, $this->config); + return new static($this->value, $this->unit); } /* Getters and Setters */