@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | |
| 194 | 194 | public function baseDirectory() |
| 195 | 195 | { |
| 196 | - return __DIR__ . '/..'; |
|
| 196 | + return __DIR__.'/..'; |
|
| 197 | 197 | } |
| 198 | 198 | |
| 199 | 199 | public function register() |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | |
| 217 | 217 | Route::bind('uploadfile_file', function($id) { |
| 218 | 218 | $file = File::findOrFail($id); |
| 219 | - if(request()->route('module_instance_slug') && (int) $file->module_instance_id === request()->route('module_instance_slug')->id()) { |
|
| 219 | + if (request()->route('module_instance_slug') && (int) $file->module_instance_id === request()->route('module_instance_slug')->id()) { |
|
| 220 | 220 | return $file; |
| 221 | 221 | } |
| 222 | 222 | throw (new ModelNotFoundException)->setModel(File::class); |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | |
| 228 | 228 | $currentActivityInstance = app(ActivityInstanceResolver::class)->getActivityInstance(); |
| 229 | 229 | $fileActivityInstance = $file->activityInstance(); |
| 230 | - if($currentActivityInstance->resource_type === $fileActivityInstance->resource_type |
|
| 230 | + if ($currentActivityInstance->resource_type === $fileActivityInstance->resource_type |
|
| 231 | 231 | && (int) $currentActivityInstance->resource_id === (int) $fileActivityInstance->resource_id) { |
| 232 | 232 | return $file; |
| 233 | 233 | } |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | |
| 237 | 237 | Route::bind('uploadfile_file_status', function($id) { |
| 238 | 238 | $fileStatus = FileStatus::findOrFail($id); |
| 239 | - if(request()->route('module_instance_slug') && (int) $fileStatus->file->module_instance_id === request()->route('module_instance_slug')->id()) { |
|
| 239 | + if (request()->route('module_instance_slug') && (int) $fileStatus->file->module_instance_id === request()->route('module_instance_slug')->id()) { |
|
| 240 | 240 | return $fileStatus; |
| 241 | 241 | } |
| 242 | 242 | throw (new ModelNotFoundException)->setModel(FileStatus::class); |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | |
| 245 | 245 | Route::bind('uploadfile_comment', function($id) { |
| 246 | 246 | $comment = Comment::findOrFail($id); |
| 247 | - if(request()->route('module_instance_slug') && (int) $comment->file->module_instance_id === request()->route('module_instance_slug')->id()) { |
|
| 247 | + if (request()->route('module_instance_slug') && (int) $comment->file->module_instance_id === request()->route('module_instance_slug')->id()) { |
|
| 248 | 248 | return $comment; |
| 249 | 249 | } |
| 250 | 250 | throw (new ModelNotFoundException)->setModel(Comment::class); |
@@ -264,20 +264,20 @@ discard block |
||
| 264 | 264 | Group::make('New Documents')->withField( |
| 265 | 265 | Field::input('document_title')->inputType('text')->label('Default document title')->hint('This will be the default title of a new file')->default('Document') |
| 266 | 266 | )->withField( |
| 267 | - Field::switch('multiple_files')->label('Multiple Files')->hint('Should multiple files be able to be uploaded at the same time?') |
|
| 267 | + Field::switch ('multiple_files')->label('Multiple Files')->hint('Should multiple files be able to be uploaded at the same time?') |
|
| 268 | 268 | ->textOn('Allow')->textOff('Do not allow')->default(true) |
| 269 | 269 | )->withField( |
| 270 | 270 | Field::checkList('allowed_extensions')->label('Allowed file types')->hint('Which file types can be uploaded?') |
| 271 | - ->listBox(true)->values($this->app['config']->get($this->alias() . '.file_types')) |
|
| 271 | + ->listBox(true)->values($this->app['config']->get($this->alias().'.file_types')) |
|
| 272 | 272 | ->default(['doc', 'docx', 'odt', 'rtf', 'txt', 'csv', 'ppt', 'pptx', 'pdf', 'xls']) |
| 273 | 273 | ) |
| 274 | 274 | )->withGroup( |
| 275 | 275 | Group::make('Status Changes')->withField( |
| 276 | 276 | Field::input('initial_status')->inputType('select')->label('Initial Status')->hint('What status should all new files have?') |
| 277 | - ->default('Awaiting Approval')->values($this->app['config']->get($this->alias() . '.statuses')) |
|
| 277 | + ->default('Awaiting Approval')->values($this->app['config']->get($this->alias().'.statuses')) |
|
| 278 | 278 | )->withField( |
| 279 | 279 | Field::checkList('statuses')->label('Available Statuses')->hint('A list of available statuses') |
| 280 | - ->listBox(true)->values($this->app['config']->get($this->alias() . '.statuses')) |
|
| 280 | + ->listBox(true)->values($this->app['config']->get($this->alias().'.statuses')) |
|
| 281 | 281 | ) |
| 282 | 282 | )->withGroup( |
| 283 | 283 | Group::make('Tags')->withField( |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | { |
| 18 | 18 | $this->authorize('file.download'); |
| 19 | 19 | |
| 20 | - if(Storage::exists($file->path)) { |
|
| 20 | + if (Storage::exists($file->path)) { |
|
| 21 | 21 | return Storage::download($file->path, $file->filename, [ |
| 22 | 22 | 'X-Vapor-Base64-Encode' => 'True' |
| 23 | 23 | ]); |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | { |
| 31 | 31 | $this->authorize('file.download'); |
| 32 | 32 | |
| 33 | - if(Storage::exists($file->path)) { |
|
| 33 | + if (Storage::exists($file->path)) { |
|
| 34 | 34 | return Storage::download($file->path, $file->filename, [ |
| 35 | 35 | 'X-Vapor-Base64-Encode' => 'True' |
| 36 | 36 | ]); |