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:
parent
7a4ba43b4d
commit
fb44afd7ad
15 changed files with 104 additions and 90 deletions
|
@ -4,6 +4,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Services\Micropub;
|
||||
|
||||
use Illuminate\Support\Arr;
|
||||
use App\Services\{BookmarkService, LikeService, NoteService};
|
||||
|
||||
class HEntryService
|
||||
|
@ -17,13 +18,13 @@ class HEntryService
|
|||
*/
|
||||
public function process(array $request, ?string $client = null): ?string
|
||||
{
|
||||
if (array_get($request, 'properties.like-of') || array_get($request, 'like-of')) {
|
||||
if (Arr::get($request, 'properties.like-of') || Arr::get($request, 'like-of')) {
|
||||
$like = resolve(LikeService::class)->createLike($request);
|
||||
|
||||
return $like->longurl;
|
||||
}
|
||||
|
||||
if (array_get($request, 'properties.bookmark-of') || array_get($request, 'bookmark-of')) {
|
||||
if (Arr::get($request, 'properties.bookmark-of') || Arr::get($request, 'bookmark-of')) {
|
||||
$bookmark = resolve(BookmarkService::class)->createBookmark($request);
|
||||
|
||||
return $bookmark->longurl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue