Skip to content

Commit

Permalink
Merge pull request #163 from tetebueno/patch-1
Browse files Browse the repository at this point in the history
Adding prefix, suffix and middle name to contacts.
  • Loading branch information
marcelklehr authored Jan 9, 2024
2 parents b400596 + ba1957d commit 6ce9d4b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/Service/GoogleContactsAPIService.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,11 @@ public function importContacts(string $userId, ?string $uri, int $key, ?string $
$displayName = $n['displayName'] ?? '';
$familyName = $n['familyName'] ?? '';
$firstName = $n['givenName'] ?? '';
if ($familyName || $firstName) {
$prop = $vCard->createProperty('N', [0 => $familyName, 1 => $firstName, 2 => '', 3 => '', 4 => '']);
$additionalName = $n['middleName'] ?? '';

Check failure on line 217 in lib/Service/GoogleContactsAPIService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.1, dev-master)

MixedAssignment

lib/Service/GoogleContactsAPIService.php:217:6: MixedAssignment: Unable to determine the type that $additionalName is being assigned to (see https://psalm.dev/032)

Check failure on line 217 in lib/Service/GoogleContactsAPIService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.1, dev-master)

MixedArrayAccess

lib/Service/GoogleContactsAPIService.php:217:24: MixedArrayAccess: Cannot access array value on mixed variable $n (see https://psalm.dev/051)

Check failure on line 217 in lib/Service/GoogleContactsAPIService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.0, v26.x.x)

MixedAssignment

lib/Service/GoogleContactsAPIService.php:217:6: MixedAssignment: Unable to determine the type that $additionalName is being assigned to (see https://psalm.dev/032)

Check failure on line 217 in lib/Service/GoogleContactsAPIService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.0, v26.x.x)

MixedArrayAccess

lib/Service/GoogleContactsAPIService.php:217:24: MixedArrayAccess: Cannot access array value on mixed variable $n (see https://psalm.dev/051)
$prefix = $n['honorificPrefix'] ?? '';

Check failure on line 218 in lib/Service/GoogleContactsAPIService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.1, dev-master)

MixedAssignment

lib/Service/GoogleContactsAPIService.php:218:6: MixedAssignment: Unable to determine the type that $prefix is being assigned to (see https://psalm.dev/032)

Check failure on line 218 in lib/Service/GoogleContactsAPIService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.1, dev-master)

MixedArrayAccess

lib/Service/GoogleContactsAPIService.php:218:16: MixedArrayAccess: Cannot access array value on mixed variable $n (see https://psalm.dev/051)

Check failure on line 218 in lib/Service/GoogleContactsAPIService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.0, v26.x.x)

MixedAssignment

lib/Service/GoogleContactsAPIService.php:218:6: MixedAssignment: Unable to determine the type that $prefix is being assigned to (see https://psalm.dev/032)

Check failure on line 218 in lib/Service/GoogleContactsAPIService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.0, v26.x.x)

MixedArrayAccess

lib/Service/GoogleContactsAPIService.php:218:16: MixedArrayAccess: Cannot access array value on mixed variable $n (see https://psalm.dev/051)
$suffix = $n['honorificSuffix'] ?? '';

Check failure on line 219 in lib/Service/GoogleContactsAPIService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.1, dev-master)

MixedAssignment

lib/Service/GoogleContactsAPIService.php:219:6: MixedAssignment: Unable to determine the type that $suffix is being assigned to (see https://psalm.dev/032)

Check failure on line 219 in lib/Service/GoogleContactsAPIService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.1, dev-master)

MixedArrayAccess

lib/Service/GoogleContactsAPIService.php:219:16: MixedArrayAccess: Cannot access array value on mixed variable $n (see https://psalm.dev/051)

Check failure on line 219 in lib/Service/GoogleContactsAPIService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.0, v26.x.x)

MixedAssignment

lib/Service/GoogleContactsAPIService.php:219:6: MixedAssignment: Unable to determine the type that $suffix is being assigned to (see https://psalm.dev/032)

Check failure on line 219 in lib/Service/GoogleContactsAPIService.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.0, v26.x.x)

MixedArrayAccess

lib/Service/GoogleContactsAPIService.php:219:16: MixedArrayAccess: Cannot access array value on mixed variable $n (see https://psalm.dev/051)
if ($familyName || $firstName || $additionalName || $prefix || $suffix) {
$prop = $vCard->createProperty('N', [0 => $familyName, 1 => $firstName, 2 => $additionalName, 3 => $prefix, 4 => $suffix]);
$vCard->add($prop);
}
break;
Expand Down

0 comments on commit 6ce9d4b

Please sign in to comment.