File tree Expand file tree Collapse file tree 18 files changed +130
-69
lines changed Expand file tree Collapse file tree 18 files changed +130
-69
lines changed Original file line number Diff line number Diff line change @@ -329,7 +329,29 @@ public function cacheFileReport(File $phpcsFile)
329
329
*
330
330
* @param \PHP_CodeSniffer\Files\File $phpcsFile The file that has been processed.
331
331
*
332
- * @return array
332
+ * @return array<string, string|int|array> Prepared report data.
333
+ * The format of prepared data is as follows:
334
+ * ```
335
+ * array(
336
+ * 'filename' => string The name of the current file.
337
+ * 'errors' => int The number of errors seen in the current file.
338
+ * 'warnings' => int The number of warnings seen in the current file.
339
+ * 'fixable' => int The number of fixable issues seen in the current file.
340
+ * 'messages' => array(
341
+ * int <Line number> => array(
342
+ * int <Column number> => array(
343
+ * int <Message index> => array(
344
+ * 'message' => string The error/warning message.
345
+ * 'source' => string The full error code for the message.
346
+ * 'severity' => int The severity of the message.
347
+ * 'fixable' => bool Whether this error/warning is auto-fixable.
348
+ * 'type' => string The type of message. Either 'ERROR' or 'WARNING'.
349
+ * )
350
+ * )
351
+ * )
352
+ * )
353
+ * )
354
+ * ```
333
355
*/
334
356
public function prepareFileReport (File $ phpcsFile )
335
357
{
Original file line number Diff line number Diff line change @@ -28,10 +28,11 @@ class Cbf implements Report
28
28
* and FALSE if it ignored the file. Returning TRUE indicates that the file and
29
29
* its data should be counted in the grand totals.
30
30
*
31
- * @param array $report Prepared report data.
32
- * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on.
33
- * @param bool $showSources Show sources?
34
- * @param int $width Maximum allowed line width.
31
+ * @param array<string, string|int|array> $report Prepared report data.
32
+ * See the {@see Report} interface for a detailed specification.
33
+ * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on.
34
+ * @param bool $showSources Show sources?
35
+ * @param int $width Maximum allowed line width.
35
36
*
36
37
* @return bool
37
38
* @throws \PHP_CodeSniffer\Exceptions\DeepExitException
Original file line number Diff line number Diff line change @@ -24,10 +24,11 @@ class Checkstyle implements Report
24
24
* and FALSE if it ignored the file. Returning TRUE indicates that the file and
25
25
* its data should be counted in the grand totals.
26
26
*
27
- * @param array $report Prepared report data.
28
- * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on.
29
- * @param bool $showSources Show sources?
30
- * @param int $width Maximum allowed line width.
27
+ * @param array<string, string|int|array> $report Prepared report data.
28
+ * See the {@see Report} interface for a detailed specification.
29
+ * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on.
30
+ * @param bool $showSources Show sources?
31
+ * @param int $width Maximum allowed line width.
31
32
*
32
33
* @return bool
33
34
*/
Original file line number Diff line number Diff line change @@ -25,10 +25,11 @@ class Code implements Report
25
25
* and FALSE if it ignored the file. Returning TRUE indicates that the file and
26
26
* its data should be counted in the grand totals.
27
27
*
28
- * @param array $report Prepared report data.
29
- * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on.
30
- * @param bool $showSources Show sources?
31
- * @param int $width Maximum allowed line width.
28
+ * @param array<string, string|int|array> $report Prepared report data.
29
+ * See the {@see Report} interface for a detailed specification.
30
+ * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on.
31
+ * @param bool $showSources Show sources?
32
+ * @param int $width Maximum allowed line width.
32
33
*
33
34
* @return bool
34
35
*/
Original file line number Diff line number Diff line change @@ -22,10 +22,11 @@ class Csv implements Report
22
22
* and FALSE if it ignored the file. Returning TRUE indicates that the file and
23
23
* its data should be counted in the grand totals.
24
24
*
25
- * @param array $report Prepared report data.
26
- * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on.
27
- * @param bool $showSources Show sources?
28
- * @param int $width Maximum allowed line width.
25
+ * @param array<string, string|int|array> $report Prepared report data.
26
+ * See the {@see Report} interface for a detailed specification.
27
+ * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on.
28
+ * @param bool $showSources Show sources?
29
+ * @param int $width Maximum allowed line width.
29
30
*
30
31
* @return bool
31
32
*/
Original file line number Diff line number Diff line change @@ -22,10 +22,11 @@ class Diff implements Report
22
22
* and FALSE if it ignored the file. Returning TRUE indicates that the file and
23
23
* its data should be counted in the grand totals.
24
24
*
25
- * @param array $report Prepared report data.
26
- * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on.
27
- * @param bool $showSources Show sources?
28
- * @param int $width Maximum allowed line width.
25
+ * @param array<string, string|int|array> $report Prepared report data.
26
+ * See the {@see Report} interface for a detailed specification.
27
+ * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on.
28
+ * @param bool $showSources Show sources?
29
+ * @param int $width Maximum allowed line width.
29
30
*
30
31
* @return bool
31
32
*/
Original file line number Diff line number Diff line change @@ -22,10 +22,11 @@ class Emacs implements Report
22
22
* and FALSE if it ignored the file. Returning TRUE indicates that the file and
23
23
* its data should be counted in the grand totals.
24
24
*
25
- * @param array $report Prepared report data.
26
- * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on.
27
- * @param bool $showSources Show sources?
28
- * @param int $width Maximum allowed line width.
25
+ * @param array<string, string|int|array> $report Prepared report data.
26
+ * See the {@see Report} interface for a detailed specification.
27
+ * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on.
28
+ * @param bool $showSources Show sources?
29
+ * @param int $width Maximum allowed line width.
29
30
*
30
31
* @return bool
31
32
*/
Original file line number Diff line number Diff line change @@ -23,10 +23,11 @@ class Full implements Report
23
23
* and FALSE if it ignored the file. Returning TRUE indicates that the file and
24
24
* its data should be counted in the grand totals.
25
25
*
26
- * @param array $report Prepared report data.
27
- * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on.
28
- * @param bool $showSources Show sources?
29
- * @param int $width Maximum allowed line width.
26
+ * @param array<string, string|int|array> $report Prepared report data.
27
+ * See the {@see Report} interface for a detailed specification.
28
+ * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on.
29
+ * @param bool $showSources Show sources?
30
+ * @param int $width Maximum allowed line width.
30
31
*
31
32
* @return bool
32
33
*/
Original file line number Diff line number Diff line change @@ -23,10 +23,11 @@ class Info implements Report
23
23
* and FALSE if it ignored the file. Returning TRUE indicates that the file and
24
24
* its data should be counted in the grand totals.
25
25
*
26
- * @param array $report Prepared report data.
27
- * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on.
28
- * @param bool $showSources Show sources?
29
- * @param int $width Maximum allowed line width.
26
+ * @param array<string, string|int|array> $report Prepared report data.
27
+ * See the {@see Report} interface for a detailed specification.
28
+ * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on.
29
+ * @param bool $showSources Show sources?
30
+ * @param int $width Maximum allowed line width.
30
31
*
31
32
* @return bool
32
33
*/
Original file line number Diff line number Diff line change @@ -23,10 +23,11 @@ class Json implements Report
23
23
* and FALSE if it ignored the file. Returning TRUE indicates that the file and
24
24
* its data should be counted in the grand totals.
25
25
*
26
- * @param array $report Prepared report data.
27
- * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on.
28
- * @param bool $showSources Show sources?
29
- * @param int $width Maximum allowed line width.
26
+ * @param array<string, string|int|array> $report Prepared report data.
27
+ * See the {@see Report} interface for a detailed specification.
28
+ * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on.
29
+ * @param bool $showSources Show sources?
30
+ * @param int $width Maximum allowed line width.
30
31
*
31
32
* @return bool
32
33
*/
You can’t perform that action at this time.
0 commit comments