1 | <?php |
||
19 | class Context |
||
20 | { |
||
21 | /** |
||
22 | * @var \Aimeos\MShop\Context\Item\Iface |
||
23 | */ |
||
24 | private static $context; |
||
25 | |||
26 | /** |
||
27 | * @var \Illuminate\Contracts\Config\Repository |
||
28 | */ |
||
29 | private $config; |
||
30 | |||
31 | /** |
||
32 | * @var \Aimeos\MShop\Locale\Item\Iface |
||
33 | */ |
||
34 | private $locale; |
||
35 | |||
36 | /** |
||
37 | * @var \Illuminate\Session\Store |
||
38 | */ |
||
39 | private $session; |
||
40 | |||
41 | |||
42 | /** |
||
43 | * Initializes the object |
||
44 | * |
||
45 | * @param \Illuminate\Contracts\Config\Repository $config Configuration object |
||
46 | * @param \Illuminate\Session\Store $session Laravel session object |
||
47 | */ |
||
48 | public function __construct( \Illuminate\Contracts\Config\Repository $config, \Illuminate\Session\Store $session ) |
||
53 | |||
54 | |||
55 | /** |
||
56 | * Returns the current context |
||
57 | * |
||
58 | * @param boolean $locale True to add locale object to context, false if not |
||
59 | * @return \Aimeos\MShop\Context\Item\Iface Context object |
||
60 | */ |
||
61 | public function get( $locale = true ) |
||
106 | |||
107 | |||
108 | /** |
||
109 | * Adds the user ID and name if available |
||
110 | * |
||
111 | * @param \Aimeos\MShop\Context\Item\Iface $context Context object |
||
112 | */ |
||
113 | protected function addUser( \Aimeos\MShop\Context\Item\Iface $context ) |
||
129 | |||
130 | |||
131 | /** |
||
132 | * Creates a new configuration object. |
||
133 | * |
||
134 | * @return \Aimeos\MW\Config\Iface Configuration object |
||
135 | */ |
||
136 | protected function getConfig() |
||
149 | |||
150 | |||
151 | /** |
||
152 | * Returns the locale item for the current request |
||
153 | * |
||
154 | * @param \Aimeos\MShop\Context\Item\Iface $context Context object |
||
155 | * @return \Aimeos\MShop\Locale\Item\Iface Locale item object |
||
156 | */ |
||
157 | protected function getLocale( \Aimeos\MShop\Context\Item\Iface $context ) |
||
181 | } |
||
182 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: