mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-23 09:26:29 -06:00
Fix some nullable methods.
This commit is contained in:
parent
d0a01d73c4
commit
0219069766
@ -61,7 +61,7 @@ abstract class Controller extends BaseController
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function buildParams(): string
|
||||
final protected function buildParams(): string
|
||||
{
|
||||
$return = '?';
|
||||
$params = [];
|
||||
@ -83,7 +83,7 @@ abstract class Controller extends BaseController
|
||||
/**
|
||||
* @return Manager
|
||||
*/
|
||||
protected function getManager(): Manager
|
||||
final protected function getManager(): Manager
|
||||
{
|
||||
// create some objects:
|
||||
$manager = new Manager;
|
||||
|
@ -238,7 +238,7 @@ class RecurrenceController extends Controller
|
||||
$result = $recurring->fire();
|
||||
} catch (FireflyException $e) {
|
||||
Log::error($e->getMessage());
|
||||
throw new FireflyException('200022: Error in cron job.');
|
||||
throw new FireflyException('200022: Error in cron job.',0, $e);
|
||||
}
|
||||
if (false === $result) {
|
||||
return response()->json([], 204);
|
||||
|
@ -157,16 +157,16 @@ class RecurrenceUpdateRequest extends FormRequest
|
||||
/**
|
||||
* Returns the repetition data as it is found in the submitted data.
|
||||
*
|
||||
* @return array|null
|
||||
* @return array
|
||||
*/
|
||||
private function getRepetitionData(): ?array
|
||||
private function getRepetitionData(): array
|
||||
{
|
||||
$return = [];
|
||||
// repetition data:
|
||||
/** @var array $repetitions */
|
||||
$repetitions = $this->get('repetitions');
|
||||
if (null === $repetitions) {
|
||||
return null;
|
||||
return [];
|
||||
}
|
||||
/** @var array $repetition */
|
||||
foreach ($repetitions as $repetition) {
|
||||
@ -185,16 +185,16 @@ class RecurrenceUpdateRequest extends FormRequest
|
||||
* Returns the transaction data as it is found in the submitted data. It's a complex method according to code
|
||||
* standards but it just has a lot of ??-statements because of the fields that may or may not exist.
|
||||
*
|
||||
* @return array|null
|
||||
* @return array
|
||||
*/
|
||||
private function getTransactionData(): ?array
|
||||
private function getTransactionData(): array
|
||||
{
|
||||
$return = [];
|
||||
// transaction data:
|
||||
/** @var array $transactions */
|
||||
$transactions = $this->get('transactions');
|
||||
if (null === $transactions) {
|
||||
return null;
|
||||
return [];
|
||||
}
|
||||
/** @var array $transaction */
|
||||
foreach ($transactions as $transaction) {
|
||||
|
Loading…
Reference in New Issue
Block a user