1 | <?php |
||
7 | abstract class Report |
||
8 | { |
||
9 | const TYPE_COMPACT = 'compact'; |
||
10 | const TYPE_CONSOLE = 'console'; |
||
11 | const TYPE_PYLINT = 'pylint'; |
||
12 | const TYPE_JSON = 'json'; |
||
13 | const TYPE_JSON_SUMMARY = 'json-summary'; |
||
14 | const TYPE_SONARQUBE = 'sonarqube'; |
||
15 | const TYPE_EMACS = 'emacs'; |
||
16 | const TYPE_XML = 'xml'; |
||
17 | const TYPE_JUNIT = 'junit'; |
||
18 | const TYPE_CHECKSTYLE = 'checkstyle'; |
||
19 | const TYPE_TEXT = 'text'; |
||
20 | const TYPE_GITHUB_ACTIONS = 'github'; |
||
21 | |||
22 | const SUPPORTED_OUTPUT_TYPES = [ |
||
23 | self::TYPE_COMPACT, |
||
24 | self::TYPE_CONSOLE, |
||
25 | self::TYPE_PYLINT, |
||
26 | self::TYPE_JSON, |
||
27 | self::TYPE_JSON_SUMMARY, |
||
28 | self::TYPE_SONARQUBE, |
||
29 | self::TYPE_EMACS, |
||
30 | self::TYPE_XML, |
||
31 | self::TYPE_JUNIT, |
||
32 | self::TYPE_CHECKSTYLE, |
||
33 | self::TYPE_TEXT, |
||
34 | self::TYPE_GITHUB_ACTIONS, |
||
35 | ]; |
||
36 | |||
37 | /** |
||
38 | * @var array<int, IssueData> |
||
39 | */ |
||
40 | protected $issues_data; |
||
41 | |||
42 | /** @var array<string, int> */ |
||
43 | protected $fixable_issue_counts; |
||
44 | |||
45 | /** @var bool */ |
||
46 | protected $use_color; |
||
47 | |||
48 | /** @var bool */ |
||
49 | protected $show_snippet; |
||
50 | |||
51 | /** @var bool */ |
||
52 | protected $show_info; |
||
53 | |||
54 | /** @var bool */ |
||
55 | protected $pretty; |
||
56 | |||
57 | /** @var int */ |
||
58 | protected $mixed_expression_count; |
||
59 | |||
60 | /** @var int */ |
||
61 | protected $total_expression_count; |
||
62 | |||
63 | /** |
||
64 | * @param array<int, IssueData> $issues_data |
||
65 | * @param array<string, int> $fixable_issue_counts |
||
66 | * @param bool $use_color |
||
|
|||
67 | * @param bool $show_snippet |
||
68 | * @param bool $show_info |
||
69 | */ |
||
70 | public function __construct( |
||
97 | |||
98 | /** |
||
99 | * @return string |
||
100 | */ |
||
101 | abstract public function create(): string; |
||
102 | } |
||
103 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.