Code Duplication    Length = 13-15 lines in 2 locations

src/Knp/Snappy/AbstractGenerator.php 2 locations

@@ 164-176 (lines=13) @@
161
    /**
162
     * {@inheritDoc}
163
     */
164
    public function generateFromHtml($html, $output, array $options = [], $overwrite = false)
165
    {
166
        $fileNames = [];
167
        if (is_array($html)) {
168
            foreach ($html as $htmlInput) {
169
                $fileNames[] = $this->createTemporaryFile($htmlInput, 'html');
170
            }
171
        } else {
172
            $fileNames[] = $this->createTemporaryFile($html, 'html');
173
        }
174
175
        $this->generate($fileNames, $output, $options, $overwrite);
176
    }
177
178
    /**
179
     * {@inheritDoc}
@@ 195-209 (lines=15) @@
192
    /**
193
     * {@inheritDoc}
194
     */
195
    public function getOutputFromHtml($html, array $options = [])
196
    {
197
        $fileNames = [];
198
        if (is_array($html)) {
199
            foreach ($html as $htmlInput) {
200
                $fileNames[] = $this->createTemporaryFile($htmlInput, 'html');
201
            }
202
        } else {
203
            $fileNames[] = $this->createTemporaryFile($html, 'html');
204
        }
205
206
        $result = $this->getOutput($fileNames, $options);
207
208
        return $result;
209
    }
210
211
    /**
212
     * Defines the binary