Code Duplication    Length = 3-3 lines in 3 locations

lib/Archive/src/ArchiveEntry.php 3 locations

@@ 199-201 (lines=3) @@
196
            throw new \InvalidArgumentException('Can not use non-existing or unreadable file as source.');
197
        }
198
199
        if ($this->sourcePath !== null || $this->sourceStream !== null || $this->sourceString !== null) {
200
            throw new \InvalidArgumentException('Can not replace source, create a new entry instead.');
201
        }
202
203
        $obj = clone $this;
204
        $obj->sourcePath = $path;
@@ 236-238 (lines=3) @@
233
     */
234
    public function withSourceStream($stream, string $compressionMethod = null) : self
235
    {
236
        if ($this->sourcePath !== null || $this->sourceStream !== null || $this->sourceString !== null) {
237
            throw new \InvalidArgumentException('Can not replace source, create a new entry instead.');
238
        }
239
240
        $obj = clone $this;
241
        $obj->sourcePath = null;
@@ 271-273 (lines=3) @@
268
     */
269
    public function withSourceString(string $content, string $compressionMethod = null) : self
270
    {
271
        if ($this->sourcePath !== null || $this->sourceStream !== null || $this->sourceString !== null) {
272
            throw new \InvalidArgumentException('Can not replace source, create a new entry instead.');
273
        }
274
275
        $obj = clone $this;
276
        $obj->sourcePath = null;