Code Duplication    Length = 4-6 lines in 2 locations

src/Step/OptimizeImages.php 2 locations

@@ 58-63 (lines=6) @@
55
        $max = count($data);
56
        $optimized = 0;
57
58
        if ($max <= 0) {
59
            $message = 'No images';
60
            call_user_func_array($this->builder->getMessageCb(), ['OPTIMIZE_PROGRESS', $message]);
61
62
            return;
63
        }
64
65
        /* @var $file \Symfony\Component\Finder\SplFileInfo */
66
        foreach ($data as $file) {
@@ 91-94 (lines=4) @@
88
                $optimized++;
89
            }
90
        }
91
        if ($optimized == 0) {
92
            $message = 'Nothing to do (not optimizers installed?)';
93
            call_user_func_array($this->builder->getMessageCb(), ['OPTIMIZE_PROGRESS', $message]);
94
        }
95
    }
96
}
97