1 | <?php |
||
7 | class TrelloMessage |
||
8 | { |
||
9 | /** @var string */ |
||
10 | protected $name; |
||
11 | |||
12 | /** @var string */ |
||
13 | protected $description; |
||
14 | |||
15 | /** @var string|int */ |
||
16 | protected $position; |
||
17 | |||
18 | /** @var string|null */ |
||
19 | protected $due; |
||
20 | |||
21 | /** @var array|null */ |
||
22 | protected $comments; |
||
23 | |||
24 | /** |
||
25 | * @param string $name |
||
26 | * |
||
27 | * @return static |
||
28 | */ |
||
29 | public static function create($name = '') |
||
33 | |||
34 | /** |
||
35 | * @param string $name |
||
36 | */ |
||
37 | public function __construct($name = '') |
||
41 | |||
42 | /** |
||
43 | * Set the card name. |
||
44 | * |
||
45 | * @param $name |
||
46 | * |
||
47 | * @return $this |
||
48 | */ |
||
49 | public function name($name) |
||
55 | |||
56 | /** |
||
57 | * Set the card description. |
||
58 | * |
||
59 | * @param $description |
||
60 | * |
||
61 | * @return $this |
||
62 | */ |
||
63 | public function description($description) |
||
69 | |||
70 | /** |
||
71 | * Set the card position. |
||
72 | * |
||
73 | * @param string|int $position |
||
74 | * |
||
75 | * @return $this |
||
76 | */ |
||
77 | public function position($position) |
||
83 | |||
84 | /** |
||
85 | * Set the card position to 'top'. |
||
86 | * |
||
87 | * @return $this |
||
88 | */ |
||
89 | public function top() |
||
95 | |||
96 | /** |
||
97 | * Set the card position to 'bottom'. |
||
98 | * |
||
99 | * @return $this |
||
100 | */ |
||
101 | public function bottom() |
||
107 | |||
108 | /** |
||
109 | * Set the card position due date. |
||
110 | * |
||
111 | * @param string|DateTime $due |
||
112 | * |
||
113 | * @return $this |
||
114 | */ |
||
115 | public function due($due) |
||
125 | |||
126 | /** |
||
127 | * Set the cards comments from array or string |
||
128 | * |
||
129 | * @param array|string $comments |
||
130 | * |
||
131 | * @return $this |
||
132 | */ |
||
133 | public function comments($comments) |
||
143 | |||
144 | /** |
||
145 | * Add a comment to the card |
||
146 | * |
||
147 | * @param array $comments |
||
|
|||
148 | * |
||
149 | * @return $this |
||
150 | */ |
||
151 | public function comment($comment) |
||
157 | |||
158 | /** |
||
159 | * Get comments to add to the card |
||
160 | * |
||
161 | * @return array|null |
||
162 | */ |
||
163 | public function getComments() |
||
167 | |||
168 | /** |
||
169 | * @return array |
||
170 | */ |
||
171 | public function toArray() |
||
180 | } |
||
181 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$ireland
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was changed, but the annotation was not.