1 | <?php |
||
11 | class BulkLoader_Result extends SS_BulkLoader_Result |
||
12 | { |
||
13 | |||
14 | /** |
||
15 | * List of errors tracked, each error should be an error message |
||
16 | * (as a string). |
||
17 | * |
||
18 | * @var array (see {@link $created}) |
||
19 | */ |
||
20 | protected $errors = []; |
||
21 | |||
22 | /** |
||
23 | * Return the number of errors |
||
24 | * |
||
25 | * @return int |
||
26 | */ |
||
27 | public function ErrorCount() |
||
31 | |||
32 | /** |
||
33 | * Add an error message to the stack |
||
34 | * |
||
35 | * @param string $message The error message |
||
36 | * |
||
37 | * @return self |
||
38 | */ |
||
39 | public function addError($message, $id = null) |
||
51 | |||
52 | /** |
||
53 | * Merges another BulkLoader_Result into this one. |
||
54 | * |
||
55 | * @param BulkLoader_Result $other |
||
|
|||
56 | */ |
||
57 | public function merge(SS_BulkLoader_Result $other) |
||
64 | |||
65 | /** |
||
66 | * Get he total number of results tracked |
||
67 | * |
||
68 | * @return int |
||
69 | */ |
||
70 | public function getTotal() |
||
74 | |||
75 | /** |
||
76 | * Get created array |
||
77 | * |
||
78 | * @return array |
||
79 | */ |
||
80 | public function getCreated() |
||
84 | |||
85 | /** |
||
86 | * Get updated array |
||
87 | * |
||
88 | * @return array |
||
89 | */ |
||
90 | public function getUpdated() |
||
94 | |||
95 | /** |
||
96 | * Get updated array |
||
97 | * |
||
98 | * @return array |
||
99 | */ |
||
100 | public function getDeleted() |
||
104 | |||
105 | /** |
||
106 | * Get errors array |
||
107 | * |
||
108 | * @return array |
||
109 | */ |
||
110 | public function getErrors() |
||
114 | |||
115 | /** |
||
116 | * Get an array of all messages stored |
||
117 | * |
||
118 | * @return array |
||
119 | */ |
||
120 | public function getMessagesArray() |
||
151 | |||
152 | /** |
||
153 | * Return a string of all messages (that can be rendered into a message window) |
||
154 | * |
||
155 | * @param bool $html Add the newline as a HTML "<br/>" |
||
156 | * |
||
157 | * @return string |
||
158 | */ |
||
159 | public function getMessagesString($delimiter = ";") |
||
163 | |||
164 | /** |
||
165 | * Get the "type" of message (using SilverStripe's Validation result) |
||
166 | * |
||
167 | * @return string |
||
168 | */ |
||
169 | public function getMessageType() |
||
179 | } |
||
180 |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.