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

@@ -19,7 +19,7 @@ class ChartJsReportChartGenerator implements ReportChartGeneratorInterface
*
* @return array
*/
public function multiYearInOut(Collection $entries)
public function multiYearInOut(Collection $entries): array
{
$data = [
'count' => 2,
@@ -52,7 +52,7 @@ class ChartJsReportChartGenerator implements ReportChartGeneratorInterface
*
* @return array
*/
public function multiYearInOutSummarized(string $income, string $expense, int $count)
public function multiYearInOutSummarized(string $income, string $expense, int $count): array
{
$data = [
'count' => 2,
@@ -81,7 +81,7 @@ class ChartJsReportChartGenerator implements ReportChartGeneratorInterface
*
* @return array
*/
public function yearInOut(Collection $entries)
public function yearInOut(Collection $entries): array
{
// language:
$format = (string)trans('config.month');
@@ -117,7 +117,7 @@ class ChartJsReportChartGenerator implements ReportChartGeneratorInterface
*
* @return array
*/
public function yearInOutSummarized(string $income, string $expense, int $count)
public function yearInOutSummarized(string $income, string $expense, int $count): array
{
$data = [

View File

@@ -25,7 +25,7 @@ interface ReportChartGeneratorInterface
*
* @return array
*/
public function multiYearInOut(Collection $entries);
public function multiYearInOut(Collection $entries): array;
/**
* @param string $income
@@ -34,14 +34,14 @@ interface ReportChartGeneratorInterface
*
* @return array
*/
public function multiYearInOutSummarized(string $income, string $expense, int $count);
public function multiYearInOutSummarized(string $income, string $expense, int $count): array;
/**
* @param Collection $entries
*
* @return array
*/
public function yearInOut(Collection $entries);
public function yearInOut(Collection $entries): array;
/**
* @param string $income
@@ -50,6 +50,6 @@ interface ReportChartGeneratorInterface
*
* @return array
*/
public function yearInOutSummarized(string $income, string $expense, int $count);
public function yearInOutSummarized(string $income, string $expense, int $count): array;
}