mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
PHP7 compatible function definitions.
This commit is contained in:
@@ -53,9 +53,9 @@ class AttachmentCollector extends BasicCollector implements CollectorInterface
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function run()
|
||||
public function run(): bool
|
||||
{
|
||||
// grab all the users attachments:
|
||||
$attachments = $this->getAttachments();
|
||||
@@ -70,6 +70,7 @@ class AttachmentCollector extends BasicCollector implements CollectorInterface
|
||||
$this->exportDisk->put($file, $this->explanationString);
|
||||
Log::debug('Also put explanation file "' . $file . '" in the zip.');
|
||||
$this->getFiles()->push($file);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -40,7 +40,7 @@ class BasicCollector
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
public function getFiles()
|
||||
public function getFiles(): Collection
|
||||
{
|
||||
return $this->files;
|
||||
}
|
||||
|
@@ -22,12 +22,12 @@ interface CollectorInterface
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
public function getFiles();
|
||||
public function getFiles(): Collection;
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function run();
|
||||
public function run(): bool;
|
||||
|
||||
/**
|
||||
* @param Collection $files
|
||||
|
@@ -47,9 +47,9 @@ class UploadCollector extends BasicCollector implements CollectorInterface
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function run()
|
||||
public function run(): bool
|
||||
{
|
||||
// grab upload directory.
|
||||
$files = $this->uploadDisk->files();
|
||||
@@ -58,6 +58,7 @@ class UploadCollector extends BasicCollector implements CollectorInterface
|
||||
foreach ($files as $entry) {
|
||||
$this->processOldUpload($entry);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user