1 | <?php |
||
16 | class SeoExtension extends \Twig_Extension |
||
17 | { |
||
18 | /** |
||
19 | * @var SeoPageInterface |
||
20 | */ |
||
21 | protected $page; |
||
22 | |||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | protected $encoding; |
||
27 | |||
28 | /** |
||
29 | * @param SeoPageInterface $page |
||
30 | * @param string $encoding |
||
31 | */ |
||
32 | public function __construct(SeoPageInterface $page, $encoding) |
||
37 | |||
38 | /** |
||
39 | * {@inheritdoc} |
||
40 | */ |
||
41 | public function getFunctions() |
||
54 | |||
55 | /** |
||
56 | * {@inheritdoc} |
||
57 | */ |
||
58 | public function getName() |
||
62 | |||
63 | /** |
||
64 | * @deprecated Deprecated as of 1.2, echo the return value of getTitle() instead. |
||
65 | */ |
||
66 | public function renderTitle() |
||
70 | |||
71 | /** |
||
72 | * @return string |
||
73 | */ |
||
74 | public function getTitle() |
||
78 | |||
79 | /** |
||
80 | * @deprecated Deprecated as of 1.2, echo the return value of getMetadatas() instead. |
||
81 | */ |
||
82 | public function renderMetadatas() |
||
86 | |||
87 | /** |
||
88 | * @return string |
||
89 | */ |
||
90 | public function getMetadatas() |
||
114 | |||
115 | /** |
||
116 | * @deprecated Deprecated as of 1.2, echo the return value of getHtmlAttributes() instead. |
||
117 | */ |
||
118 | public function renderHtmlAttributes() |
||
122 | |||
123 | /** |
||
124 | * @return string |
||
125 | */ |
||
126 | public function getHtmlAttributes() |
||
135 | |||
136 | /** |
||
137 | * @deprecated Deprecated as of 1.2, echo the return value of getHeadAttributes() instead. |
||
138 | */ |
||
139 | public function renderHeadAttributes() |
||
143 | |||
144 | /** |
||
145 | * @return string |
||
146 | */ |
||
147 | public function getHeadAttributes() |
||
156 | |||
157 | /** |
||
158 | * @deprecated Deprecated as of 1.2, echo the return value of getLinkCanonical() instead. |
||
159 | */ |
||
160 | public function renderLinkCanonical() |
||
164 | |||
165 | /** |
||
166 | * @return string |
||
167 | */ |
||
168 | public function getLinkCanonical() |
||
174 | |||
175 | /** |
||
176 | * Return links HTML tags. |
||
177 | * |
||
178 | * @return string |
||
179 | */ |
||
180 | public function getLinks() |
||
203 | |||
204 | /** |
||
205 | * @deprecated Deprecated as of 1.2, echo the return value of getLangAlternates() instead. |
||
206 | */ |
||
207 | public function renderLangAlternates() |
||
211 | |||
212 | /** |
||
213 | * @return string |
||
214 | */ |
||
215 | public function getLangAlternates() |
||
224 | |||
225 | /** |
||
226 | * @return string |
||
227 | */ |
||
228 | public function getOembedLinks() |
||
237 | |||
238 | /** |
||
239 | * @param string $string |
||
240 | * |
||
241 | * @return mixed |
||
242 | */ |
||
243 | private function normalize($string) |
||
247 | } |
||
248 |
This checks looks for assignemnts to variables using the
list(...)
function, where not all assigned variables are subsequently used.Consider the following code example.
Only the variables
$a
and$c
are used. There was no need to assign$b
.Instead, the list call could have been.