1 | <?php |
||
27 | final class AddressContext implements Context |
||
28 | { |
||
29 | /** |
||
30 | * @var FactoryInterface |
||
31 | */ |
||
32 | private $addressFactory; |
||
33 | |||
34 | /** |
||
35 | * @var CountryNameConverterInterface |
||
36 | */ |
||
37 | private $countryNameConverter; |
||
38 | |||
39 | /** |
||
40 | * @var AddressRepositoryInterface |
||
41 | */ |
||
42 | private $addressRepository; |
||
43 | |||
44 | /** |
||
45 | * @var RepositoryInterface |
||
46 | */ |
||
47 | private $countryRepository; |
||
48 | |||
49 | /** |
||
50 | * @param FactoryInterface $addressFactory |
||
51 | * @param CountryNameConverterInterface $countryNameConverter |
||
52 | * @param AddressRepositoryInterface $addressRepository |
||
53 | * @param RepositoryInterface $countryRepository |
||
54 | */ |
||
55 | public function __construct( |
||
66 | |||
67 | /** |
||
68 | * @Transform /^to "([^"]+)"$/ |
||
69 | * @Transform /^"([^"]+)" based \w+ address$/ |
||
70 | */ |
||
71 | public function createNewAddress($countryName) |
||
77 | |||
78 | /** |
||
79 | * @Transform /^address as "([^"]+)", "([^"]+)", "([^"]+)", "([^"]+)" for "([^"]+)"$/ |
||
80 | * @Transform /^address is "([^"]+)", "([^"]+)", "([^"]+)", "([^"]+)" for "([^"]+)"$/ |
||
81 | * @Transform /^address to "([^"]+)", "([^"]+)", "([^"]+)", "([^"]+)" for "([^"]+)"$/ |
||
82 | */ |
||
83 | public function createNewAddressWith($city, $street, $postcode, $countryName, $customerName) |
||
90 | |||
91 | /** |
||
92 | * @Transform /^clear old (shipping|billing) address$/ |
||
93 | * @Transform /^do not specify any (shipping|billing) address$/ |
||
94 | */ |
||
95 | public function createEmptyAddress() |
||
99 | |||
100 | /** |
||
101 | * @Transform /^address for "([^"]+)" from "([^"]+)", "([^"]+)", "([^"]+)", "([^"]+)", "([^"]+)"$/ |
||
102 | * @Transform /^"([^"]+)" addressed it to "([^"]+)", "([^"]+)" "([^"]+)" in the "([^"]+)"(?:|, "([^"]+)")$/ |
||
103 | * @Transform /^of "([^"]+)" in the "([^"]+)", "([^"]+)" "([^"]+)", "([^"]+)"(?:|, "([^"]+)")$/ |
||
104 | * @Transform /^addressed it to "([^"]+)", "([^"]+)", "([^"]+)" "([^"]+)" in the "([^"]+)"(?:|, "([^"]+)")$/ |
||
105 | * @Transform /^address (?:|is )"([^"]+)", "([^"]+)", "([^"]+)", "([^"]+)", "([^"]+)"(?:|, "([^"]+)")$/ |
||
106 | * @Transform /^address as "([^"]+)", "([^"]+)", "([^"]+)", "([^"]+)", "([^"]+)"(?:|, "([^"]+)")$/ |
||
107 | */ |
||
108 | public function createNewAddressWithName($name, $street, $postcode, $city, $countryName, $provinceName = null) |
||
115 | |||
116 | /** |
||
117 | * @Transform /^"([^"]+)" street$/ |
||
118 | */ |
||
119 | public function getByStreet($street) |
||
126 | |||
127 | /** |
||
128 | * @param string $countryCode |
||
129 | * @param string $firstName |
||
130 | * @param string $lastName |
||
131 | * @param string $city |
||
132 | * @param string $street |
||
133 | * @param string $postCode |
||
134 | * @param string $provinceName |
||
|
|||
135 | * |
||
136 | * @return AddressInterface |
||
137 | */ |
||
138 | private function createAddress( |
||
178 | } |
||
179 |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.