1 | <?php |
||
12 | abstract class EnrichmentFilters |
||
13 | { |
||
14 | /** |
||
15 | * Generates a UUID v4 as a Message Id |
||
16 | * |
||
17 | * @see https://gist.github.com/dahnielson/508447#file-uuid-php-L74 |
||
18 | * |
||
19 | * @return string |
||
20 | */ |
||
21 | public static function generateMessageId() |
||
43 | |||
44 | /** |
||
45 | * Generates an ISO 8601 datetime string |
||
46 | * |
||
47 | * @param integer $timestamp Time the Event Occurred (Optional) |
||
48 | * |
||
49 | * @return string |
||
50 | */ |
||
51 | public static function generateISODate($timestamp = null) |
||
59 | |||
60 | /** |
||
61 | * Adds MessageIds and ISO 8601 formatted datetime strings to all batched operations |
||
62 | * |
||
63 | * @param array $operations The Batch of operations |
||
64 | * |
||
65 | * @return array |
||
66 | */ |
||
67 | public static function enrichBatchOperations(array $operations = []) |
||
80 | |||
81 | /** |
||
82 | * Get the Default Context properties |
||
83 | * |
||
84 | * @param array $context |
||
85 | * |
||
86 | * @return array |
||
87 | */ |
||
88 | public static function generateDefaultContext(array $context = []) |
||
97 | } |
||
98 |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.