Coding styles / "require_once" for removed file removed

This commit is contained in:
Michael 2022-01-16 09:01:04 +00:00
parent af18e2f2a9
commit 7c15d0160a
7 changed files with 13 additions and 17 deletions

View File

@ -63,14 +63,12 @@ class Show extends BaseApi
$user_element = 'users'; $user_element = 'users';
$k = 0; $k = 0;
foreach ($members as $member) { foreach ($members as $member) {
$user = DI::twitterUser()->createFromContactId($member['contact-id'], $uid, true)->toArray(); $users[$k++.':user'] = DI::twitterUser()->createFromContactId($member['contact-id'], $uid, true)->toArray();
$users[$k++.':user'] = $user;
} }
} else { } else {
$user_element = 'user'; $user_element = 'user';
foreach ($members as $member) { foreach ($members as $member) {
$user = DI::twitterUser()->createFromContactId($member['contact-id'], $uid, true)->toArray(); $users[] = DI::twitterUser()->createFromContactId($member['contact-id'], $uid, true)->toArray();
$users[] = $user;
} }
} }
$grps[] = ['name' => $rr['name'], 'gid' => $rr['id'], $user_element => $users]; $grps[] = ['name' => $rr['name'], 'gid' => $rr['id'], $user_element => $users];

View File

@ -57,7 +57,7 @@ class UpdateProfileImage extends BaseApi
} }
// output for client // output for client
$skip_status = $request['skip_status'] ?? false; $skip_status = filter_var($request['skip_status'] ?? false, FILTER_VALIDATE_BOOLEAN);
$user_info = DI::twitterUser()->createFromUserId($uid, $skip_status)->toArray(); $user_info = DI::twitterUser()->createFromUserId($uid, $skip_status)->toArray();

View File

@ -32,8 +32,6 @@ use Friendica\Util\Arrays;
use Friendica\Util\DateTimeFormat; use Friendica\Util\DateTimeFormat;
use Monolog\Handler\TestHandler; use Monolog\Handler\TestHandler;
require_once __DIR__ . '/../../include/api.php';
/** /**
* Tests for the API functions. * Tests for the API functions.
* *