axllent/silverstripe-version-truncator

Code style suggestion: use ClassName::class instead of full namespaced classname string

micschk opened this issue · 1 comments

Thanks for this module!
I noticed you're using the full namespaced class path to get Config values:

Config::inst()->get('Axllent\VersionTruncator\VersionTruncator', 'keep_drafts');

Not aware if there's unforeseen downsides to this, but it might be more convenient to use the ::class property instead? (shorter, easier to refactor, plus most of the time you're already in the same namespace in case of related classes)

Config::inst()->get(VersionTruncator::class, 'keep_versions');

Or, shorter yet;

VersionTruncator::config()->keep_versions;

Thanks @micschk