mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-10 20:34:48 +00:00
PHP7 compatible type hinting [skip ci]
This commit is contained in:
@@ -22,7 +22,7 @@ class ChartJsAccountChartGenerator implements AccountChartGeneratorInterface
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function expenseAccounts(Collection $accounts, Carbon $start, Carbon $end)
|
||||
public function expenseAccounts(Collection $accounts, Carbon $start, Carbon $end): array
|
||||
{
|
||||
$data = [
|
||||
'count' => 1,
|
||||
@@ -69,7 +69,7 @@ class ChartJsAccountChartGenerator implements AccountChartGeneratorInterface
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function frontpage(Collection $accounts, Carbon $start, Carbon $end)
|
||||
public function frontpage(Collection $accounts, Carbon $start, Carbon $end): array
|
||||
{
|
||||
// language:
|
||||
$format = (string)trans('config.month_and_day');
|
||||
@@ -116,7 +116,7 @@ class ChartJsAccountChartGenerator implements AccountChartGeneratorInterface
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function single(Account $account, Carbon $start, Carbon $end)
|
||||
public function single(Account $account, Carbon $start, Carbon $end): array
|
||||
{
|
||||
// language:
|
||||
$format = (string)trans('config.month_and_day');
|
||||
@@ -153,7 +153,7 @@ class ChartJsAccountChartGenerator implements AccountChartGeneratorInterface
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function getIdsFromCollection(Collection $collection)
|
||||
protected function getIdsFromCollection(Collection $collection): array
|
||||
{
|
||||
$ids = [];
|
||||
foreach ($collection as $entry) {
|
||||
@@ -170,7 +170,7 @@ class ChartJsAccountChartGenerator implements AccountChartGeneratorInterface
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function isInArray($array, $entryId)
|
||||
protected function isInArray($array, $entryId): string
|
||||
{
|
||||
if (isset($array[$entryId])) {
|
||||
return $array[$entryId];
|
||||
|
||||
Reference in New Issue
Block a user