Added nullsafe operator to simplify conditions

This commit is contained in:
Alejandro Celaya
2021-05-23 12:31:10 +02:00
parent e0f0bb5523
commit c01121d61a
64 changed files with 95 additions and 113 deletions

View File

@@ -80,7 +80,7 @@ class VisitsStatsHelperTest extends TestCase
{
$shortCode = '123ABC';
$identifier = ShortUrlIdentifier::fromShortCodeAndDomain($shortCode);
$spec = $apiKey === null ? null : $apiKey->spec();
$spec = $apiKey?->spec();
$repo = $this->prophesize(ShortUrlRepositoryInterface::class);
$count = $repo->shortCodeIsInUse($identifier, $spec)->willReturn(