File tree Expand file tree Collapse file tree
src/LIN3S/SharedKernel/Domain/Model/TaxIdNumber Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ This changelog references the relevant changes done between versions.
55To get the diff for a specific change, go to https://github.com/LIN3S/SharedKernel/commit/XXX where XXX is the change hash
66To get the diff between two versions, go to https://github.com/LIN3S/SharedKernel/compare/v0.6.0...v0.7.0
77
8+ * 0.7.1
9+ * Added accesses to the primitive value of the TaxIdNumber.
810* 0.7.0
911 * Added TaxIdNumber value object.
1012* 0.6.0
Original file line number Diff line number Diff line change @@ -62,4 +62,19 @@ public static function fromSpanishDni(string $dni) : self
6262
6363 return new self ($ dni );
6464 }
65+
66+ public function number () : string
67+ {
68+ return $ this ->tin ;
69+ }
70+
71+ public function equals (TaxIdNumber $ tin ) : bool
72+ {
73+ return $ this ->tin === $ tin ->number ();
74+ }
75+
76+ public function __toString () : string
77+ {
78+ return (string ) $ this ->tin ;
79+ }
6580}
You can’t perform that action at this time.
0 commit comments