Update Laravel to v12
Some checks failed
PHP Unit / PHPUnit test suite (pull_request) Has been cancelled
Laravel Pint / Laravel Pint (pull_request) Has been cancelled

This commit is contained in:
Jonny Barnes 2025-03-01 15:00:41 +00:00
parent f2025b801b
commit 1dfa17abca
Signed by: jonny
SSH key fingerprint: SHA256:CTuSlns5U7qlD9jqHvtnVmfYV3Zwl2Z7WnJ4/dqOaL8
83 changed files with 1324 additions and 2323 deletions

View file

@ -21,7 +21,7 @@ class BookmarkService extends Service
public function create(array $request, ?string $client = null): Bookmark
{
if (Arr::get($request, 'properties.bookmark-of.0')) {
//micropub request
// micropub request
$url = normalize_url(Arr::get($request, 'properties.bookmark-of.0'));
$name = Arr::get($request, 'properties.name.0');
$content = Arr::get($request, 'properties.content.0');
@ -61,7 +61,7 @@ class BookmarkService extends Service
try {
$response = $client->request('GET', 'https://web.archive.org/save/' . $url);
} catch (ClientException $e) {
//throw an exception to be caught
// throw an exception to be caught
throw new InternetArchiveException;
}
if ($response->hasHeader('Content-Location')) {
@ -70,7 +70,7 @@ class BookmarkService extends Service
}
}
//throw an exception to be caught
// throw an exception to be caught
throw new InternetArchiveException;
}
}

View file

@ -16,7 +16,7 @@ class LikeService extends Service
public function create(array $request, ?string $client = null): Like
{
if (Arr::get($request, 'properties.like-of.0')) {
//micropub request
// micropub request
$url = normalize_url(Arr::get($request, 'properties.like-of.0'));
}
if (Arr::get($request, 'like-of')) {

View file

@ -20,7 +20,7 @@ class UpdateService
{
$urlPath = parse_url(Arr::get($request, 'url'), PHP_URL_PATH);
//is it a note we are updating?
// is it a note we are updating?
if (mb_substr($urlPath, 1, 5) !== 'notes') {
return response()->json([
'error' => 'invalid',
@ -37,7 +37,7 @@ class UpdateService
], 404);
}
//got the note, are we dealing with a “replace” request?
// got the note, are we dealing with a “replace” request?
if (Arr::get($request, 'replace')) {
foreach (Arr::get($request, 'replace') as $property => $value) {
if ($property === 'content') {
@ -64,7 +64,7 @@ class UpdateService
]);
}
//how about “add”
// how about “add”
if (Arr::get($request, 'add')) {
foreach (Arr::get($request, 'add') as $property => $value) {
if ($property === 'syndication') {

View file

@ -14,8 +14,8 @@ class PlaceService
*/
public function createPlace(array $data): Place
{
//obviously a place needs a lat/lng, but this could be sent in a geo-url
//if no geo array key, we assume the array already has lat/lng values
// obviously a place needs a lat/lng, but this could be sent in a geo-url
// if no geo array key, we assume the array already has lat/lng values
if (array_key_exists('geo', $data) && $data['geo'] !== null) {
preg_match_all(
'/([0-9\.\-]+)/',
@ -40,7 +40,7 @@ class PlaceService
*/
public function createPlaceFromCheckin(array $checkin): Place
{
//check if the place exists if from swarm
// check if the place exists if from swarm
if (Arr::has($checkin, 'properties.url')) {
$place = Place::whereExternalURL(Arr::get($checkin, 'properties.url.0'))->get();
if (count($place) === 1) {