1 | <?php |
||
21 | abstract class Base |
||
22 | { |
||
23 | private $item; |
||
24 | private $context; |
||
25 | private $object; |
||
26 | |||
27 | |||
28 | /** |
||
29 | * Initializes the plugin instance. |
||
30 | * |
||
31 | * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects |
||
32 | * @param \Aimeos\MShop\Plugin\Item\Iface $item Plugin item object |
||
33 | */ |
||
34 | public function __construct( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MShop\Plugin\Item\Iface $item ) |
||
39 | |||
40 | |||
41 | /** |
||
42 | * Injects the outer object into the decorator stack |
||
43 | * |
||
44 | * @param \Aimeos\MShop\Plugin\Provider\Iface $object First object of the decorator stack |
||
45 | * @return \Aimeos\MShop\Plugin\Provider\Iface Plugin object for chaining method calls |
||
1 ignored issue
–
show
|
|||
46 | */ |
||
47 | public function setObject( \Aimeos\MShop\Plugin\Provider\Iface $object ) |
||
52 | |||
53 | |||
54 | /** |
||
55 | * Returns the first object of the decorator stack |
||
56 | * |
||
57 | * @return \Aimeos\MShop\Plugin\Provider\Iface First object of the decorator stack |
||
58 | */ |
||
59 | protected function getObject() |
||
67 | |||
68 | |||
69 | /** |
||
70 | * Returns the plugin item the provider is configured with. |
||
71 | * |
||
72 | * @return \Aimeos\MShop\Plugin\Item\Iface Plugin item object |
||
73 | */ |
||
74 | protected function getItemBase() |
||
78 | |||
79 | |||
80 | /** |
||
81 | * Returns the configuration value from the service item specified by its key. |
||
82 | * |
||
83 | * @param string $key Configuration key |
||
84 | * @param mixed $default Default value if configuration key isn't available |
||
85 | * @return string|null Value from service item configuration |
||
86 | */ |
||
87 | protected function getConfigValue( $key, $default = null ) |
||
97 | |||
98 | |||
99 | /** |
||
100 | * Returns the context object. |
||
101 | * |
||
102 | * @return \Aimeos\MShop\Context\Item\Iface Context item object |
||
103 | */ |
||
104 | protected function getContext() |
||
108 | } |
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.