@@ -57,20 +57,26 @@ final class Cache
5757 *
5858 * Don't forget to always turn the cache back on in a `tear_down()` method!
5959 *
60+ * @since 1.0.0
61+ *
6062 * @var bool
6163 */
6264 public static $ enabled = true ;
6365
6466 /**
6567 * Results cache.
6668 *
69+ * @since 1.0.0
70+ *
6771 * @var array<int, array<string, array>> Format: $cache[$loop][$fileName][$key][$id] = mixed $value;
6872 */
6973 private static $ cache = [];
7074
7175 /**
7276 * Check whether a result has been cached for a certain utility function.
7377 *
78+ * @since 1.0.0
79+ *
7480 * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned.
7581 * @param string $key The key to identify a particular set of results.
7682 * It is recommended to pass __METHOD__ to this parameter.
@@ -98,6 +104,8 @@ public static function isCached(File $phpcsFile, $key, $id)
98104 /**
99105 * Retrieve a previously cached result for a certain utility function.
100106 *
107+ * @since 1.0.0
108+ *
101109 * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned.
102110 * @param string $key The key to identify a particular set of results.
103111 * It is recommended to pass __METHOD__ to this parameter.
@@ -130,6 +138,8 @@ public static function get(File $phpcsFile, $key, $id)
130138 /**
131139 * Retrieve all previously cached results for a certain utility function and a certain file.
132140 *
141+ * @since 1.0.0
142+ *
133143 * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned.
134144 * @param string $key The key to identify a particular set of results.
135145 * It is recommended to pass __METHOD__ to this parameter.
@@ -157,6 +167,8 @@ public static function getForFile(File $phpcsFile, $key)
157167 /**
158168 * Cache the result for a certain utility function.
159169 *
170+ * @since 1.0.0
171+ *
160172 * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned.
161173 * @param string $key The key to identify a particular set of results.
162174 * It is recommended to pass __METHOD__ to this parameter.
@@ -194,6 +206,8 @@ public static function set(File $phpcsFile, $key, $id, $value)
194206 /**
195207 * Clear the cache.
196208 *
209+ * @since 1.0.0
210+ *
197211 * @return void
198212 */
199213 public static function clear ()
0 commit comments