1 | <?php |
||
37 | class OutputUtility implements \TYPO3\CMS\Core\SingletonInterface |
||
38 | { |
||
39 | /** |
||
40 | * output |
||
41 | * |
||
42 | * @var ConsoleOutput $output |
||
43 | */ |
||
44 | protected $output; |
||
45 | |||
46 | /** |
||
47 | * OutputUtility constructor. |
||
48 | */ |
||
49 | public function __construct() |
||
53 | |||
54 | /** |
||
55 | * log |
||
56 | * |
||
57 | * @param string $message |
||
58 | */ |
||
59 | public function log($message) |
||
63 | |||
64 | /** |
||
65 | * @param string $message |
||
66 | */ |
||
67 | public function error($message) |
||
71 | |||
72 | /** |
||
73 | * @param string $message |
||
74 | */ |
||
75 | public function warning($message) |
||
79 | |||
80 | /** |
||
81 | * @param string $message |
||
82 | */ |
||
83 | public function success($message) |
||
87 | |||
88 | /** |
||
89 | * @param string $message |
||
90 | */ |
||
91 | public function info($message) |
||
95 | |||
96 | /** |
||
97 | * @param $question |
||
98 | * @param null $default |
||
99 | * @param array|null $autocomplete |
||
100 | * @return string |
||
101 | */ |
||
102 | public function ask($question, $default = null, array $autocomplete = null) |
||
106 | |||
107 | /** |
||
108 | * @param $question |
||
109 | * @param $choices |
||
110 | * @param null $default |
||
111 | * @param bool $multiSelect |
||
112 | * @param bool $attempts |
||
113 | * @return array|int|string |
||
114 | */ |
||
115 | public function select($question, $choices, $default = null, $multiSelect = false, $attempts = false) |
||
119 | |||
120 | /** |
||
121 | * @param null $max |
||
122 | * @return void |
||
123 | */ |
||
124 | public function progressStart($max = null) |
||
128 | |||
129 | /** |
||
130 | * @param int $step |
||
131 | * @param bool $redraw |
||
132 | * @return void |
||
133 | */ |
||
134 | public function progressAdvance($step = 1, $redraw = false) |
||
138 | |||
139 | /** |
||
140 | * @param $current |
||
141 | * @param bool $redraw |
||
142 | * @return void |
||
143 | */ |
||
144 | public function progressSet($current, $redraw = false) |
||
148 | |||
149 | /** |
||
150 | * @return void |
||
151 | */ |
||
152 | public function progressFinish() |
||
156 | } |
||
157 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.
In this case you can add the
@ignore
PhpDoc annotation to the duplicate definition and it will be ignored.