Code cleanup that (hopefully) matches style CI

This commit is contained in:
James Cole
2020-03-17 14:57:04 +01:00
parent b0c9fc0792
commit bd2f064eeb
30 changed files with 318 additions and 298 deletions

View File

@@ -41,6 +41,7 @@ class AttachmentFactory
/**
* Constructor.
*
* @codeCoverageIgnore
*/
public function __construct()
@@ -53,8 +54,8 @@ class AttachmentFactory
/**
* @param array $data
*
* @return Attachment|null
* @throws FireflyException
* @return Attachment|null
*/
public function create(array $data): ?Attachment
{
@@ -64,7 +65,7 @@ class AttachmentFactory
// get journal instead of transaction.
if (Transaction::class === $model) {
/** @var Transaction $transaction */
$transaction = $this->user->transactions()->find((int)$data['model_id']);
$transaction = $this->user->transactions()->find((int) $data['model_id']);
if (null === $transaction) {
throw new FireflyException('Unexpectedly could not find transaction'); // @codeCoverageIgnore
}
@@ -87,7 +88,7 @@ class AttachmentFactory
'uploaded' => 0,
]
);
$notes = (string)($data['notes'] ?? '');
$notes = (string) ($data['notes'] ?? '');
if ('' !== $notes) {
$note = new Note;
$note->noteable()->associate($attachment);