1 | <?php |
||
18 | class Jetpack_Sitemap_Logger { |
||
19 | /** |
||
20 | * A unique-ish string for each logger, enabling us to grep |
||
21 | * for the messages written by an individual generation phase. |
||
22 | * |
||
23 | * @access private |
||
24 | * @since 4.7.0 |
||
25 | * @var string $key The key string. |
||
26 | */ |
||
27 | private $key; |
||
28 | |||
29 | /** |
||
30 | * The birth time of this object in microseconds. |
||
31 | * |
||
32 | * @access private |
||
33 | * @since 4.7.0 |
||
34 | * @var int $starttime The birth time. |
||
35 | */ |
||
36 | private $starttime; |
||
37 | |||
38 | /** |
||
39 | * Initializes a new logger object. |
||
40 | * |
||
41 | * @access public |
||
42 | * @since 4.7.0 |
||
43 | * |
||
44 | * @param string $message An optional message string to be written to the debug log on initialization. |
||
|
|||
45 | */ |
||
46 | public function __construct( $message = null ) { |
||
54 | |||
55 | /** |
||
56 | * Writes a string to the debug log, including the logger's ID string. |
||
57 | * |
||
58 | * @access public |
||
59 | * @since 4.7.0 |
||
60 | * |
||
61 | * @param string $message The string to be written to the log. |
||
62 | */ |
||
63 | public function report( $message ) { |
||
69 | |||
70 | /** |
||
71 | * Writes the elapsed lifetime of the logger to the debug log, with an optional message. |
||
72 | * |
||
73 | * @access public |
||
74 | * @since 4.7.0 |
||
75 | * |
||
76 | * @param string $message The optional message string. Default is the empty string. |
||
77 | */ |
||
78 | public function time( $message = '' ) { |
||
83 | } |
||
84 |
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.