Skip to content

Commit 5000cf7

Browse files
committed
Ignore conditional use of WeakMap.
1 parent 2a05eaf commit 5000cf7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

woocommerce/payment-gateway/Dynamic_Props.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class Dynamic_Props {
4242
* @since x.x.x
4343
* @var \WeakMap<object, \stdClass>|null
4444
*/
45-
private static ?\WeakMap $map = null;
45+
private static ?\WeakMap $map = null; // phpcs:ignore PHPCompatibility.Classes.NewClasses.weakmapFound -- conditionally used for PHP 8.0+
4646

4747
/**
4848
* Sets a property on the order object.
@@ -184,6 +184,7 @@ private static function use_weak_map(): bool {
184184
*/
185185
private static function init_weak_map(): void {
186186
if ( null === self::$map ) {
187+
// phpcs:ignore PHPCompatibility.Classes.NewClasses.weakmapFound -- conditionally used for PHP 8.0+
187188
self::$map = new \WeakMap();
188189
}
189190
}

0 commit comments

Comments
 (0)