File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
src/LIN3S/SharedKernel/Domain/Model/TaxIdNumber Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ This changelog references the relevant changes done between versions.
5
5
To get the diff for a specific change, go to https://github.com/LIN3S/SharedKernel/commit/XXX where XXX is the change hash
6
6
To get the diff between two versions, go to https://github.com/LIN3S/SharedKernel/compare/v0.6.0...v0.7.0
7
7
8
+ * 0.7.1
9
+ * Added accesses to the primitive value of the TaxIdNumber.
8
10
* 0.7.0
9
11
* Added TaxIdNumber value object.
10
12
* 0.6.0
Original file line number Diff line number Diff line change @@ -62,4 +62,19 @@ public static function fromSpanishDni(string $dni) : self
62
62
63
63
return new self ($ dni );
64
64
}
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
+ }
65
80
}
You can’t perform that action at this time.
0 commit comments