Beispiel #1
0
 public function castToExchange($value, $type)
 {
     if (Caster::castExists($type, 'ExchangeFormat')) {
         $value = Caster::cast($value, 'ExchangeFormat');
     }
     return $value;
 }
Beispiel #2
0
 /**
  * @param $input
  * @param $type
  * @param $expected
  *
  * @dataProvider castProvider
  */
 public function testCast($input, $type, $expected)
 {
     $this->assertEquals($expected, Caster::cast($input, $type));
 }