PHP7 compatible function definitions.

This commit is contained in:
James Cole
2016-04-06 16:37:28 +02:00
parent c8440af9a5
commit 250b2c2f53
71 changed files with 220 additions and 190 deletions

View File

@@ -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;
}
/**

View File

@@ -40,7 +40,7 @@ class BasicCollector
/**
* @return Collection
*/
public function getFiles()
public function getFiles(): Collection
{
return $this->files;
}

View File

@@ -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

View File

@@ -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;
}
/**