コード例 #1
0
 public static function deserialize($data)
 {
     Assertion::isArray($data);
     $telephoneNumbers = array_map(function ($telephoneNumber) {
         return TelephoneNumber::deserialize($telephoneNumber);
     }, $data);
     return new self($telephoneNumbers);
 }
コード例 #2
0
 /**
  * @test
  * @group        metadata
  * @group        contactperson
  *
  * @dataProvider \OpenConext\Value\TestDataProvider::notStringOrEmptyString
  * @expectedException InvalidArgumentException
  *
  * @param mixed $invalidData
  */
 public function deserialization_requires_the_presence_of_the_correct_data($invalidData)
 {
     TelephoneNumber::deserialize($invalidData);
 }