1 | <?php |
||
20 | class RemoteCartStorage extends MultiFieldSession implements CartStorageInterface |
||
21 | { |
||
22 | /** |
||
23 | * To marge sesstion and remote cart storage |
||
24 | * @var string |
||
25 | */ |
||
26 | public $sessionCartId; |
||
27 | |||
28 | const CACHE_DURATION = 60 * 60; // 1 hour |
||
29 | /** |
||
30 | * @var array |
||
31 | */ |
||
32 | protected $data = []; |
||
33 | /** |
||
34 | * @var array |
||
35 | */ |
||
36 | protected $oldData = []; |
||
37 | /** |
||
38 | * @var SettingsStorage |
||
39 | */ |
||
40 | private $settingsStorage; |
||
41 | /** |
||
42 | * @var CacheInterface |
||
43 | */ |
||
44 | private $cache; |
||
45 | /** |
||
46 | * @var User |
||
47 | */ |
||
48 | private $user; |
||
49 | |||
50 | /** |
||
51 | * @var Session |
||
52 | */ |
||
53 | private $session; |
||
54 | |||
55 | public function __construct(Session $session, User $user, SettingsStorage $settingsStorage, CacheInterface $cache, array $config = []) |
||
64 | |||
65 | protected function read() |
||
81 | |||
82 | protected function getSessionCartData() |
||
91 | |||
92 | protected function mergeCartData($remoteData, $sessionData) |
||
99 | |||
100 | protected function getCacheKey() |
||
104 | |||
105 | protected function getStorageKey() |
||
109 | |||
110 | protected function write() |
||
123 | |||
124 | /** |
||
125 | * @var bool |
||
126 | */ |
||
127 | private $_isActive; |
||
128 | |||
129 | public function getIsActive() |
||
133 | |||
134 | /** {@inheritdoc} */ |
||
135 | public function open() |
||
146 | |||
147 | /** {@inheritdoc} */ |
||
148 | public function offsetExists($offset) |
||
154 | |||
155 | /** {@inheritdoc} */ |
||
156 | public function offsetGet($offset) |
||
162 | |||
163 | /** {@inheritdoc} */ |
||
164 | public function offsetSet($offset, $item) |
||
170 | |||
171 | /** {@inheritdoc} */ |
||
172 | public function offsetUnset($offset) |
||
177 | |||
178 | /** |
||
179 | * @throws NotSupportedException |
||
180 | * @void |
||
181 | */ |
||
182 | private function throwShouldNotBeCalledException() |
||
186 | |||
187 | /** {@inheritdoc} */ |
||
188 | public function regenerateID($deleteOldSession = false) |
||
192 | |||
193 | /** {@inheritdoc} */ |
||
194 | public function readSession($id) |
||
198 | |||
199 | /** {@inheritdoc} */ |
||
200 | public function writeSession($id, $data) |
||
204 | |||
205 | /** {@inheritdoc} */ |
||
206 | public function destroySession($id) |
||
210 | |||
211 | /** {@inheritdoc} */ |
||
212 | public function gcSession($maxLifetime) |
||
216 | |||
217 | private function registerShutdownFunction() |
||
221 | } |
||
222 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..