1 | <?php |
||
20 | final class NewClassSniff implements PHP_CodeSniffer_Sniff |
||
21 | { |
||
22 | |||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | const NAME = 'ZenifyCodingStandard.ControlStructures.NewClass'; |
||
27 | |||
28 | /** |
||
29 | * @var PHP_CodeSniffer_File |
||
30 | */ |
||
31 | private $file; |
||
32 | |||
33 | /** |
||
34 | * @var int |
||
35 | */ |
||
36 | private $position; |
||
37 | |||
38 | /** |
||
39 | * @var int |
||
40 | */ |
||
41 | private $openParenthesisPosition; |
||
42 | |||
43 | |||
44 | /** |
||
45 | * @return int[] |
||
46 | */ |
||
47 | 2 | public function register() : array |
|
51 | |||
52 | |||
53 | /** |
||
54 | * @param PHP_CodeSniffer_File $file |
||
55 | * @param int $position |
||
56 | */ |
||
57 | 2 | public function process(PHP_CodeSniffer_File $file, $position) |
|
71 | |||
72 | |||
73 | 2 | private function hasEmptyParentheses() : bool |
|
91 | |||
92 | |||
93 | 2 | private function doesContentContains(string $content, array $chars) : bool |
|
102 | |||
103 | |||
104 | 1 | private function removeParenthesesFromClassStatement(int $position) |
|
109 | |||
110 | } |
||
111 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.