Code Duplication    Length = 7-9 lines in 2 locations

src/Files/File.php 2 locations

@@ 811-819 (lines=9) @@
808
            $oppositeType = 'error';
809
        }
810
811
        foreach ($checkCodes as $checkCode) {
812
            // Make sure this message type has not been set to the opposite message type.
813
            if (isset($this->ruleset->ruleset[$checkCode]['type']) === true
814
                && $this->ruleset->ruleset[$checkCode]['type'] === $oppositeType
815
            ) {
816
                $error = !$error;
817
                break;
818
            }
819
        }
820
821
        if ($error === true) {
822
            $configSeverity = $this->configCache['errorSeverity'];
@@ 841-847 (lines=7) @@
838
            $severity = 5;
839
        }
840
841
        foreach ($checkCodes as $checkCode) {
842
            // Make sure we are interested in this severity level.
843
            if (isset($this->ruleset->ruleset[$checkCode]['severity']) === true) {
844
                $severity = $this->ruleset->ruleset[$checkCode]['severity'];
845
                break;
846
            }
847
        }
848
849
        if ($includeAll === false && $configSeverity > $severity) {
850
            return false;