Code Duplication    Length = 14-14 lines in 2 locations

src/Media.php 2 locations

@@ 36-49 (lines=14) @@
33
        return $this->file;
34
    }
35
36
    public function getDurationInSeconds(): int
37
    {
38
        $stream = $this->media->getStreams()->first();
39
40
        if ($stream->has('duration')) {
41
            return $stream->get('duration');
42
        }
43
44
        $format = $this->media->getFormat();
45
46
        if ($format->has('duration')) {
47
            return $format->get('duration');
48
        }
49
    }
50
51
    public function getDurationInMiliseconds(): float
52
    {
@@ 51-64 (lines=14) @@
48
        }
49
    }
50
51
    public function getDurationInMiliseconds(): float
52
    {
53
        $stream = $this->media->getStreams()->first();
54
55
        if ($stream->has('duration')) {
56
            return $stream->get('duration') * 1000;
57
        }
58
59
        $format = $this->media->getFormat();
60
61
        if ($format->has('duration')) {
62
            return $format->get('duration') * 1000;
63
        }
64
    }
65
66
    public function export(): MediaExporter
67
    {