You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -332,21 +333,24 @@ add_filter( 'cron_schedules', namespace\first_class_six_min_schedule(...)); // W
332
333
/*
333
334
* The tests below document the current behavior of the sniff, even though they are false negatives. The sniff treats
334
335
* the first-class callable examples below as if referencing the global function first_class_six_min_schedule()
335
-
* and not a namespaced function with the same name. Currently, those tests don't trigger a warning but instead
336
-
* they should trigger the `ChangeDetected` warning. Fixing this incorrect behavior is not trivial.
336
+
* and not a namespaced function with the same name.
337
+
*
338
+
* Related to: https://github.com/WordPress/WordPress-Coding-Standards/issues/2644.
337
339
*/
338
-
add_filter( 'cron_schedules', MyNamespace\first_class_weekly_schedule(...)); // Ok: > 15 min.
339
-
add_filter( 'cron_schedules', \MyNamespace\first_class_weekly_schedule(...)); // Ok: > 15 min.
340
+
add_filter( 'cron_schedules', MyNamespace\first_class_weekly_schedule(...)); // False negative - Ok: > 15 min, but should be marked `ChangeDetected`.
341
+
add_filter( 'cron_schedules', \MyNamespace\first_class_weekly_schedule(...)); // False negative - Ok: > 15 min, but should be marked `ChangeDetected`.
342
+
add_filter( 'cron_schedules', namespace\Sub\first_class_weekly_schedule(...)); // False negative - Ok: > 15 min, but should be marked `ChangeDetected`.
340
343
341
344
/*
342
345
* The tests below document the current behavior of the sniff, even though they are false positives. The sniff treats
343
346
* the first-class callable examples below as if referencing the global function first_class_six_min_schedule()
344
-
* and not a namespaced function with the same name. Currently, those tests trigger the `CronSchedulesInterval` warning
345
-
* but instead they should trigger the `ChangeDetected` warning. Fixing this incorrect behavior is not trivial.
347
+
* and not a namespaced function with the same name. Fixing this incorrect behavior is not trivial.
348
+
*
349
+
* Related to: https://github.com/WordPress/WordPress-Coding-Standards/issues/2644.
346
350
*/
347
-
add_filter( 'cron_schedules', MyNamespace\first_class_six_min_schedule(...)); // Warning: 6 min.
348
-
add_filter( 'cron_schedules', \MyNamespace\first_class_six_min_schedule(...)); // Warning: 6 min.
349
-
add_filter( 'cron_schedules', namespace\Sub\first_class_six_min_schedule(...)); // Warning: 6 min.
351
+
add_filter( 'cron_schedules', MyNamespace\first_class_six_min_schedule(...)); // False positive - `CronSchedulesInterval` warning (6 min), but should be `ChangeDetected`.
352
+
add_filter( 'cron_schedules', \MyNamespace\first_class_six_min_schedule(...)); // False positive - `CronSchedulesInterval` warning (6 min), but should be `ChangeDetected`.
353
+
add_filter( 'cron_schedules', namespace\Sub\first_class_six_min_schedule(...)); // False positive - `CronSchedulesInterval` warning (6 min), but should be `ChangeDetected`.
350
354
351
355
/*
352
356
* Safeguard correct handling of all types of namespaced function calls (except FQN global function call which is
0 commit comments