Code Duplication    Length = 9-9 lines in 2 locations

src/Resources/Middlewares/Image/ImageCompressMiddlewareAbstract.php 1 location

@@ 76-84 (lines=9) @@
73
    /**
74
     * @return bool
75
     */
76
    protected function isAllowed()
77
    {
78
        return $this->config->get('staticus.images.compress.compress', false)
79
        && (
80
            $this->resourceDO->isNew() // For the POST method
81
            || $this->resourceDO->isRecreate() // For the POST method
82
        )
83
        && $this->filesystem->has($this->resourceDO->getFilePath());
84
    }
85
}
86

src/Resources/Middlewares/Image/ImageStripMiddlewareAbstract.php 1 location

@@ 53-61 (lines=9) @@
50
    /**
51
     * @return bool
52
     */
53
    protected function mustBeStripped()
54
    {
55
        return $this->config->get('staticus.images.exif.strip', false)
56
        && (
57
            $this->resourceDO->isNew() // For the POST method
58
            || $this->resourceDO->isRecreate() // For the POST method
59
        )
60
        && $this->filesystem->has($this->resourceDO->getFilePath());
61
    }
62
}
63