1 | <?php |
||
24 | class TagManagerVariables implements TagManagerVariablesInterface |
||
25 | { |
||
26 | /** |
||
27 | * @var \WbmTagManager\Models\Repository |
||
28 | */ |
||
29 | private $propertyRepository; |
||
30 | |||
31 | /** |
||
32 | * @var \Enlight_Template_Manager |
||
33 | */ |
||
34 | private $template; |
||
35 | |||
36 | /** |
||
37 | * @var TagManagerSmartyInterface |
||
38 | */ |
||
39 | private $smartyPlugins; |
||
40 | |||
41 | /** |
||
42 | * @var string |
||
43 | */ |
||
44 | private $module = 'frontend'; |
||
45 | |||
46 | /** |
||
47 | * @var array |
||
48 | */ |
||
49 | private $viewVariables = []; |
||
50 | |||
51 | /** |
||
52 | * @var mixed |
||
53 | */ |
||
54 | private $variables = null; |
||
55 | |||
56 | /** |
||
57 | * TagManagerVariables constructor. |
||
58 | * |
||
59 | * @param ModelRepository $propertyRepository |
||
60 | * @param \Enlight_Template_Manager $template |
||
61 | * @param TagManagerSmartyInterface $smartyPlugins |
||
62 | */ |
||
63 | public function __construct( |
||
72 | |||
73 | /** |
||
74 | * @return array |
||
75 | */ |
||
76 | public function getViewVariables() |
||
80 | |||
81 | /** |
||
82 | * @param array $viewVariables |
||
83 | */ |
||
84 | public function setViewVariables($viewVariables) |
||
88 | |||
89 | /** |
||
90 | * @return mixed |
||
91 | */ |
||
92 | public function getVariables() |
||
100 | |||
101 | /** |
||
102 | * @param mixed $variables |
||
103 | */ |
||
104 | public function setVariables($variables) |
||
112 | |||
113 | /** |
||
114 | * @param string $module |
||
115 | * |
||
116 | * @throws \Exception |
||
117 | */ |
||
118 | public function render($module) |
||
130 | |||
131 | /** |
||
132 | * @param array $dataLayer |
||
133 | * |
||
134 | * @throws \Exception |
||
135 | * |
||
136 | * @return mixed |
||
137 | */ |
||
138 | public function fillValues($dataLayer) |
||
167 | |||
168 | /** |
||
169 | * @param $source |
||
170 | * @param bool $prettyPrint |
||
171 | * |
||
172 | * @return string |
||
173 | */ |
||
174 | public function prependDataLayer($source, $prettyPrint = false) |
||
190 | |||
191 | /** |
||
192 | * @param string $module |
||
193 | */ |
||
194 | public function setModule($module) |
||
198 | |||
199 | /** |
||
200 | * @param $value |
||
201 | */ |
||
202 | private function castArrayValues(&$value) |
||
217 | |||
218 | /** |
||
219 | * @param string $string |
||
220 | * |
||
221 | * @throws \Exception |
||
222 | * |
||
223 | * @return string $string |
||
224 | */ |
||
225 | private function compileString($string) |
||
247 | |||
248 | /** |
||
249 | * @param \Enlight_Template_Manager $view |
||
250 | * |
||
251 | * @throws \SmartyException |
||
252 | */ |
||
253 | private function registerSmartyPlugins($view) |
||
281 | |||
282 | /** |
||
283 | * @param string $string |
||
284 | * @param \Shopware_Components_StringCompiler $compiler |
||
285 | * |
||
286 | * @return mixed |
||
287 | */ |
||
288 | private function stripSlashesFromJsonEncodedSmartySyntax( |
||
322 | } |
||
323 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.