Code Duplication    Length = 6-6 lines in 2 locations

src/Command/ImportCommandAbstract.php 1 location

@@ 55-60 (lines=6) @@
52
         * @param SplFileInfo $file
53
         * @return bool
54
         */
55
        $filter = function (SplFileInfo $file) {
56
            if (!in_array($file->getExtension(), ['yml','json']) || $file->isDir()) {
57
                return false;
58
            }
59
            return true;
60
        };
61
62
        foreach ($files as $file) {
63
            if (is_file($file)) {

src/Command/ValidationCommand.php 1 location

@@ 94-99 (lines=6) @@
91
         * @param SplFileInfo $file
92
         * @return bool
93
         */
94
        $filter = function (SplFileInfo $file) {
95
            if (!in_array($file->getExtension(), ['yml','json']) || $file->isDir()) {
96
                return false;
97
            }
98
            return true;
99
        };
100
101
        foreach ($files as $file) {
102
            if (is_file($file)) {