These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace League\CLImate\Util; |
||
4 | |||
5 | class Cursor |
||
6 | { |
||
7 | /** |
||
8 | * Move the cursor up in the terminal x number of lines. |
||
9 | * |
||
10 | * @param int $lines |
||
11 | * |
||
12 | * @return string |
||
13 | */ |
||
14 | 120 | public function up($lines = 1) |
|
15 | { |
||
16 | 120 | return "\e[{$lines}A"; |
|
17 | } |
||
18 | |||
19 | /** |
||
20 | * Move the cursor down in the terminal x number of lines. |
||
21 | * |
||
22 | * @param int $lines |
||
23 | * |
||
24 | * @return string |
||
25 | */ |
||
26 | 16 | public function down($lines = 1) |
|
27 | { |
||
28 | 16 | return "\e[{$lines}B"; |
|
29 | } |
||
30 | |||
31 | /** |
||
32 | * Move the cursor right in the terminal x number of columns. |
||
33 | * |
||
34 | * @param int $cols |
||
0 ignored issues
–
show
|
|||
35 | * |
||
36 | 120 | * @return string |
|
37 | */ |
||
38 | 120 | public function right($columns = 1) |
|
39 | { |
||
40 | return "\e[{$columns}C"; |
||
41 | } |
||
42 | |||
43 | /** |
||
44 | * Move the cursor left in the terminal x number of columns. |
||
45 | * |
||
46 | 104 | * @param int $cols |
|
47 | * |
||
48 | 104 | * @return string |
|
49 | */ |
||
50 | public function left($cols = 1) |
||
51 | { |
||
52 | return "\e[{$cols}D"; |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | 16 | * Move cursor to the beginning of the current line. |
|
57 | * |
||
58 | 16 | * @return string |
|
59 | */ |
||
60 | public function startOfCurrentLine() |
||
61 | { |
||
62 | return "\r"; |
||
63 | } |
||
64 | |||
65 | /** |
||
66 | 16 | * Delete the current line to the end. |
|
67 | * |
||
68 | 16 | * @return string |
|
69 | */ |
||
70 | public function deleteCurrentLine() |
||
71 | { |
||
72 | return "\e[K"; |
||
73 | } |
||
74 | |||
75 | /** |
||
76 | * Get the style for hiding the cursor |
||
77 | * |
||
78 | * @return string |
||
79 | */ |
||
80 | public function hide() |
||
81 | { |
||
82 | return "\e[?25l"; |
||
83 | } |
||
84 | |||
85 | /** |
||
86 | * Get the style for returning the cursor to its default |
||
87 | * |
||
88 | * @return string |
||
89 | */ |
||
90 | public function defaultStyle() |
||
91 | { |
||
92 | return "\e[?25h"; |
||
93 | } |
||
94 | } |
||
95 |
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.