Code Duplication    Length = 6-6 lines in 2 locations

src/micmania1/config/Transformer/Yaml.php 2 locations

@@ 496-501 (lines=6) @@
493
    {
494
        $filtered = [];
495
        foreach($documents as $key => $document) {
496
            if(isset($document['header'][self::ONLY_FLAG])) {
497
                // If not all rules match, then we exclude this document
498
                if(!$this->testRules($document['header'], self::ONLY_FLAG)) {
499
                    continue;
500
                }
501
            }
502
503
            if(isset($document['header'][self::EXCEPT_FLAG])) {
504
                // If all rules pass, then we exclude this document
@@ 503-508 (lines=6) @@
500
                }
501
            }
502
503
            if(isset($document['header'][self::EXCEPT_FLAG])) {
504
                // If all rules pass, then we exclude this document
505
                if($this->testRules($document['header'], self::EXCEPT_FLAG)) {
506
                    continue;
507
                }
508
            }
509
510
            $filtered[$key] = $document;
511
        }