Code Duplication    Length = 5-5 lines in 4 locations

src/voku/helper/HtmlMinDomObserverOptimizeAttributes.php 4 locations

@@ 204-208 (lines=5) @@
201
        }
202
203
        // remove deprecated anchor-jump
204
        if ($htmlMin->isDoRemoveDeprecatedAnchorName()) {
205
            /** @noinspection NestedPositiveIfStatementsInspection */
206
            if ($tag === 'a' && $attrName === 'name' && isset($allAttr['id']) && $allAttr['id'] === $attrValue) {
207
                return true;
208
            }
209
        }
210
211
        // remove "type=text/css" for css links
@@ 212-216 (lines=5) @@
209
        }
210
211
        // remove "type=text/css" for css links
212
        if ($htmlMin->isDoRemoveDeprecatedTypeFromStylesheetLink()) {
213
            /** @noinspection NestedPositiveIfStatementsInspection */
214
            if ($tag === 'link' && $attrName === 'type' && $attrValue === 'text/css' && isset($allAttr['rel']) && $allAttr['rel'] === 'stylesheet') {
215
                return true;
216
            }
217
        }
218
219
        // remove deprecated script-mime-types
@@ 220-224 (lines=5) @@
217
        }
218
219
        // remove deprecated script-mime-types
220
        if ($htmlMin->isDoRemoveDeprecatedTypeFromScriptTag()) {
221
            /** @noinspection NestedPositiveIfStatementsInspection */
222
            if ($tag === 'script' && $attrName === 'type' && isset($allAttr['src'], self::$executableScriptsMimeTypes[$attrValue])) {
223
                return true;
224
            }
225
        }
226
227
        // remove 'value=""' from <input type="text">
@@ 228-232 (lines=5) @@
225
        }
226
227
        // remove 'value=""' from <input type="text">
228
        if ($htmlMin->isDoRemoveValueFromEmptyInput()) {
229
            /** @noinspection NestedPositiveIfStatementsInspection */
230
            if ($tag === 'input' && $attrName === 'value' && $attrValue === '' && isset($allAttr['type']) && $allAttr['type'] === 'text') {
231
                return true;
232
            }
233
        }
234
235
        // remove some empty attributes