From 8271597836eeb9b6f50062c1ce6d685cb61e0e72 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Mon, 16 Nov 2015 03:11:47 -0500 Subject: [PATCH] Use ternary operator where applicable --- program/steps/addressbook/import.inc | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/program/steps/addressbook/import.inc b/program/steps/addressbook/import.inc index 9c108ff..4425498 100644 --- a/program/steps/addressbook/import.inc +++ b/program/steps/addressbook/import.inc @@ -136,7 +136,7 @@ } if ($existing && $existing->count) { $IMPORT_STATS->skipped++; - $IMPORT_STATS->skipped_names[] = $vcard->displayname ? $vcard->displayname : $email; + $IMPORT_STATS->skipped_names[] = $vcard->displayname ?: $email; continue; } } @@ -164,7 +164,7 @@ } $IMPORT_STATS->inserted++; - $IMPORT_STATS->names[] = $a_record['name'] ? $a_record['name'] : $email; + $IMPORT_STATS->names[] = $a_record['name'] ?: $email; } else { $IMPORT_STATS->errors++; -- Gitblit v1.9.1