Bug Bad example for icon_usage_analyzer_steps code event listener

There is a bug in this version
X

Xon

Guest
The example;
PHP:

Code:
public static function iconUsageAnalyzerSteps(
    array &$steps,
    \XF\Service\Icon\UsageAnalyzer $usageAnalyzer
): void
{
    $steps['my_content_type'] = [
        function (?int $lastOffset, float $maxRunTime) use ($usageAnalyzer): ?int
        {
            // your icon usage analyzer logic
            return null;
        },
    ];
}

This really should be;

PHP:

Code:
public static function iconUsageAnalyzerSteps(
    array &$steps,
    \XF\Service\Icon\UsageAnalyzer...

Read more

Continue reading...