Code Duplication    Length = 15-15 lines in 2 locations

src/Adapter.php 2 locations

@@ 100-114 (lines=15) @@
97
     *
98
     * @return array|bool
99
     */
100
    public function write($path, $contents, Config $config)
101
    {
102
        $temporaryPath = $this->createTemporaryFile($contents);
103
104
        $response = $this->cosApi->upload($this->getBucket(), $temporaryPath, $path,
105
            null, null, $config->get('insertOnly', 1));
106
107
        $response = $this->normalizeResponse($response);
108
109
        if (false !== $response) {
110
            $this->setContentType($path, $contents);
111
        }
112
113
        return $response;
114
    }
115
116
    /**
117
     * @param string   $path
@@ 150-164 (lines=15) @@
147
     *
148
     * @return array|bool
149
     */
150
    public function update($path, $contents, Config $config)
151
    {
152
        $temporaryPath = $this->createTemporaryFile($contents);
153
154
        $response = $this->cosApi->upload($this->getBucket(), $temporaryPath, $path,
155
            null, null, $config->get('insertOnly', 0));
156
157
        $response = $this->normalizeResponse($response);
158
159
        if (false !== $response) {
160
            $this->setContentType($path, $contents);
161
        }
162
163
        return $response;
164
    }
165
166
    /**
167
     * @param string   $path