PHP7 compatible type hinting [skip ci]

This commit is contained in:
James Cole
2016-02-18 07:21:48 +01:00
parent 7a7ce7fcea
commit e7be4e3e49
22 changed files with 87 additions and 139 deletions

View File

@@ -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];