quota->cookie_scans->allowed ?? 0 ); $used = (int) ( $plan->quota->cookie_scans->used ?? 0 ); return max( 0, $allowed - $used ); } }