@@ -57,39 +57,6 @@ class ProperEscapingFunctionSniff extends Sniff {
5757 T_NS_SEPARATOR => T_NS_SEPARATOR ,
5858 ];
5959
60- /**
61- * List of attributes associated with url outputs.
62- *
63- * @deprecated 2.3.1 Currently unused by the sniff, but needed for
64- * for public methods which extending sniffs may be
65- * relying on.
66- *
67- * @var array<string>
68- */
69- private $ url_attrs = [
70- 'href ' ,
71- 'src ' ,
72- 'url ' ,
73- 'action ' ,
74- ];
75-
76- /**
77- * List of syntaxes for inside attribute detection.
78- *
79- * @deprecated 2.3.1 Currently unused by the sniff, but needed for
80- * for public methods which extending sniffs may be
81- * relying on.
82- *
83- * @var array<string>
84- */
85- private $ attr_endings = [
86- '= ' ,
87- '=" ' ,
88- "=' " ,
89- "= \\' " ,
90- '= \\" ' ,
91- ];
92-
9360 /**
9461 * Keep track of whether or not we're currently in the first statement of a short open echo tag.
9562 *
@@ -224,48 +191,6 @@ public function process_token( $stackPtr ) {
224191 }
225192 }
226193
227- /**
228- * Tests whether provided string ends with open attribute which expects a URL value.
229- *
230- * @deprecated 2.3.1
231- *
232- * @param string $content Haystack in which we look for an open attribute which exects a URL value.
233- *
234- * @return bool True if string ends with open attribute which expects a URL value.
235- */
236- public function attr_expects_url ( $ content ) {
237- $ attr_expects_url = false ;
238- foreach ( $ this ->url_attrs as $ attr ) {
239- foreach ( $ this ->attr_endings as $ ending ) {
240- if ( $ this ->endswith ( $ content , $ attr . $ ending ) === true ) {
241- $ attr_expects_url = true ;
242- break ;
243- }
244- }
245- }
246- return $ attr_expects_url ;
247- }
248-
249- /**
250- * Tests whether provided string ends with open HMTL attribute.
251- *
252- * @deprecated 2.3.1
253- *
254- * @param string $content Haystack in which we look for open HTML attribute.
255- *
256- * @return bool True if string ends with open HTML attribute.
257- */
258- public function is_html_attr ( $ content ) {
259- $ is_html_attr = false ;
260- foreach ( $ this ->attr_endings as $ ending ) {
261- if ( $ this ->endswith ( $ content , $ ending ) === true ) {
262- $ is_html_attr = true ;
263- break ;
264- }
265- }
266- return $ is_html_attr ;
267- }
268-
269194 /**
270195 * Tests whether an attribute escaping function is being used outside of an HTML tag.
271196 *
0 commit comments