/**
  * @param InternationalPhoneNumber $other
  * @return bool
  */
 public function equals(InternationalPhoneNumber $other)
 {
     return $this->countryCode->equals($other->countryCode) && $this->phoneNumber->equals($other->phoneNumber);
 }
Exemplo n.º 2
0
 /**
  * @param PhoneNumber $other
  * @return bool
  */
 public function equals(PhoneNumber $other)
 {
     return $this->formatAsMsisdnPart() === $other->formatAsMsisdnPart();
 }
Exemplo n.º 3
0
 /**
  * @test
  * @group value
  * @dataProvider toStringProvider
  *
  * @param string $given
  * @param string $expected
  */
 public function as_string_the_phone_number_is_rendered_with_a_replaced_leading_zero_between_brackets($given, $expected)
 {
     $phoneNumber = new PhoneNumber($given);
     $this->assertEquals($expected, $phoneNumber->__toString());
 }