Skip to content

Commit

Permalink
Resolved #24, clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
dusta committed Dec 17, 2018
1 parent 5fdf083 commit 26cddf9
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/Storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,15 +267,13 @@ public function isAllowedFileType($file, $extensions)
finfo_close($finfo);

if (isset($extensions[$extension])) {

if (!is_array($extensions[$extension])) {
$extensions[$extension] = [$extensions[$extension]];
}

if (in_array($mime, $extensions[$extension])) {
return true;
}

}

return false;
Expand Down
2 changes: 1 addition & 1 deletion tests/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
require_once __DIR__ . '/../vendor/autoload.php';

define('APP_NAME', 'Dframe');
define('APP_DIR', __DIR__.'/');
define('APP_DIR', __DIR__.'/');
2 changes: 1 addition & 1 deletion tests/FakeDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ public function drop($adapter, $path)
{
// TODO: Implement drop() method.
}
}
}
2 changes: 0 additions & 2 deletions tests/FileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public function setUp()

public function testHas()
{

$this->assertTrue($this->Storage->getManager()->has('local://file.txt'));
}

Expand All @@ -48,5 +47,4 @@ public function testPut()
$put = $this->Storage->put('local', __DIR__ . '/file.txt', 'files/file.txt');
$this->assertTrue($put['return']);
}

}

0 comments on commit 26cddf9

Please sign in to comment.