Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.
Common duplication problems, and corresponding solutions are:
Complex classes like __TwigTemplate_df89f146ce5e5bd7387841ceb1c6aae4a7eb94285f73e08a32fd417fea95c384 often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes. You can also have a look at the cohesion graph to spot any un-connected, or weakly-connected components.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use __TwigTemplate_df89f146ce5e5bd7387841ceb1c6aae4a7eb94285f73e08a32fd417fea95c384, and based on these observations, apply Extract Interface, too.
1 | <?php |
||
4 | class __TwigTemplate_df89f146ce5e5bd7387841ceb1c6aae4a7eb94285f73e08a32fd417fea95c384 extends Twig_Template |
||
5 | { |
||
6 | public function __construct(Twig_Environment $env) |
||
7 | { |
||
8 | parent::__construct($env); |
||
9 | |||
10 | $this->parent = false; |
||
11 | |||
12 | $this->blocks = array( |
||
13 | ); |
||
14 | } |
||
15 | |||
16 | protected function doDisplay(array $context, array $blocks = array()) |
||
17 | { |
||
18 | // line 4 |
||
19 | echo " |
||
20 | "; |
||
21 | // line 14 |
||
22 | echo " |
||
23 | "; |
||
24 | // line 20 |
||
25 | echo " |
||
26 | "; |
||
27 | // line 26 |
||
28 | echo " |
||
29 | "; |
||
30 | // line 42 |
||
31 | echo " |
||
32 | "; |
||
33 | // line 48 |
||
34 | echo " |
||
35 | "; |
||
36 | // line 56 |
||
37 | echo " |
||
38 | "; |
||
39 | // line 60 |
||
40 | echo " |
||
41 | "; |
||
42 | // line 72 |
||
43 | echo " |
||
44 | "; |
||
45 | // line 94 |
||
46 | echo " |
||
47 | "; |
||
48 | // line 106 |
||
49 | echo " |
||
50 | "; |
||
51 | // line 110 |
||
52 | echo " |
||
53 | "; |
||
54 | } |
||
55 | |||
56 | // line 1 |
||
57 | public function getnamespace_link($__namespace__ = null, ...$__varargs__) |
||
58 | { |
||
59 | $context = $this->env->mergeGlobals(array( |
||
60 | "namespace" => $__namespace__, |
||
61 | "varargs" => $__varargs__, |
||
62 | )); |
||
63 | |||
64 | $blocks = array(); |
||
65 | |||
66 | ob_start(); |
||
67 | try { |
||
68 | // line 2 |
||
69 | echo "<a href=\""; |
||
70 | echo $this->env->getExtension('sami')->pathForNamespace($context, (isset($context["namespace"]) ? $context["namespace"] : $this->getContext($context, "namespace"))); |
||
71 | echo "\">"; |
||
72 | echo (isset($context["namespace"]) ? $context["namespace"] : $this->getContext($context, "namespace")); |
||
73 | echo "</a>"; |
||
74 | } catch (Exception $e) { |
||
75 | ob_end_clean(); |
||
76 | |||
77 | throw $e; |
||
78 | } catch (Throwable $e) { |
||
79 | ob_end_clean(); |
||
80 | |||
81 | throw $e; |
||
82 | } |
||
83 | |||
84 | return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset()); |
||
85 | } |
||
86 | |||
87 | // line 5 |
||
88 | public function getclass_link($__class__ = null, $__absolute__ = null, ...$__varargs__) |
||
89 | { |
||
90 | $context = $this->env->mergeGlobals(array( |
||
91 | "class" => $__class__, |
||
92 | "absolute" => $__absolute__, |
||
93 | "varargs" => $__varargs__, |
||
94 | )); |
||
95 | |||
96 | $blocks = array(); |
||
97 | |||
98 | ob_start(); |
||
99 | try { |
||
100 | // line 6 |
||
101 | if ($this->getAttribute((isset($context["class"]) ? $context["class"] : $this->getContext($context, "class")), "projectclass", array())) { |
||
102 | // line 7 |
||
103 | echo "<a href=\""; |
||
104 | echo $this->env->getExtension('sami')->pathForClass($context, (isset($context["class"]) ? $context["class"] : $this->getContext($context, "class"))); |
||
105 | echo "\">"; |
||
106 | } elseif ($this->getAttribute( // line 8 |
||
107 | (isset($context["class"]) ? $context["class"] : $this->getContext($context, "class")), "phpclass", array())) { |
||
108 | // line 9 |
||
109 | echo "<a target=\"_blank\" href=\"http://php.net/"; |
||
110 | echo (isset($context["class"]) ? $context["class"] : $this->getContext($context, "class")); |
||
111 | echo "\">"; |
||
112 | } |
||
113 | // line 11 |
||
114 | echo $this->env->getExtension('sami')->abbrClass((isset($context["class"]) ? $context["class"] : $this->getContext($context, "class")), ((array_key_exists("absolute", $context)) ? (_twig_default_filter((isset($context["absolute"]) ? $context["absolute"] : $this->getContext($context, "absolute")), false)) : (false))); |
||
115 | // line 12 |
||
116 | if (($this->getAttribute((isset($context["class"]) ? $context["class"] : $this->getContext($context, "class")), "projectclass", array()) || $this->getAttribute((isset($context["class"]) ? $context["class"] : $this->getContext($context, "class")), "phpclass", array()))) { |
||
117 | echo "</a>"; |
||
118 | } |
||
119 | } catch (Exception $e) { |
||
120 | ob_end_clean(); |
||
121 | |||
122 | throw $e; |
||
123 | } catch (Throwable $e) { |
||
124 | ob_end_clean(); |
||
125 | |||
126 | throw $e; |
||
127 | } |
||
128 | |||
129 | return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset()); |
||
130 | } |
||
131 | |||
132 | // line 15 |
||
133 | public function getmethod_link($__method__ = null, $__absolute__ = null, $__classonly__ = null, ...$__varargs__) |
||
134 | { |
||
135 | $context = $this->env->mergeGlobals(array( |
||
136 | "method" => $__method__, |
||
137 | "absolute" => $__absolute__, |
||
138 | "classonly" => $__classonly__, |
||
139 | "varargs" => $__varargs__, |
||
140 | )); |
||
141 | |||
142 | $blocks = array(); |
||
143 | |||
144 | ob_start(); |
||
145 | try { |
||
146 | // line 16 |
||
147 | echo "<a href=\""; |
||
148 | echo $this->env->getExtension('sami')->pathForMethod($context, (isset($context["method"]) ? $context["method"] : $this->getContext($context, "method"))); |
||
149 | echo "\">"; |
||
150 | // line 17 |
||
151 | echo $this->env->getExtension('sami')->abbrClass($this->getAttribute((isset($context["method"]) ? $context["method"] : $this->getContext($context, "method")), "class", array())); |
||
152 | if ( !((array_key_exists("classonly", $context)) ? (_twig_default_filter((isset($context["classonly"]) ? $context["classonly"] : $this->getContext($context, "classonly")), false)) : (false))) { |
||
153 | echo "::"; |
||
154 | echo $this->getAttribute((isset($context["method"]) ? $context["method"] : $this->getContext($context, "method")), "name", array()); |
||
155 | } |
||
156 | // line 18 |
||
157 | echo "</a>"; |
||
158 | } catch (Exception $e) { |
||
159 | ob_end_clean(); |
||
160 | |||
161 | throw $e; |
||
162 | } catch (Throwable $e) { |
||
163 | ob_end_clean(); |
||
164 | |||
165 | throw $e; |
||
166 | } |
||
167 | |||
168 | return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset()); |
||
169 | } |
||
170 | |||
171 | // line 21 |
||
172 | public function getproperty_link($__property__ = null, $__absolute__ = null, $__classonly__ = null, ...$__varargs__) |
||
173 | { |
||
174 | $context = $this->env->mergeGlobals(array( |
||
175 | "property" => $__property__, |
||
176 | "absolute" => $__absolute__, |
||
177 | "classonly" => $__classonly__, |
||
178 | "varargs" => $__varargs__, |
||
179 | )); |
||
180 | |||
181 | $blocks = array(); |
||
182 | |||
183 | ob_start(); |
||
184 | try { |
||
185 | // line 22 |
||
186 | echo "<a href=\""; |
||
187 | echo $this->env->getExtension('sami')->pathForProperty($context, (isset($context["property"]) ? $context["property"] : $this->getContext($context, "property"))); |
||
188 | echo "\">"; |
||
189 | // line 23 |
||
190 | echo $this->env->getExtension('sami')->abbrClass($this->getAttribute((isset($context["property"]) ? $context["property"] : $this->getContext($context, "property")), "class", array())); |
||
191 | if ( !((array_key_exists("classonly", $context)) ? (_twig_default_filter((isset($context["classonly"]) ? $context["classonly"] : $this->getContext($context, "classonly")), true)) : (true))) { |
||
192 | echo "#"; |
||
193 | echo $this->getAttribute((isset($context["property"]) ? $context["property"] : $this->getContext($context, "property")), "name", array()); |
||
194 | } |
||
195 | // line 24 |
||
196 | echo "</a>"; |
||
197 | } catch (Exception $e) { |
||
198 | ob_end_clean(); |
||
199 | |||
200 | throw $e; |
||
201 | } catch (Throwable $e) { |
||
202 | ob_end_clean(); |
||
203 | |||
204 | throw $e; |
||
205 | } |
||
206 | |||
207 | return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset()); |
||
208 | } |
||
209 | |||
210 | // line 27 |
||
211 | public function gethint_link($__hints__ = null, ...$__varargs__) |
||
212 | { |
||
213 | $context = $this->env->mergeGlobals(array( |
||
214 | "hints" => $__hints__, |
||
215 | "varargs" => $__varargs__, |
||
216 | )); |
||
217 | |||
218 | $blocks = array(); |
||
219 | |||
220 | ob_start(); |
||
221 | try { |
||
222 | // line 28 |
||
223 | $context["__internal_aa4457db5f376eaa98f6ab24401bc14cfd42c3bf478e1fca043e6335e8410680"] = $this; |
||
224 | // line 30 |
||
225 | if ((isset($context["hints"]) ? $context["hints"] : $this->getContext($context, "hints"))) { |
||
226 | // line 31 |
||
227 | $context['_parent'] = $context; |
||
228 | $context['_seq'] = twig_ensure_traversable((isset($context["hints"]) ? $context["hints"] : $this->getContext($context, "hints"))); |
||
229 | $context['loop'] = array( |
||
230 | 'parent' => $context['_parent'], |
||
231 | 'index0' => 0, |
||
232 | 'index' => 1, |
||
233 | 'first' => true, |
||
234 | ); |
||
235 | if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof Countable)) { |
||
236 | $length = count($context['_seq']); |
||
237 | $context['loop']['revindex0'] = $length - 1; |
||
238 | $context['loop']['revindex'] = $length; |
||
239 | $context['loop']['length'] = $length; |
||
240 | $context['loop']['last'] = 1 === $length; |
||
241 | } |
||
242 | foreach ($context['_seq'] as $context["_key"] => $context["hint"]) { |
||
243 | // line 32 |
||
244 | if ($this->getAttribute($context["hint"], "class", array())) { |
||
245 | // line 33 |
||
246 | echo $context["__internal_aa4457db5f376eaa98f6ab24401bc14cfd42c3bf478e1fca043e6335e8410680"]->getclass_link($this->getAttribute($context["hint"], "name", array())); |
||
247 | } elseif ($this->getAttribute( // line 34 |
||
248 | $context["hint"], "name", array())) { |
||
249 | // line 35 |
||
250 | echo $this->env->getExtension('sami')->abbrClass($this->getAttribute($context["hint"], "name", array())); |
||
251 | } |
||
252 | // line 37 |
||
253 | if ($this->getAttribute($context["hint"], "array", array())) { |
||
254 | echo "[]"; |
||
255 | } |
||
256 | // line 38 |
||
257 | if ( !$this->getAttribute($context["loop"], "last", array())) { |
||
258 | echo "|"; |
||
259 | } |
||
260 | ++$context['loop']['index0']; |
||
261 | ++$context['loop']['index']; |
||
262 | $context['loop']['first'] = false; |
||
263 | if (isset($context['loop']['length'])) { |
||
264 | --$context['loop']['revindex0']; |
||
265 | --$context['loop']['revindex']; |
||
266 | $context['loop']['last'] = 0 === $context['loop']['revindex0']; |
||
267 | } |
||
268 | } |
||
269 | $_parent = $context['_parent']; |
||
270 | unset($context['_seq'], $context['_iterated'], $context['_key'], $context['hint'], $context['_parent'], $context['loop']); |
||
271 | $context = array_intersect_key($context, $_parent) + $_parent; |
||
272 | } |
||
273 | } catch (Exception $e) { |
||
274 | ob_end_clean(); |
||
275 | |||
276 | throw $e; |
||
277 | } catch (Throwable $e) { |
||
278 | ob_end_clean(); |
||
279 | |||
280 | throw $e; |
||
281 | } |
||
282 | |||
283 | return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset()); |
||
284 | } |
||
285 | |||
286 | // line 43 |
||
287 | public function getsource_link($__project__ = null, $__class__ = null, ...$__varargs__) |
||
288 | { |
||
289 | $context = $this->env->mergeGlobals(array( |
||
290 | "project" => $__project__, |
||
291 | "class" => $__class__, |
||
292 | "varargs" => $__varargs__, |
||
293 | )); |
||
294 | |||
295 | $blocks = array(); |
||
296 | |||
297 | ob_start(); |
||
298 | try { |
||
299 | // line 44 |
||
300 | if ($this->getAttribute((isset($context["class"]) ? $context["class"] : $this->getContext($context, "class")), "sourcepath", array())) { |
||
301 | // line 45 |
||
302 | echo " (<a href=\""; |
||
303 | echo twig_escape_filter($this->env, $this->getAttribute((isset($context["class"]) ? $context["class"] : $this->getContext($context, "class")), "sourcepath", array()), "html", null, true); |
||
304 | echo "\">View source</a>)"; |
||
305 | } |
||
306 | } catch (Exception $e) { |
||
307 | ob_end_clean(); |
||
308 | |||
309 | throw $e; |
||
310 | } catch (Throwable $e) { |
||
311 | ob_end_clean(); |
||
312 | |||
313 | throw $e; |
||
314 | } |
||
315 | |||
316 | return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset()); |
||
317 | } |
||
318 | |||
319 | // line 49 |
||
320 | public function getmethod_source_link($__method__ = null, ...$__varargs__) |
||
321 | { |
||
322 | $context = $this->env->mergeGlobals(array( |
||
323 | "method" => $__method__, |
||
324 | "varargs" => $__varargs__, |
||
325 | )); |
||
326 | |||
327 | $blocks = array(); |
||
328 | |||
329 | ob_start(); |
||
330 | try { |
||
331 | // line 50 |
||
332 | if ($this->getAttribute((isset($context["method"]) ? $context["method"] : $this->getContext($context, "method")), "sourcepath", array())) { |
||
333 | // line 51 |
||
334 | echo " <a href=\""; |
||
335 | echo twig_escape_filter($this->env, $this->getAttribute((isset($context["method"]) ? $context["method"] : $this->getContext($context, "method")), "sourcepath", array()), "html", null, true); |
||
336 | echo "\">line "; |
||
337 | echo $this->getAttribute((isset($context["method"]) ? $context["method"] : $this->getContext($context, "method")), "line", array()); |
||
338 | echo "</a>"; |
||
339 | } else { |
||
340 | // line 53 |
||
341 | echo " line "; |
||
342 | echo $this->getAttribute((isset($context["method"]) ? $context["method"] : $this->getContext($context, "method")), "line", array()); |
||
343 | } |
||
344 | } catch (Exception $e) { |
||
345 | ob_end_clean(); |
||
346 | |||
347 | throw $e; |
||
348 | } catch (Throwable $e) { |
||
349 | ob_end_clean(); |
||
350 | |||
351 | throw $e; |
||
352 | } |
||
353 | |||
354 | return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset()); |
||
355 | } |
||
356 | |||
357 | // line 57 |
||
358 | public function getabbr_class($__class__ = null, $__absolute__ = null, ...$__varargs__) |
||
359 | { |
||
360 | $context = $this->env->mergeGlobals(array( |
||
361 | "class" => $__class__, |
||
362 | "absolute" => $__absolute__, |
||
363 | "varargs" => $__varargs__, |
||
364 | )); |
||
365 | |||
366 | $blocks = array(); |
||
367 | |||
368 | ob_start(); |
||
369 | try { |
||
370 | // line 58 |
||
371 | echo "<abbr title=\""; |
||
372 | echo twig_escape_filter($this->env, (isset($context["class"]) ? $context["class"] : $this->getContext($context, "class")), "html", null, true); |
||
373 | echo "\">"; |
||
374 | echo twig_escape_filter($this->env, ((((array_key_exists("absolute", $context)) ? (_twig_default_filter((isset($context["absolute"]) ? $context["absolute"] : $this->getContext($context, "absolute")), false)) : (false))) ? ((isset($context["class"]) ? $context["class"] : $this->getContext($context, "class"))) : ($this->getAttribute((isset($context["class"]) ? $context["class"] : $this->getContext($context, "class")), "shortname", array()))), "html", null, true); |
||
375 | echo "</abbr>"; |
||
376 | } catch (Exception $e) { |
||
377 | ob_end_clean(); |
||
378 | |||
379 | throw $e; |
||
380 | } catch (Throwable $e) { |
||
381 | ob_end_clean(); |
||
382 | |||
383 | throw $e; |
||
384 | } |
||
385 | |||
386 | return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset()); |
||
387 | } |
||
388 | |||
389 | // line 61 |
||
390 | public function getmethod_parameters_signature($__method__ = null, ...$__varargs__) |
||
391 | { |
||
392 | $context = $this->env->mergeGlobals(array( |
||
393 | "method" => $__method__, |
||
394 | "varargs" => $__varargs__, |
||
395 | )); |
||
396 | |||
397 | $blocks = array(); |
||
398 | |||
399 | ob_start(); |
||
400 | try { |
||
401 | // line 62 |
||
402 | $context["__internal_83cc147ed1eef284176f45c0b5356f56536328767f55591e9f2c2c2ba44520f2"] = $this->loadTemplate("macros.twig", "macros.twig", 62); |
||
403 | // line 63 |
||
404 | echo "("; |
||
405 | // line 64 |
||
406 | $context['_parent'] = $context; |
||
407 | $context['_seq'] = twig_ensure_traversable($this->getAttribute((isset($context["method"]) ? $context["method"] : $this->getContext($context, "method")), "parameters", array())); |
||
408 | $context['loop'] = array( |
||
409 | 'parent' => $context['_parent'], |
||
410 | 'index0' => 0, |
||
411 | 'index' => 1, |
||
412 | 'first' => true, |
||
413 | ); |
||
414 | if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof Countable)) { |
||
415 | $length = count($context['_seq']); |
||
416 | $context['loop']['revindex0'] = $length - 1; |
||
417 | $context['loop']['revindex'] = $length; |
||
418 | $context['loop']['length'] = $length; |
||
419 | $context['loop']['last'] = 1 === $length; |
||
420 | } |
||
421 | foreach ($context['_seq'] as $context["_key"] => $context["parameter"]) { |
||
422 | // line 65 |
||
423 | if ($this->getAttribute($context["parameter"], "hashint", array())) { |
||
424 | echo $context["__internal_83cc147ed1eef284176f45c0b5356f56536328767f55591e9f2c2c2ba44520f2"]->gethint_link($this->getAttribute($context["parameter"], "hint", array())); |
||
425 | echo " "; |
||
426 | } |
||
427 | // line 66 |
||
428 | echo "\$"; |
||
429 | echo $this->getAttribute($context["parameter"], "name", array()); |
||
430 | // line 67 |
||
431 | if ($this->getAttribute($context["parameter"], "default", array())) { |
||
432 | echo " = "; |
||
433 | echo twig_escape_filter($this->env, $this->getAttribute($context["parameter"], "default", array()), "html", null, true); |
||
434 | } |
||
435 | // line 68 |
||
436 | if ( !$this->getAttribute($context["loop"], "last", array())) { |
||
437 | echo ", "; |
||
438 | } |
||
439 | ++$context['loop']['index0']; |
||
440 | ++$context['loop']['index']; |
||
441 | $context['loop']['first'] = false; |
||
442 | if (isset($context['loop']['length'])) { |
||
443 | --$context['loop']['revindex0']; |
||
444 | --$context['loop']['revindex']; |
||
445 | $context['loop']['last'] = 0 === $context['loop']['revindex0']; |
||
446 | } |
||
447 | } |
||
448 | $_parent = $context['_parent']; |
||
449 | unset($context['_seq'], $context['_iterated'], $context['_key'], $context['parameter'], $context['_parent'], $context['loop']); |
||
450 | $context = array_intersect_key($context, $_parent) + $_parent; |
||
451 | // line 70 |
||
452 | echo ")"; |
||
453 | } catch (Exception $e) { |
||
454 | ob_end_clean(); |
||
455 | |||
456 | throw $e; |
||
457 | } catch (Throwable $e) { |
||
458 | ob_end_clean(); |
||
459 | |||
460 | throw $e; |
||
461 | } |
||
462 | |||
463 | return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset()); |
||
464 | } |
||
465 | |||
466 | // line 73 |
||
467 | public function getrender_classes($__classes__ = null, ...$__varargs__) |
||
468 | { |
||
469 | $context = $this->env->mergeGlobals(array( |
||
470 | "classes" => $__classes__, |
||
471 | "varargs" => $__varargs__, |
||
472 | )); |
||
473 | |||
474 | $blocks = array(); |
||
475 | |||
476 | ob_start(); |
||
477 | try { |
||
478 | // line 74 |
||
479 | $context["__internal_105fd4738f4323d4064943fc09ee4778bf76f7e03ae2d7650dfffaaab0be5088"] = $this; |
||
480 | // line 75 |
||
481 | echo " |
||
482 | <div class=\"container-fluid underlined\"> |
||
483 | "; |
||
484 | // line 77 |
||
485 | $context['_parent'] = $context; |
||
486 | $context['_seq'] = twig_ensure_traversable((isset($context["classes"]) ? $context["classes"] : $this->getContext($context, "classes"))); |
||
487 | foreach ($context['_seq'] as $context["_key"] => $context["class"]) { |
||
488 | // line 78 |
||
489 | echo " <div class=\"row\"> |
||
490 | <div class=\"col-md-6\"> |
||
491 | "; |
||
492 | // line 80 |
||
493 | if ($this->getAttribute($context["class"], "isInterface", array())) { |
||
494 | // line 81 |
||
495 | echo " <em>"; |
||
496 | echo $context["__internal_105fd4738f4323d4064943fc09ee4778bf76f7e03ae2d7650dfffaaab0be5088"]->getclass_link($context["class"], true); |
||
497 | echo "</em> |
||
498 | "; |
||
499 | } else { |
||
500 | // line 83 |
||
501 | echo " "; |
||
502 | echo $context["__internal_105fd4738f4323d4064943fc09ee4778bf76f7e03ae2d7650dfffaaab0be5088"]->getclass_link($context["class"], true); |
||
503 | echo " |
||
504 | "; |
||
505 | } |
||
506 | // line 85 |
||
507 | echo " "; |
||
508 | echo $context["__internal_105fd4738f4323d4064943fc09ee4778bf76f7e03ae2d7650dfffaaab0be5088"]->getdeprecated($context["class"]); |
||
509 | echo " |
||
510 | </div> |
||
511 | <div class=\"col-md-6\"> |
||
512 | "; |
||
513 | // line 88 |
||
514 | echo $this->env->getExtension('sami')->parseDesc($context, $this->getAttribute($context["class"], "shortdesc", array()), $context["class"]); |
||
515 | echo " |
||
516 | </div> |
||
517 | </div> |
||
518 | "; |
||
519 | } |
||
520 | $_parent = $context['_parent']; |
||
521 | unset($context['_seq'], $context['_iterated'], $context['_key'], $context['class'], $context['_parent'], $context['loop']); |
||
522 | $context = array_intersect_key($context, $_parent) + $_parent; |
||
523 | // line 92 |
||
524 | echo " </div>"; |
||
525 | } catch (Exception $e) { |
||
526 | ob_end_clean(); |
||
527 | |||
528 | throw $e; |
||
529 | } catch (Throwable $e) { |
||
530 | ob_end_clean(); |
||
531 | |||
532 | throw $e; |
||
533 | } |
||
534 | |||
535 | return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset()); |
||
536 | } |
||
537 | |||
538 | // line 95 |
||
539 | public function getbreadcrumbs($__namespace__ = null, ...$__varargs__) |
||
540 | { |
||
541 | $context = $this->env->mergeGlobals(array( |
||
542 | "namespace" => $__namespace__, |
||
543 | "varargs" => $__varargs__, |
||
544 | )); |
||
545 | |||
546 | $blocks = array(); |
||
547 | |||
548 | ob_start(); |
||
549 | try { |
||
550 | // line 96 |
||
551 | echo " "; |
||
552 | $context["current_ns"] = ""; |
||
553 | // line 97 |
||
554 | echo " "; |
||
555 | $context['_parent'] = $context; |
||
556 | $context['_seq'] = twig_ensure_traversable(twig_split_filter($this->env, (isset($context["namespace"]) ? $context["namespace"] : $this->getContext($context, "namespace")), "\\")); |
||
557 | foreach ($context['_seq'] as $context["_key"] => $context["ns"]) { |
||
558 | // line 98 |
||
559 | echo " "; |
||
560 | if ((isset($context["current_ns"]) ? $context["current_ns"] : $this->getContext($context, "current_ns"))) { |
||
561 | // line 99 |
||
562 | echo " "; |
||
563 | $context["current_ns"] = (((isset($context["current_ns"]) ? $context["current_ns"] : $this->getContext($context, "current_ns")) . "\\") . $context["ns"]); |
||
564 | // line 100 |
||
565 | echo " "; |
||
566 | } else { |
||
567 | // line 101 |
||
568 | echo " "; |
||
569 | $context["current_ns"] = $context["ns"]; |
||
570 | // line 102 |
||
571 | echo " "; |
||
572 | } |
||
573 | // line 103 |
||
574 | echo " <li><a href=\""; |
||
575 | echo $this->env->getExtension('sami')->pathForNamespace($context, (isset($context["current_ns"]) ? $context["current_ns"] : $this->getContext($context, "current_ns"))); |
||
576 | echo "\">"; |
||
577 | echo $context["ns"]; |
||
578 | echo "</a></li> |
||
579 | "; |
||
580 | } |
||
581 | $_parent = $context['_parent']; |
||
582 | unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ns'], $context['_parent'], $context['loop']); |
||
583 | $context = array_intersect_key($context, $_parent) + $_parent; |
||
584 | } catch (Exception $e) { |
||
585 | ob_end_clean(); |
||
586 | |||
587 | throw $e; |
||
588 | } catch (Throwable $e) { |
||
589 | ob_end_clean(); |
||
590 | |||
591 | throw $e; |
||
592 | } |
||
593 | |||
594 | return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset()); |
||
595 | } |
||
596 | |||
597 | // line 107 |
||
598 | public function getdeprecated($__reflection__ = null, ...$__varargs__) |
||
599 | { |
||
600 | $context = $this->env->mergeGlobals(array( |
||
601 | "reflection" => $__reflection__, |
||
602 | "varargs" => $__varargs__, |
||
603 | )); |
||
604 | |||
605 | $blocks = array(); |
||
606 | |||
607 | ob_start(); |
||
608 | try { |
||
609 | // line 108 |
||
610 | echo " "; |
||
611 | if ($this->getAttribute((isset($context["reflection"]) ? $context["reflection"] : $this->getContext($context, "reflection")), "deprecated", array())) { |
||
612 | echo "<small><sup><span class=\"label label-danger\">deprecated</span></sup></small>"; |
||
613 | } |
||
614 | } catch (Exception $e) { |
||
615 | ob_end_clean(); |
||
616 | |||
617 | throw $e; |
||
618 | } catch (Throwable $e) { |
||
619 | ob_end_clean(); |
||
620 | |||
621 | throw $e; |
||
622 | } |
||
623 | |||
624 | return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset()); |
||
625 | } |
||
626 | |||
627 | // line 111 |
||
628 | public function getdeprecations($__reflection__ = null, ...$__varargs__) |
||
629 | { |
||
630 | $context = $this->env->mergeGlobals(array( |
||
631 | "reflection" => $__reflection__, |
||
632 | "varargs" => $__varargs__, |
||
633 | )); |
||
634 | |||
635 | $blocks = array(); |
||
636 | |||
637 | ob_start(); |
||
638 | try { |
||
639 | // line 112 |
||
640 | echo " "; |
||
641 | $context["__internal_f59e0fc423de9b92b8dc90cb9a08c0bea426dd301f085d2553c0a8a9b5a1dfbe"] = $this; |
||
642 | // line 113 |
||
643 | echo " |
||
644 | "; |
||
645 | // line 114 |
||
646 | if ($this->getAttribute((isset($context["reflection"]) ? $context["reflection"] : $this->getContext($context, "reflection")), "deprecated", array())) { |
||
647 | // line 115 |
||
648 | echo " <p> |
||
649 | "; |
||
650 | // line 116 |
||
651 | echo $context["__internal_f59e0fc423de9b92b8dc90cb9a08c0bea426dd301f085d2553c0a8a9b5a1dfbe"]->getdeprecated((isset($context["reflection"]) ? $context["reflection"] : $this->getContext($context, "reflection"))); |
||
652 | echo " |
||
653 | "; |
||
654 | // line 117 |
||
655 | $context['_parent'] = $context; |
||
656 | $context['_seq'] = twig_ensure_traversable($this->getAttribute((isset($context["reflection"]) ? $context["reflection"] : $this->getContext($context, "reflection")), "deprecated", array())); |
||
657 | foreach ($context['_seq'] as $context["_key"] => $context["tag"]) { |
||
658 | // line 118 |
||
659 | echo " <tr> |
||
660 | <td>"; |
||
661 | // line 119 |
||
662 | echo $this->getAttribute($context["tag"], 0, array(), "array"); |
||
663 | echo "</td> |
||
664 | <td>"; |
||
665 | // line 120 |
||
666 | echo twig_join_filter(twig_slice($this->env, $context["tag"], 1, null), " "); |
||
667 | echo "</td> |
||
668 | </tr> |
||
669 | "; |
||
670 | } |
||
671 | $_parent = $context['_parent']; |
||
672 | unset($context['_seq'], $context['_iterated'], $context['_key'], $context['tag'], $context['_parent'], $context['loop']); |
||
673 | $context = array_intersect_key($context, $_parent) + $_parent; |
||
674 | // line 123 |
||
675 | echo " </p> |
||
676 | "; |
||
677 | } |
||
678 | } catch (Exception $e) { |
||
679 | ob_end_clean(); |
||
680 | |||
681 | throw $e; |
||
682 | } catch (Throwable $e) { |
||
683 | ob_end_clean(); |
||
684 | |||
685 | throw $e; |
||
686 | } |
||
687 | |||
688 | return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset()); |
||
689 | } |
||
690 | |||
691 | public function getTemplateName() |
||
692 | { |
||
693 | return "macros.twig"; |
||
694 | } |
||
695 | |||
696 | public function isTraitable() |
||
697 | { |
||
698 | return false; |
||
699 | } |
||
700 | |||
701 | public function getDebugInfo() |
||
702 | { |
||
703 | return array ( 675 => 123, 666 => 120, 662 => 119, 659 => 118, 655 => 117, 651 => 116, 648 => 115, 646 => 114, 643 => 113, 640 => 112, 628 => 111, 610 => 108, 598 => 107, 574 => 103, 571 => 102, 568 => 101, 565 => 100, 562 => 99, 559 => 98, 554 => 97, 551 => 96, 539 => 95, 524 => 92, 514 => 88, 507 => 85, 501 => 83, 495 => 81, 493 => 80, 489 => 78, 485 => 77, 481 => 75, 479 => 74, 467 => 73, 452 => 70, 436 => 68, 431 => 67, 428 => 66, 423 => 65, 406 => 64, 404 => 63, 402 => 62, 390 => 61, 371 => 58, 358 => 57, 341 => 53, 334 => 51, 332 => 50, 320 => 49, 302 => 45, 300 => 44, 287 => 43, 257 => 38, 253 => 37, 250 => 35, 248 => 34, 246 => 33, 244 => 32, 227 => 31, 225 => 30, 223 => 28, 211 => 27, 196 => 24, 190 => 23, 186 => 22, 172 => 21, 157 => 18, 151 => 17, 147 => 16, 133 => 15, 116 => 12, 114 => 11, 109 => 9, 107 => 8, 103 => 7, 101 => 6, 88 => 5, 69 => 2, 57 => 1, 52 => 110, 49 => 106, 46 => 94, 43 => 72, 40 => 60, 37 => 56, 34 => 48, 31 => 42, 28 => 26, 25 => 20, 22 => 14, 19 => 4,); |
||
704 | } |
||
705 | } |
||
706 | /* {% macro namespace_link(namespace) -%}*/ |
||
832 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.