```ruby
PuppetLint.new_check(:no_cron_resources) do
  def check
    resource_indexes.each do |resource|
      if resource[:type].value == 'cron'

        notify :warning, {
          message: 'cron resources should not be used',
          line:    resource[:type].line,
          column:  resource[:type].column,
        }

      end
    end
  end
end
```

Convert to next and early return on non-cron resources
user
```ruby
PuppetLint.new_check(:no_cron_resources) do
  def check
    resource_indexes.each do |resource|
      next unless resource[:type].value == 'cron'

      notify :warning, {
        message: 'cron resources should not be used',
        line:    resource[:type].line,
        column:  resource[:type].column,
      }

    end
  end
end
```
assistant