Code clean up.

This commit is contained in:
James Cole
2017-11-15 12:25:49 +01:00
parent 57dcdfa0c4
commit ffca858b8d
476 changed files with 2055 additions and 4181 deletions

View File

@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace FireflyIII\Helpers\Attachments;
@@ -33,14 +32,11 @@ use Storage;
use Symfony\Component\HttpFoundation\File\UploadedFile;
/**
* Class AttachmentHelper
*
* @package FireflyIII\Helpers\Attachments
* Class AttachmentHelper.
*/
class AttachmentHelper implements AttachmentHelperInterface
{
/** @var Collection */
/** @var Collection */
public $attachments;
/** @var MessageBag */
public $errors;
@@ -114,7 +110,7 @@ class AttachmentHelper implements AttachmentHelperInterface
if (is_array($files)) {
/** @var UploadedFile $entry */
foreach ($files as $entry) {
if (!is_null($entry)) {
if (null !== $entry) {
$this->processFile($entry, $model);
}
}
@@ -152,7 +148,6 @@ class AttachmentHelper implements AttachmentHelperInterface
}
/**
*
* @param UploadedFile $file
* @param Model $model
*
@@ -161,7 +156,7 @@ class AttachmentHelper implements AttachmentHelperInterface
protected function processFile(UploadedFile $file, Model $model): Attachment
{
$validation = $this->validateUpload($file, $model);
if ($validation === false) {
if (false === $validation) {
return new Attachment;
}

View File

@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace FireflyIII\Helpers\Attachments;
@@ -29,13 +28,10 @@ use Illuminate\Support\Collection;
use Illuminate\Support\MessageBag;
/**
* Interface AttachmentHelperInterface
*
* @package FireflyIII\Helpers\Attachments
* Interface AttachmentHelperInterface.
*/
interface AttachmentHelperInterface
{
/**
* @param Attachment $attachment
*
@@ -60,7 +56,6 @@ interface AttachmentHelperInterface
/**
* @param Model $model
*
* @param null|array $files
*
* @return bool