Skip to content

Commit 90e9e4b

Browse files
committed
NOTES DeclarationCompatibilitySniff
1 parent 1675f50 commit 90e9e4b

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

WordPressVIPMinimum/Sniffs/Classes/DeclarationCompatibilitySniff.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,25 @@
1919
*/
2020
class DeclarationCompatibilitySniff implements Sniff {
2121

22+
/*
23+
FUTURE SCOPE (if the sniff does not get removed):
24+
25+
1. Add check for correct method visibility
26+
2. Add check that methods do not return by reference
27+
3. Add check for matching parameter names (context: PHP 8.0 named parameter use, exception: methods with variadic as named params is not an option)
28+
4. Add check for no param types (or type mixed - compatible see https://3v4l.org/BWol3#veol )
29+
5. Add check for either no return type or return type which is co-variant
30+
6. Add checks that deprecated methods + methods which are marked to NOT overload, are not declared
31+
- WP_Widget::WP_Widget() (deprecated PHP 4 constructor)
32+
- WP_Widget::display_callback() (Do NOT override)
33+
- WP_Widget::update_callback() (Do NOT override)
34+
35+
For VIPCS 4.0:
36+
- Remove deprecated sniff class properties
37+
38+
*/
39+
40+
2241
/**
2342
* A list of classes and methods to check.
2443
*

0 commit comments

Comments
 (0)