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

@@ -500,7 +500,7 @@ class AccountRepository implements AccountRepositoryInterface
*
* @return null|string
*/
private function filterIban(string $iban = null)
private function filterIban(?string $iban)
{
if (is_null($iban)) {
return null;

View File

@@ -44,7 +44,7 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
*
* @return bool
*/
public function destroy(RuleGroup $ruleGroup, RuleGroup $moveTo = null): bool
public function destroy(RuleGroup $ruleGroup, ?RuleGroup $moveTo): bool
{
/** @var Rule $rule */
foreach ($ruleGroup->rules as $rule) {

View File

@@ -39,7 +39,7 @@ interface RuleGroupRepositoryInterface
*
* @return bool
*/
public function destroy(RuleGroup $ruleGroup, RuleGroup $moveTo = null): bool;
public function destroy(RuleGroup $ruleGroup, ?RuleGroup $moveTo): bool;
/**
* @param int $ruleGroupId

View File

@@ -253,7 +253,7 @@ class TagRepository implements TagRepositoryInterface
*
* @return string
*/
public function sumOfTag(Tag $tag, Carbon $start = null, Carbon $end = null): string
public function sumOfTag(Tag $tag, ?Carbon $start, ?Carbon $end): string
{
/** @var JournalCollectorInterface $collector */
$collector = app(JournalCollectorInterface::class);

View File

@@ -133,7 +133,7 @@ interface TagRepositoryInterface
*
* @return string
*/
public function sumOfTag(Tag $tag, Carbon $start = null, Carbon $end = null): string;
public function sumOfTag(Tag $tag, ?Carbon $start, ?Carbon $end): string;
/**
* @param Tag $tag