1 | <?php |
||
20 | trait Traits |
||
21 | { |
||
22 | private $addrMax = 0; |
||
23 | private $addrItems = []; |
||
24 | private $addrRmItems = []; |
||
25 | private $addrSorted; |
||
26 | |||
27 | |||
28 | /** |
||
29 | * Adds a new address item or overwrite an existing one |
||
30 | * |
||
31 | * @param \Aimeos\MShop\Common\Item\Address\Iface $item New or existing address item |
||
32 | * @return \Aimeos\MShop\Common\Item\Iface Self object for method chaining |
||
|
|||
33 | */ |
||
34 | public function addAddressItem( \Aimeos\MShop\Common\Item\Address\Iface $item ) |
||
42 | |||
43 | |||
44 | /** |
||
45 | * Removes an existing address item |
||
46 | * |
||
47 | * @param \Aimeos\MShop\Common\Item\Address\Iface $item Existing address item |
||
48 | * @return \Aimeos\MShop\Common\Item\Iface Self object for method chaining |
||
49 | * @throws \Aimeos\MShop\Exception If given address item isn't found |
||
50 | */ |
||
51 | public function deleteAddressItem( \Aimeos\MShop\Common\Item\Address\Iface $item ) |
||
66 | |||
67 | |||
68 | /** |
||
69 | * Removes a list of existing address items |
||
70 | * |
||
71 | * @param \Aimeos\MShop\Common\Item\Address\Iface[] $items Existing address items |
||
72 | * @return \Aimeos\MShop\Common\Item\Iface Self object for method chaining |
||
73 | * @throws \Aimeos\MShop\Exception If an item isn't a address item or isn't found |
||
74 | */ |
||
75 | public function deleteAddressItems( array $items ) |
||
83 | |||
84 | |||
85 | /** |
||
86 | * Returns the deleted address items |
||
87 | * |
||
88 | * @return \Aimeos\MShop\Common\Item\Address\Iface[] Address items |
||
89 | */ |
||
90 | public function getAddressItemsDeleted() |
||
94 | |||
95 | |||
96 | /** |
||
97 | * Returns the address items of the product |
||
98 | * |
||
99 | * @return \Aimeos\MShop\Common\Item\Address\Iface[] Associative list of address IDs as keys and address items as values |
||
100 | */ |
||
101 | public function getAddressItems() |
||
120 | |||
121 | |||
122 | /** |
||
123 | * Initializes the address items in the trait |
||
124 | * |
||
125 | * @param \Aimeos\MShop\Common\Item\Address\Iface[] $items Address items |
||
126 | */ |
||
127 | protected function initAddressItems( array $items ) |
||
131 | } |
||
132 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.