Skip to content

Commit cdef176

Browse files
Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
1 parent 4876837 commit cdef176

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/FileSafeServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function boot()
2525
{
2626

2727
$this->publishes([
28-
__DIR__.'/../config/irfa/' => config_path('irfa')],'file-safe');
28+
__DIR__.'/../config/irfa/' => config_path('irfa') ], 'file-safe');
2929

3030

3131
}

src/Security/CryptFile.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,34 +9,34 @@
99
class CryptFile extends File
1010
{
1111
private static $file;
12-
protected static function encrypt($file){
12+
protected static function encrypt($file) {
1313
$fileContent = $file->get();
1414
self::$file = $file;
1515
$encryptedContent = Crypt::encrypt($fileContent);
16-
self::store_file(self::GenerateFileName(),$encryptedContent);
16+
self::store_file(self::GenerateFileName(), $encryptedContent);
1717

1818
self::$file = null;
1919

2020

2121
}
2222

23-
protected static function decrypt($file,$raw=false){
23+
protected static function decrypt($file, $raw = false) {
2424
$fl = self::get_file($file);
2525
$decryptedContent = Crypt::decrypt($fl);
26-
if($raw){
26+
if ($raw) {
2727
$raw = $decryptedContent;
2828
return $raw;
29-
} else{
29+
} else {
3030

3131
return response()->streamDownload(function() use ($decryptedContent) {
3232
echo $decryptedContent;
3333
}, $file);
3434
}
3535
}
36-
private static function GenerateFileName(){
37-
if(config("irfa.filesafe.random_filename")){
36+
private static function GenerateFileName() {
37+
if (config("irfa.filesafe.random_filename")) {
3838
$rand = time()."_".Str::random(20).".".self::$file->getClientOriginalExtension();
39-
} else{
39+
} else {
4040
$rand = self::$file->getClientOriginalName();
4141
}
4242
return $rand;

0 commit comments

Comments
 (0)