@@ -65,6 +65,13 @@ class Address implements ImmutableAddressInterface
6565 */
6666 protected string $ addressLine2 ;
6767
68+ /**
69+ * The third line of the address block.
70+ *
71+ * @var string
72+ */
73+ protected string $ addressLine3 ;
74+
6875 /**
6976 * The organization.
7077 *
@@ -111,6 +118,7 @@ class Address implements ImmutableAddressInterface
111118 * @param string $sortingCode The sorting code
112119 * @param string $addressLine1 The first line of the address block.
113120 * @param string $addressLine2 The second line of the address block.
121+ * @param string $addressLine3 The third line of the address block.
114122 * @param string $organization The organization.
115123 * @param string $givenName The given name.
116124 * @param string $additionalName The additional name.
@@ -126,6 +134,7 @@ public function __construct(
126134 ?string $ sortingCode = '' ,
127135 ?string $ addressLine1 = '' ,
128136 ?string $ addressLine2 = '' ,
137+ ?string $ addressLine3 = '' ,
129138 ?string $ organization = '' ,
130139 ?string $ givenName = '' ,
131140 ?string $ additionalName = '' ,
@@ -140,6 +149,7 @@ public function __construct(
140149 $ this ->sortingCode = $ sortingCode ;
141150 $ this ->addressLine1 = $ addressLine1 ;
142151 $ this ->addressLine2 = $ addressLine2 ;
152+ $ this ->addressLine3 = $ addressLine3 ;
143153 $ this ->organization = $ organization ;
144154 $ this ->givenName = $ givenName ;
145155 $ this ->additionalName = $ additionalName ;
@@ -299,6 +309,25 @@ public function withAddressLine2(string $addressLine2): ImmutableAddressInterfac
299309 return $ new ;
300310 }
301311
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+
302331 /**
303332 * {@inheritdoc}
304333 */
0 commit comments