Fix code style

This commit is contained in:
Art4 2025-02-04 07:00:09 +00:00
parent 776781e522
commit db37a93efa
4 changed files with 13 additions and 13 deletions

View file

@ -19,7 +19,7 @@ interface AddonHelper
* This list is made from scanning the addon/ folder. * This list is made from scanning the addon/ folder.
* Unsupported addons are excluded unless they already are enabled or system.show_unsupported_addon is set. * Unsupported addons are excluded unless they already are enabled or system.show_unsupported_addon is set.
* *
* @return array<array<string|bool|array>> * @return array<array<string|string|array>>
*/ */
public function getAvailableAddons(): array; public function getAvailableAddons(): array;

View file

@ -23,7 +23,7 @@ final class AddonProxy implements AddonHelper
* This list is made from scanning the addon/ folder. * This list is made from scanning the addon/ folder.
* Unsupported addons are excluded unless they already are enabled or system.show_unsupported_addon is set. * Unsupported addons are excluded unless they already are enabled or system.show_unsupported_addon is set.
* *
* @return array<array<string|bool|array>> * @return array<array<string|string|array>>
*/ */
public function getAvailableAddons(): array public function getAvailableAddons(): array
{ {

View file

@ -11,7 +11,6 @@ use Friendica\App;
use Friendica\App\Arguments; use Friendica\App\Arguments;
use Friendica\App\BaseURL; use Friendica\App\BaseURL;
use Friendica\BaseModule; use Friendica\BaseModule;
use Friendica\Core\Addon;
use Friendica\Core\Addon\AddonHelper; use Friendica\Core\Addon\AddonHelper;
use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\Config\Capability\IManageConfigValues;
use Friendica\Core\Hook; use Friendica\Core\Hook;
@ -44,9 +43,9 @@ class Friendica extends BaseModule
{ {
parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
$this->config = $config; $this->config = $config;
$this->keyValue = $keyValue; $this->keyValue = $keyValue;
$this->session = $session; $this->session = $session;
$this->addonHelper = $addonHelper; $this->addonHelper = $addonHelper;
} }
@ -86,8 +85,8 @@ class Friendica extends BaseModule
if (!empty($blockList) && ($this->config->get('blocklist', 'public') || $this->session->isAuthenticated())) { if (!empty($blockList) && ($this->config->get('blocklist', 'public') || $this->session->isAuthenticated())) {
$blocked = [ $blocked = [
'title' => $this->t('On this server the following remote servers are blocked.'), 'title' => $this->t('On this server the following remote servers are blocked.'),
'header' => [ 'header' => [
$this->t('Blocked domain'), $this->t('Blocked domain'),
$this->t('Reason for the block'), $this->t('Reason for the block'),
], ],
@ -105,11 +104,13 @@ class Friendica extends BaseModule
$tpl = Renderer::getMarkupTemplate('friendica.tpl'); $tpl = Renderer::getMarkupTemplate('friendica.tpl');
return Renderer::replaceMacros($tpl, [ return Renderer::replaceMacros($tpl, [
'about' => $this->t('This is Friendica, version %s that is running at the web location %s. The database version is %s, the post update version is %s.', 'about' => $this->t(
'This is Friendica, version %s that is running at the web location %s. The database version is %s, the post update version is %s.',
'<strong>' . App::VERSION . '</strong>', '<strong>' . App::VERSION . '</strong>',
$this->baseUrl, $this->baseUrl,
'<strong>' . $this->config->get('system', 'build') . '/' . DB_UPDATE_VERSION . '</strong>', '<strong>' . $this->config->get('system', 'build') . '/' . DB_UPDATE_VERSION . '</strong>',
'<strong>' . $this->keyValue->get('post_update_version') . '/' . PostUpdate::VERSION . '</strong>'), '<strong>' . $this->keyValue->get('post_update_version') . '/' . PostUpdate::VERSION . '</strong>'
),
'friendica' => $this->t('Please visit <a href="https://friendi.ca">Friendi.ca</a> to learn more about the Friendica project.'), 'friendica' => $this->t('Please visit <a href="https://friendi.ca">Friendi.ca</a> to learn more about the Friendica project.'),
'bugs' => $this->t('Bug reports and issues: please visit') . ' ' . '<a href="https://github.com/friendica/friendica/issues?state=open">' . $this->t('the bugtracker at github') . '</a>', 'bugs' => $this->t('Bug reports and issues: please visit') . ' ' . '<a href="https://github.com/friendica/friendica/issues?state=open">' . $this->t('the bugtracker at github') . '</a>',
'info' => $this->t('Suggestions, praise, etc. - please email "info" at "friendi - dot - ca'), 'info' => $this->t('Suggestions, praise, etc. - please email "info" at "friendi - dot - ca'),
@ -151,7 +152,7 @@ class Friendica extends BaseModule
$register_policy = $register_policies[$register_policy_int]; $register_policy = $register_policies[$register_policy_int];
} }
$admin = []; $admin = [];
$administrator = User::getFirstAdmin(['username', 'nickname']); $administrator = User::getFirstAdmin(['username', 'nickname']);
if (!empty($administrator)) { if (!empty($administrator)) {
$admin = [ $admin = [
@ -164,7 +165,7 @@ class Friendica extends BaseModule
$this->config->reload(); $this->config->reload();
$locked_features = []; $locked_features = [];
$featureLocks = $this->config->get('config', 'feature_lock'); $featureLocks = $this->config->get('config', 'feature_lock');
if (isset($featureLocks)) { if (isset($featureLocks)) {
foreach ($featureLocks as $feature => $lock) { foreach ($featureLocks as $feature => $lock) {
if ($feature === 'config_loaded') { if ($feature === 'config_loaded') {

View file

@ -8,7 +8,6 @@
namespace Friendica\Protocol; namespace Friendica\Protocol;
use Friendica\App; use Friendica\App;
use Friendica\Core\Addon;
use Friendica\DI; use Friendica\DI;
use Friendica\Module; use Friendica\Module;
use Friendica\Module\Register; use Friendica\Module\Register;