Code Duplication    Length = 14-14 lines in 2 locations

src/Sculpin.php 2 locations

@@ 109-122 (lines=14) @@
106
            $source->data()->set('url', $permalink->relativeUrlPath());
107
        }
108
109
        if ($updatedSources = $sourceSet->updatedSources()) {
110
            if (!$found) {
111
                $this->consoleIo->write('Detected new or updated files');
112
                $found = true;
113
            }
114
115
            foreach ($updatedSources as $source) {
116
                $this->converterManager->convertSource($source);
117
118
                if ($source->canBeFormatted()) {
119
                    $source->data()->set('blocks', $this->formatterManager->formatSourceBlocks($source));
120
                }
121
            }
122
        }
123
124
        if ($updatedSources = $sourceSet->updatedSources()) {
125
            if (!$found) {
@@ 124-137 (lines=14) @@
121
            }
122
        }
123
124
        if ($updatedSources = $sourceSet->updatedSources()) {
125
            if (!$found) {
126
                $this->consoleIo->write('Detected new or updated files');
127
                $found = true;
128
            }
129
130
            foreach ($updatedSources as $source) {
131
                if ($source->canBeFormatted()) {
132
                    $source->setFormattedContent($this->formatterManager->formatSourcePage($source));
133
                } else {
134
                    $source->setFormattedContent($source->content());
135
                }
136
            }
137
        }
138
139
        foreach ($sourceSet->updatedSources() as $source) {
140
            if ($source->isGenerator() || $source->shouldBeSkipped()) {