@@ -18,8 +18,8 @@ final class AddressContext implements Context
1818 private Generator $ fakerGenerator ;
1919
2020 public function __construct (
21- private ExampleFactoryInterface $ exampleAddressFactory ,
22- private CountryNameConverterInterface $ countryNameConverter
21+ private readonly ExampleFactoryInterface $ exampleAddressFactory ,
22+ private readonly CountryNameConverterInterface $ countryNameConverter
2323 ) {
2424 $ this ->fakerGenerator = Factory::create ();
2525 }
@@ -28,11 +28,11 @@ public function __construct(
2828 * @Transform /^address for the individual "([^"]+)" - "([^"]+)", "([^"]+)", "([^"]+)" - "([^"]+)"$/
2929 */
3030 public function createNewIndividualAddressWith (
31- $ customerName ,
32- $ city ,
33- $ street ,
34- $ postcode ,
35- $ countryName
31+ string $ customerName ,
32+ string $ city ,
33+ string $ street ,
34+ string $ postcode ,
35+ string $ countryName
3636 ): AddressInterface {
3737 [$ firstName , $ lastName ] = explode (' ' , $ customerName );
3838
@@ -57,12 +57,12 @@ public function createNewIndividualAddressWith(
5757 * @Transform /^address for the company "([^"]*)" - "([^"]*)" - "([^"]*)", "([^"]*)", "([^"]*)" - "([^"]*)"$/
5858 */
5959 public function createNewCompanyAddressWith (
60- $ company ,
61- $ customerName ,
62- $ street ,
63- $ postcode ,
64- $ city ,
65- $ countryName
60+ string $ company ,
61+ string $ customerName ,
62+ string $ street ,
63+ string $ postcode ,
64+ string $ city ,
65+ string $ countryName
6666 ): AddressInterface {
6767 [$ firstName , $ lastName ] = explode (' ' , $ customerName );
6868
@@ -90,7 +90,7 @@ public function createNewCompanyAddressWith(
9090 */
9191 public function createNewValidItalianIndividualBillingAddress ()
9292 {
93- /** @var AddressInterface&ItalianInvoiceableAddressInterface $address */
93+ /** @var AddressInterface|(AddressInterface &ItalianInvoiceableAddressInterface) $address */
9494 $ address = $ this ->exampleAddressFactory ->create (['country_code ' => 'IT ' , 'customer ' => null ]);
9595 Assert::isInstanceOf ($ address , ItalianInvoiceableAddressInterface::class);
9696 $ address ->setBillingRecipientType (ItalianInvoiceableAddressInterface::BILLING_RECIPIENT_TYPE_INDIVIDUAL );
@@ -105,7 +105,7 @@ public function createNewValidItalianIndividualBillingAddress()
105105 */
106106 public function createNewValidItalianCompanyBillingAddress ()
107107 {
108- /** @var AddressInterface&ItalianInvoiceableAddressInterface $address */
108+ /** @var AddressInterface|(AddressInterface &ItalianInvoiceableAddressInterface) $address */
109109 $ address = $ this ->exampleAddressFactory ->create (['country_code ' => 'IT ' , 'customer ' => null ]);
110110 Assert::isInstanceOf ($ address , ItalianInvoiceableAddressInterface::class);
111111 $ address ->setBillingRecipientType (ItalianInvoiceableAddressInterface::BILLING_RECIPIENT_TYPE_COMPANY );
@@ -125,7 +125,7 @@ public function createNewValidItalianCompanyBillingAddress()
125125 */
126126 public function createNewValidGermanIndividualBillingAddress ()
127127 {
128- /** @var AddressInterface&ItalianInvoiceableAddressInterface $address */
128+ /** @var AddressInterface|(AddressInterface &ItalianInvoiceableAddressInterface) $address */
129129 $ address = $ this ->exampleAddressFactory ->create (['country_code ' => 'DE ' , 'customer ' => null ]);
130130 Assert::isInstanceOf ($ address , ItalianInvoiceableAddressInterface::class);
131131 $ address ->setBillingRecipientType (ItalianInvoiceableAddressInterface::BILLING_RECIPIENT_TYPE_INDIVIDUAL );
@@ -138,7 +138,7 @@ public function createNewValidGermanIndividualBillingAddress()
138138 */
139139 public function createNewValidGermanCompanyBillingAddress ()
140140 {
141- /** @var AddressInterface&ItalianInvoiceableAddressInterface $address */
141+ /** @var AddressInterface|(AddressInterface &ItalianInvoiceableAddressInterface) $address */
142142 $ address = $ this ->exampleAddressFactory ->create (['country_code ' => 'DE ' , 'customer ' => null ]);
143143 Assert::isInstanceOf ($ address , ItalianInvoiceableAddressInterface::class);
144144 $ address ->setBillingRecipientType (ItalianInvoiceableAddressInterface::BILLING_RECIPIENT_TYPE_COMPANY );
@@ -155,7 +155,7 @@ public function createNewValidGermanCompanyBillingAddress()
155155 */
156156 public function createNewValidUSIndividualBillingAddress ()
157157 {
158- /** @var AddressInterface&ItalianInvoiceableAddressInterface $address */
158+ /** @var AddressInterface|(AddressInterface &ItalianInvoiceableAddressInterface) $address */
159159 $ address = $ this ->exampleAddressFactory ->create (['country_code ' => 'US ' , 'customer ' => null ]);
160160 Assert::isInstanceOf ($ address , ItalianInvoiceableAddressInterface::class);
161161 $ address ->setBillingRecipientType (ItalianInvoiceableAddressInterface::BILLING_RECIPIENT_TYPE_INDIVIDUAL );
@@ -169,7 +169,7 @@ public function createNewValidUSIndividualBillingAddress()
169169 */
170170 public function createNewValidUSCompanyBillingAddress ()
171171 {
172- /** @var AddressInterface&ItalianInvoiceableAddressInterface $address */
172+ /** @var AddressInterface|(AddressInterface &ItalianInvoiceableAddressInterface) $address */
173173 $ address = $ this ->exampleAddressFactory ->create (['country_code ' => 'US ' , 'customer ' => null ]);
174174 Assert::isInstanceOf ($ address , ItalianInvoiceableAddressInterface::class);
175175 $ address ->setBillingRecipientType (ItalianInvoiceableAddressInterface::BILLING_RECIPIENT_TYPE_COMPANY );
0 commit comments