Beispiel #1
0
 /**
  * @param array $array
  * @return Issuer
  */
 public static function fromArray(array $array)
 {
     Guard::keyExists($array, 'id');
     Guard::keyExists($array, 'name');
     Guard::keyExists($array, 'list_type');
     return new Issuer(SwiftBic::fromString($array['id']), Name::fromString($array['name']), ListType::fromString($array['list_type']));
 }
Beispiel #2
0
 /**
  * @test
  */
 public function itShouldGuardAgainstEmptyValue()
 {
     $this->setExpectedException('Assert\\InvalidArgumentException');
     Name::fromString('');
 }