Skip to content

Commit 49c8a9d

Browse files
committed
Added nationalPhone in the Phone value object
1 parent 782154d commit 49c8a9d

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ This changelog references the relevant changes done between versions.
55
To get the diff for a specific change, go to https://github.com/LIN3S/SharedKernel/commit/XXX where XXX is the change hash
66
To get the diff between two versions, go to https://github.com/LIN3S/SharedKernel/compare/v0.8.0...v0.9.0
77

8+
* 0.9.6
9+
* Added `nationalPhone` in the Phone value object.
810
* 0.9.5
911
* Allowed multiple tags with the same subscriber,
1012
* 0.9.4

src/LIN3S/SharedKernel/Domain/Model/Phone/Phone.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ public function phone() : string
5555
return PhoneNumberUtil::getInstance()->format($this->phone, PhoneNumberFormat::E164);
5656
}
5757

58+
public function nationalPhone() : string
59+
{
60+
return PhoneNumberUtil::getInstance()->getNationalSignificantNumber($this->phone);
61+
}
62+
5863
public function phoneCallingFrom($region) : string
5964
{
6065
return PhoneNumberUtil::getInstance()->formatOutOfCountryCallingNumber($this->phone, $region);

0 commit comments

Comments
 (0)