@@ -65,6 +65,13 @@ class Address implements ImmutableAddressInterface
65
65
*/
66
66
protected string $ addressLine2 ;
67
67
68
+ /**
69
+ * The third line of the address block.
70
+ *
71
+ * @var string
72
+ */
73
+ protected string $ addressLine3 ;
74
+
68
75
/**
69
76
* The organization.
70
77
*
@@ -111,6 +118,7 @@ class Address implements ImmutableAddressInterface
111
118
* @param string $sortingCode The sorting code
112
119
* @param string $addressLine1 The first line of the address block.
113
120
* @param string $addressLine2 The second line of the address block.
121
+ * @param string $addressLine3 The third line of the address block.
114
122
* @param string $organization The organization.
115
123
* @param string $givenName The given name.
116
124
* @param string $additionalName The additional name.
@@ -126,6 +134,7 @@ public function __construct(
126
134
?string $ sortingCode = '' ,
127
135
?string $ addressLine1 = '' ,
128
136
?string $ addressLine2 = '' ,
137
+ ?string $ addressLine3 = '' ,
129
138
?string $ organization = '' ,
130
139
?string $ givenName = '' ,
131
140
?string $ additionalName = '' ,
@@ -140,6 +149,7 @@ public function __construct(
140
149
$ this ->sortingCode = $ sortingCode ;
141
150
$ this ->addressLine1 = $ addressLine1 ;
142
151
$ this ->addressLine2 = $ addressLine2 ;
152
+ $ this ->addressLine3 = $ addressLine3 ;
143
153
$ this ->organization = $ organization ;
144
154
$ this ->givenName = $ givenName ;
145
155
$ this ->additionalName = $ additionalName ;
@@ -299,6 +309,25 @@ public function withAddressLine2(string $addressLine2): ImmutableAddressInterfac
299
309
return $ new ;
300
310
}
301
311
312
+ /**
313
+ * {@inheritdoc}
314
+ */
315
+ public function getAddressLine3 (): ?string
316
+ {
317
+ return $ this ->addressLine3 ;
318
+ }
319
+
320
+ /**
321
+ * {@inheritdoc}
322
+ */
323
+ public function withAddressLine3 (string $ addressLine3 ): ImmutableAddressInterface |Address
324
+ {
325
+ $ new = clone $ this ;
326
+ $ new ->addressLine3 = $ addressLine3 ;
327
+
328
+ return $ new ;
329
+ }
330
+
302
331
/**
303
332
* {@inheritdoc}
304
333
*/
0 commit comments