Code Duplication    Length = 10-10 lines in 2 locations

src/Filesystem/src/Filesystem.php 2 locations

@@ 98-107 (lines=10) @@
95
    /**
96
     * @inheritDoc
97
     */
98
    public function listDirectories(string $path = '.', bool $recursive = false): array
99
    {
100
        return array_map(
101
            function($item){ return new Metadata($item); },
102
            array_filter(
103
                $this->flysystem->listContents($path, $recursive),
104
                function($item){ return $item['type'] === MetadataContract::TYPE_DIR; }
105
            )
106
        );
107
    }
108
109
    /**
110
     * @inheritDoc
@@ 112-121 (lines=10) @@
109
    /**
110
     * @inheritDoc
111
     */
112
    public function listFiles(string $path = '.', bool $recursive = false): array
113
    {
114
        return array_map(
115
            function($item){ return new Metadata($item); },
116
            array_filter(
117
                $this->flysystem->listContents($path, $recursive),
118
                function($item){ return $item['type'] === MetadataContract::TYPE_FILE; }
119
            )
120
        );
121
    }
122
123
    /**
124
     * @inheritDoc