Code Duplication    Length = 14-14 lines in 2 locations

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

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