Remove deprecated global helper functions (issue #99)

Squashed commit of the following:

commit 8ff29a8ab51ee5057ef786614ab95b005bf8918c
Author: Jonny Barnes <jonny@jonnybarnes.uk>
Date:   Fri Feb 1 18:42:05 2019 +0000

    Replace deprecated global helpers with their facade equivalents
This commit is contained in:
Jonny Barnes 2019-02-01 18:49:35 +00:00
parent 7a4ba43b4d
commit fb44afd7ad
15 changed files with 104 additions and 90 deletions

View file

@ -7,6 +7,7 @@ namespace App\Http\Controllers\Admin;
use GuzzleHttp\Client;
use App\Models\Contact;
use Illuminate\View\View;
use Illuminate\Support\Arr;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Filesystem\Filesystem;
@ -137,8 +138,8 @@ class ContactsController extends Controller
}
$mf2 = \Mf2\parse((string) $response->getBody(), $contact->homepage);
foreach ($mf2['items'] as $microformat) {
if (array_get($microformat, 'type.0') == 'h-card') {
$avatarURL = array_get($microformat, 'properties.photo.0');
if (Arr::get($microformat, 'type.0') == 'h-card') {
$avatarURL = Arr::get($microformat, 'properties.photo.0');
break;
}
}