Refactor budget controller.

This commit is contained in:
James Cole
2018-07-14 15:22:21 +02:00
parent 6bc772d640
commit b8699422c8
19 changed files with 2087 additions and 1495 deletions

View File

@@ -43,6 +43,8 @@ use View;
/**
* Class BillController.
*
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class BillController extends Controller
{
@@ -298,6 +300,9 @@ class BillController extends Controller
* @param BillFormRequest $request
*
* @return RedirectResponse
*
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
*/
public function store(BillFormRequest $request): RedirectResponse
{
@@ -316,7 +321,6 @@ class BillController extends Controller
$files = $request->hasFile('attachments') ? $request->file('attachments') : null;
$this->attachments->saveAttachmentsForModel($bill, $files);
// flash messages
if (\count($this->attachments->getMessages()->get('attachments')) > 0) {
$request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); // @codeCoverageIgnore
}