Code Duplication    Length = 5-5 lines in 2 locations

src/Extensions/CommentsExtension.php 2 locations

@@ 119-123 (lines=5) @@
116
        $defaults = $this->owner->config()->get('defaults');
117
118
        // Set if comments should be enabled by default
119
        if (isset($defaults['ProvideComments'])) {
120
            $this->owner->ProvideComments = $defaults['ProvideComments'];
121
        } else {
122
            $this->owner->ProvideComments = $this->owner->getCommentsOption('enabled') ? 1 : 0;
123
        }
124
125
        // If moderation options should be configurable via the CMS then
126
        if (isset($defaults['ModerationRequired'])) {
@@ 137-141 (lines=5) @@
134
        }
135
136
        // Set login required
137
        if (isset($defaults['CommentsRequireLogin'])) {
138
            $this->owner->CommentsRequireLogin = $defaults['CommentsRequireLogin'];
139
        } else {
140
            $this->owner->CommentsRequireLogin = $this->owner->getCommentsOption('require_login') ? 1 : 0;
141
        }
142
    }
143
144