Standards

This commit is contained in:
Michael 2021-11-24 23:24:35 +00:00
parent bd1306d020
commit 260ee13d07
4 changed files with 9 additions and 9 deletions

View File

@ -25,7 +25,7 @@ use Friendica\Module\BaseApi;
use Friendica\DI; use Friendica\DI;
/** /**
* Returns an HTTP 200 OK response code and a representation of the requesting user if authentication was successful; * Returns an HTTP 200 OK response code and a representation of the requesting user if authentication was successful;
* returns a 401 status code and an error message if not. * returns a 401 status code and an error message if not.
* *
* @see https://developer.twitter.com/en/docs/accounts-and-users/manage-account-settings/api-reference/get-account-verify_credentials * @see https://developer.twitter.com/en/docs/accounts-and-users/manage-account-settings/api-reference/get-account-verify_credentials

View File

@ -46,9 +46,9 @@ class Favorites extends BaseApi
// params // params
$since_id = $_REQUEST['since_id'] ?? 0; $since_id = $_REQUEST['since_id'] ?? 0;
$max_id = $_REQUEST['max_id'] ?? 0; $max_id = $_REQUEST['max_id'] ?? 0;
$count = $_GET['count'] ?? 20; $count = $_GET['count'] ?? 20;
$page = $_REQUEST['page'] ?? 1; $page = $_REQUEST['page'] ?? 1;
$start = max(0, ($page - 1) * $count); $start = max(0, ($page - 1) * $count);

View File

@ -43,10 +43,10 @@ class HomeTimeline extends BaseApi
// get last network messages // get last network messages
// params // params
$count = $_REQUEST['count'] ?? 20; $count = $_REQUEST['count'] ?? 20;
$page = $_REQUEST['page']?? 0; $page = $_REQUEST['page']?? 0;
$since_id = $_REQUEST['since_id'] ?? 0; $since_id = $_REQUEST['since_id'] ?? 0;
$max_id = $_REQUEST['max_id'] ?? 0; $max_id = $_REQUEST['max_id'] ?? 0;
$exclude_replies = !empty($_REQUEST['exclude_replies']); $exclude_replies = !empty($_REQUEST['exclude_replies']);
$conversation_id = $_REQUEST['conversation_id'] ?? 0; $conversation_id = $_REQUEST['conversation_id'] ?? 0;

View File

@ -69,7 +69,7 @@ class Mentions extends BaseApi
array_unshift($condition, $query); array_unshift($condition, $query);
$params = ['order' => ['id' => true], 'limit' => [$start, $count]]; $params = ['order' => ['id' => true], 'limit' => [$start, $count]];
$statuses = Post::selectForUser($uid, [], $condition, $params); $statuses = Post::selectForUser($uid, [], $condition, $params);
$include_entities = strtolower(($_REQUEST['include_entities'] ?? 'false') == 'true'); $include_entities = strtolower(($_REQUEST['include_entities'] ?? 'false') == 'true');