Some PHP 7.1 compatible code.

This commit is contained in:
James Cole
2017-07-23 19:06:24 +02:00
parent 05e73344eb
commit 7b03b0c5fc
12 changed files with 15 additions and 14 deletions

View File

@@ -135,7 +135,7 @@ class Navigation
*
* @return Carbon
*/
public function endOfX(Carbon $theCurrentEnd, string $repeatFreq, Carbon $maxDate = null): Carbon
public function endOfX(Carbon $theCurrentEnd, string $repeatFreq, ?Carbon $maxDate): Carbon
{
$functionMap = [
'1D' => 'endOfDay',

View File

@@ -147,7 +147,7 @@ class General extends Twig_Extension
protected function balance(): Twig_SimpleFilter
{
return new Twig_SimpleFilter(
'balance', function (Account $account = null): string {
'balance', function (?Account $account): string {
if (is_null($account)) {
return 'NULL';
}