Code Duplication    Length = 14-14 lines in 2 locations

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

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