mirror of
https://github.com/friendica/friendica
synced 2025-04-29 19:44:22 +02:00
Cleanup Code
This commit is contained in:
parent
263774eb46
commit
d4387d45ee
18 changed files with 86 additions and 78 deletions
|
@ -44,11 +44,11 @@ class Application extends BaseFactory
|
|||
*
|
||||
* @throws InternalServerErrorException
|
||||
*/
|
||||
public function createFromApplicationId(int $id)
|
||||
public function createFromApplicationId(int $id): \Friendica\Object\Api\Mastodon\Application
|
||||
{
|
||||
$application = $this->dba->selectFirst('application', ['client_id', 'client_secret', 'id', 'name', 'redirect_uri', 'website'], ['id' => $id]);
|
||||
if (!$this->dba->isResult($application)) {
|
||||
return [];
|
||||
throw new InternalServerErrorException(sprintf("ID '%s' not found", $id));
|
||||
}
|
||||
|
||||
return new \Friendica\Object\Api\Mastodon\Application(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue