Code cleanup

This commit is contained in:
James Cole
2018-04-02 15:10:40 +02:00
parent fa7ab45a40
commit a3c34e6b3c
151 changed files with 802 additions and 990 deletions

View File

@@ -54,7 +54,7 @@ class ExportJobRepository implements ExportJobRepositoryInterface
/**
* @return bool
*
* @throws \Exception
*/
public function cleanup(): bool
{
@@ -68,7 +68,7 @@ class ExportJobRepository implements ExportJobRepositoryInterface
foreach ($set as $entry) {
$key = $entry->key;
$len = strlen($key);
$files = scandir(storage_path('export'));
$files = scandir(storage_path('export'), SCANDIR_SORT_NONE);
/** @var string $file */
foreach ($files as $file) {
if (substr($file, 0, $len) === $key) {
@@ -144,11 +144,10 @@ class ExportJobRepository implements ExportJobRepositoryInterface
*/
public function getContent(ExportJob $job): string
{
$disk = Storage::disk('export');
$file = $job->key . '.zip';
$content = $disk->get($file);
$disk = Storage::disk('export');
$file = $job->key . '.zip';
return $content;
return $disk->get($file);
}
/**