public function testToFloatValue() { $this->assertEquals(Coercion::toFloatValue(0), 0); $this->assertEquals(Coercion::toFloatValue("0"), 0); $this->assertEquals(Coercion::toFloatValue(1.11), 1.11); $this->assertEquals(Coercion::toFloatValue("1.11"), 1.11); }
private function coerceDealData(array $deal) { $deal['value'] = Coercion::toFloatValue($deal['value']); return $deal; }