Code Duplication    Length = 11-11 lines in 2 locations

src/TreeHouse/Feeder/Resource/Transformer/OverwriteXmlDeclarationTransformer.php 1 location

@@ 71-81 (lines=11) @@
68
    /**
69
     * @inheritdoc
70
     */
71
    public function needsTransforming(ResourceInterface $resource)
72
    {
73
        $file = $resource->getFile()->getPathname();
74
        $handle = fopen($file, 'r');
75
76
        $result = (bool) preg_match($this->xmlDeclarationRegEx, fread($handle, 96));
77
78
        fclose($handle);
79
80
        return $result;
81
    }
82
83
    /**
84
     * @param string $old

src/TreeHouse/Feeder/Resource/Transformer/RemoveByteOrderMarkTransformer.php 1 location

@@ 72-82 (lines=11) @@
69
    /**
70
     * @inheritdoc
71
     */
72
    public function needsTransforming(ResourceInterface $resource)
73
    {
74
        $file = $resource->getFile()->getPathname();
75
        $handle = fopen($file, 'r');
76
77
        $result = (bool) preg_match($this->getBomRegex(), fread($handle, 16));
78
79
        fclose($handle);
80
81
        return $result;
82
    }
83
84
    /**
85
     * @param string $old