Code Duplication    Length = 12-12 lines in 2 locations

src/Filesystem/src/Filesystem.php 2 locations

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