File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ public function handle(): int
20
20
$ files = File::allFiles (base_path ($ path ));
21
21
22
22
collect ($ files )->each (function ($ file ) use ($ outputPath ) {
23
- if (! $ this ->hasFileChanged ($ file )) {
23
+ if (! $ this ->hasFileChanged ($ file )) {
24
24
return ;
25
25
}
26
26
@@ -93,18 +93,19 @@ private function convertValue($item)
93
93
};
94
94
}
95
95
96
- private function hasFileChanged ($ file ) {
97
- if (!config ('enum-convertor-laravel.enable_file_hash_check ' , false )) {
96
+ private function hasFileChanged ($ file )
97
+ {
98
+ if (! config ('enum-convertor-laravel.enable_file_hash_check ' , false )) {
98
99
return true ;
99
100
}
100
101
101
102
$ fileHash = hash_file ('sha256 ' , $ file ->getPathname ());
102
103
103
- $ cacheKey = 'enum-convertor- ' . hash ('sha256 ' , $ file ->getPathname ());
104
+ $ cacheKey = 'enum-convertor- ' . hash ('sha256 ' , $ file ->getPathname ());
104
105
105
106
$ previousHash = Cache::get ($ cacheKey , '' );
106
107
107
- if ($ fileHash !== $ previousHash ) {
108
+ if ($ fileHash !== $ previousHash ) {
108
109
Cache::put ($ cacheKey , $ fileHash );
109
110
110
111
return true ;
You can’t perform that action at this time.
0 commit comments