Skip to content

Commit 67d9d99

Browse files
committed
Resolved #40, clean
1 parent 8faca0d commit 67d9d99

1 file changed

Lines changed: 13 additions & 14 deletions

File tree

src/Storage.php

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,8 @@ public function getConfig($key = null)
131131
*/
132132
public function drop($adapter, $file)
133133
{
134-
135134
$get = $this->driver->get($adapter, $file, true);
136-
if(empty($get['file_path'])){
135+
if (empty($get['file_path'])) {
137136
throw new FileNotFoundException(FileNotFoundException::FILE_NOT_FOUND_MESSAGE);
138137
}
139138

@@ -197,18 +196,6 @@ public function put($adapter, $tmpName, $pathImage, $forced = false)
197196
return ['fileId' => $get['file_id']];
198197
}
199198

200-
/**
201-
* Get $filename mine
202-
*/
203-
public function getFileMine($file)
204-
{
205-
$finfo = finfo_open(FILEINFO_MIME_TYPE);
206-
$mime = finfo_file($finfo, $file['tmp_name']); //Walidacja Mine
207-
finfo_close($finfo);
208-
209-
return $mime;
210-
}
211-
212199
/**
213200
* @param $file
214201
* @param $extensions
@@ -233,4 +220,16 @@ public function isAllowedFile($file, array $allowedTypes, array $allowedExtensio
233220

234221
return true;
235222
}
223+
224+
/**
225+
* Get $filename mine
226+
*/
227+
public function getFileMine($file)
228+
{
229+
$finfo = finfo_open(FILEINFO_MIME_TYPE);
230+
$mime = finfo_file($finfo, $file['tmp_name']); //Walidacja Mine
231+
finfo_close($finfo);
232+
233+
return $mime;
234+
}
236235
}

0 commit comments

Comments
 (0)