예제 #1
0
 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);
 }
예제 #2
0
 private function coerceDealData(array $deal)
 {
     $deal['value'] = Coercion::toFloatValue($deal['value']);
     return $deal;
 }