Upgrade to 3.1.0

This commit is contained in:
Bastian Allgeier
2019-03-19 11:07:14 +01:00
parent 418db4b09b
commit 6e074142f1
98 changed files with 1266 additions and 299 deletions

View File

@@ -64,7 +64,7 @@ class FileRules
public static function delete(File $file): bool
{
if ($file->permissions()->delete() !== true) {
throw new LogicException('The file cannot be deleted');
throw new PermissionException('The file cannot be deleted');
}
return true;
@@ -73,7 +73,7 @@ class FileRules
public static function replace(File $file, Image $upload): bool
{
if ($file->permissions()->replace() !== true) {
throw new LogicException('The file cannot be replaced');
throw new PermissionException('The file cannot be replaced');
}
static::validMime($file, $upload->mime());
@@ -94,7 +94,7 @@ class FileRules
public static function update(File $file, array $content = []): bool
{
if ($file->permissions()->update() !== true) {
throw new LogicException('The file cannot be updated');
throw new PermissionException('The file cannot be updated');
}
return true;