Code Duplication    Length = 9-13 lines in 2 locations

src/Task/Assets/ImageMinify.php 1 location

@@ 437-449 (lines=13) @@
434
    /**
435
     * @return string
436
     */
437
    protected function getOS()
438
    {
439
        $os = php_uname('s');
440
        $os .= '/' . php_uname('m');
441
        // replace x86_64 to x64, because the imagemin repo uses that
442
        $os = str_replace('x86_64', 'x64', $os);
443
        // replace i386, i686, etc to x86, because of imagemin
444
        $os = preg_replace('/i[0-9]86/', 'x86', $os);
445
        // turn info to lowercase, because of imagemin
446
        $os = strtolower($os);
447
448
        return $os;
449
    }
450
451
    /**
452
     * @param string $command

src/TaskInfo.php 1 location

@@ 27-35 (lines=9) @@
24
     *
25
     * @return string
26
     */
27
    public static function formatTaskName($task)
28
    {
29
        $name = get_class($task);
30
        $name = preg_replace('~Stack^~', '', $name);
31
        $name = str_replace('Robo\\Task\Base\\', '', $name);
32
        $name = str_replace('Robo\\Task\\', '', $name);
33
        $name = str_replace('Robo\\Collection\\', '', $name);
34
        return $name;
35
    }
36
}
37