Code Duplication    Length = 9-11 lines in 2 locations

src/Runner/MediaInfoCommandRunner.php 2 locations

@@ 34-42 (lines=9) @@
31
     *
32
     * @return string
33
     */
34
    public function run(): string
35
    {
36
        $this->process->run();
37
        if (!$this->process->isSuccessful()) {
38
            throw new \RuntimeException($this->process->getErrorOutput());
39
        }
40
41
        return $this->process->getOutput();
42
    }
43
44
    /**
45
     * Asynchronously start mediainfo operation.
@@ 63-73 (lines=11) @@
60
     *
61
     * @return string
62
     */
63
    public function wait(): string
64
    {
65
        // blocks here until process completes
66
        $this->process->wait();
67
68
        if (!$this->process->isSuccessful()) {
69
            throw new \RuntimeException($this->process->getErrorOutput());
70
        }
71
72
        return $this->process->getOutput();
73
    }
74
}
75