fix formatting issues

This commit is contained in:
Matthew Exon 2021-05-03 20:17:43 +02:00
parent ba4492ea81
commit 05481cab3d

View File

@ -23,7 +23,6 @@ namespace Friendica\Console;
use Console_Table; use Console_Table;
use Friendica\App; use Friendica\App;
use Friendica\Content\Pager;
use Friendica\Model\Contact as ContactModel; use Friendica\Model\Contact as ContactModel;
use Friendica\Model\User as UserModel; use Friendica\Model\User as UserModel;
use Friendica\Util\Temporal; use Friendica\Util\Temporal;
@ -169,8 +168,7 @@ HELP;
if ($result['success']) { if ($result['success']) {
$this->out('User ' . $user['nickname'] . ' now connected to ' . $url . ', contact ID ' . $result['cid']); $this->out('User ' . $user['nickname'] . ' now connected to ' . $url . ', contact ID ' . $result['cid']);
} } else {
else {
throw new RuntimeException($result['message']); throw new RuntimeException($result['message']);
} }
} }
@ -246,7 +244,7 @@ HELP;
$table = new Console_Table(); $table = new Console_Table();
$table->setHeaders(['ID', 'UID', 'Network', 'Name', 'Nick', 'URL', 'E-Mail', 'Created', 'Updated', 'Blocked', 'Deleted']); $table->setHeaders(['ID', 'UID', 'Network', 'Name', 'Nick', 'URL', 'E-Mail', 'Created', 'Updated', 'Blocked', 'Deleted']);
$addRow = function($row) use (&$table) { $addRow = function ($row) use (&$table) {
$table->addRow([ $table->addRow([
$row['id'], $row['id'],
$row['uid'], $row['uid'],
@ -263,7 +261,7 @@ HELP;
}; };
switch ($subCmd) { switch ($subCmd) {
case 'id': case 'id':
$cid = $this->getArgument(2); $cid = $this->getArgument(2);
$contact = ContactModel::getById($cid, $fields); $contact = ContactModel::getById($cid, $fields);
if (!empty($contact)) { if (!empty($contact)) {
$addRow($contact); $addRow($contact);
@ -271,7 +269,7 @@ HELP;
break; break;
case 'url': case 'url':
$user = $this->getUserByNick(2); $user = $this->getUserByNick(2);
$url = $this->getArgument(3); $url = $this->getArgument(3);
$contact = ContactModel::getByURLForUser($url, $user['uid'], false, $fields); $contact = ContactModel::getByURLForUser($url, $user['uid'], false, $fields);
if (!empty($contact)) { if (!empty($contact)) {
$addRow($contact); $addRow($contact);