Code Duplication    Length = 5-5 lines in 2 locations

src/Extensions/CommentsExtension.php 2 locations

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