Code Duplication    Length = 14-14 lines in 2 locations

src/Brendt/Stitcher/Site/Http/Htaccess.php 2 locations

@@ 127-140 (lines=14) @@
124
     *
125
     * @return Block
126
     */
127
    public function &getHeaderBlock() : Block {
128
        $headerBlock = $this->findHeaderBlockByModName('mod_headers.c');
129
130
        if (!$headerBlock) {
131
            $headerBlock = new Block('ifmodule');
132
            $headerBlock->addArgument('mod_headers.c');
133
134
            if ($this->contents instanceof HtaccessContainer) {
135
                $this->contents->append($headerBlock);
136
            }
137
        }
138
139
        return $headerBlock;
140
    }
141
142
    /**
143
     * Get or create a page block within the headers block
@@ 197-210 (lines=14) @@
194
     *
195
     * @return Block
196
     */
197
    public function &getRewriteBlock() : Block {
198
        $rewriteBlock = $this->findHeaderBlockByModName('mod_rewrite.c');
199
200
        if (!$rewriteBlock) {
201
            $rewriteBlock = new Block('ifmodule');
202
            $rewriteBlock->addArgument('mod_rewrite.c');
203
204
            if ($this->contents instanceof HtaccessContainer) {
205
                $this->contents->append($rewriteBlock);
206
            }
207
        }
208
209
        return $rewriteBlock;
210
    }
211
212
    /**
213
     * @param Block  $headerBlock