]> git.mxchange.org Git - friendica.git/commitdiff
Fix code style
authorArt4 <art4@wlabs.de>
Mon, 3 Feb 2025 13:59:58 +0000 (13:59 +0000)
committerArt4 <art4@wlabs.de>
Mon, 3 Feb 2025 13:59:58 +0000 (13:59 +0000)
src/Core/Addon/AddonHelper.php
src/Module/Admin/Addons/Index.php
src/Module/Admin/Summary.php

index 7d71dd0e33eceaf5b4aa09bb1f83cb2fe1559a4c..6088886ee6e110e035cbd9fe3664b851dcbea64b 100644 (file)
@@ -19,14 +19,14 @@ interface AddonHelper
         */
        public function isEnabled(string $addonId): bool;
 
-    /**
+       /**
         * Returns a list with the IDs of the enabled addons
         *
         * @return string[]
         */
        public function getEnabledList(): array;
 
-    /**
+       /**
         * Returns the list of the IDs of the non-hidden enabled addons
         *
         * @return string[]
index c39ac0999a8b87ac687c08e3ad1d6d7da1cd8bb9..5941d76ff642a85cd92cb95c2ef398d820e5cfa8 100644 (file)
@@ -34,7 +34,7 @@ class Index extends BaseAdmin
                                        DI::sysmsg()->addInfo(DI::l10n()->t('Addons reloaded'));
                                        break;
 
-                               case 'toggle' :
+                               case 'toggle':
                                        $addonHelper = DI::addonHelper();
 
                                        $addon = $_GET['addon'] ?? '';
@@ -58,14 +58,14 @@ class Index extends BaseAdmin
 
                $t = Renderer::getMarkupTemplate('admin/addons/index.tpl');
                return Renderer::replaceMacros($t, [
-                       '$title' => DI::l10n()->t('Administration'),
-                       '$page' => DI::l10n()->t('Addons'),
-                       '$submit' => DI::l10n()->t('Save Settings'),
-                       '$reload' => DI::l10n()->t('Reload active addons'),
-                       '$function' => 'addons',
-                       '$addons' => $addons,
-                       '$pcount' => count($addons),
-                       '$noplugshint' => DI::l10n()->t('There are currently no addons available on your node. You can find the official addon repository at %1$s.', 'https://git.friendi.ca/friendica/friendica-addons'),
+                       '$title'               => DI::l10n()->t('Administration'),
+                       '$page'                => DI::l10n()->t('Addons'),
+                       '$submit'              => DI::l10n()->t('Save Settings'),
+                       '$reload'              => DI::l10n()->t('Reload active addons'),
+                       '$function'            => 'addons',
+                       '$addons'              => $addons,
+                       '$pcount'              => count($addons),
+                       '$noplugshint'         => DI::l10n()->t('There are currently no addons available on your node. You can find the official addon repository at %1$s.', 'https://git.friendi.ca/friendica/friendica-addons'),
                        '$form_security_token' => self::getFormSecurityToken('admin_addons'),
                ]);
        }
index 9907694ac58c9621d4f1ae67dae553c2843be9a4..9b09843d969067e9fdee406f84371ad57fe6d049 100644 (file)
@@ -8,7 +8,6 @@
 namespace Friendica\Module\Admin;
 
 use Friendica\App;
-use Friendica\Core\Addon;
 use Friendica\Core\Config\ValueObject\Cache;
 use Friendica\Core\Renderer;
 use Friendica\Core\Update;
@@ -33,7 +32,7 @@ class Summary extends BaseAdmin
                $warningtext = [];
 
                $templateEngine = Renderer::getTemplateEngine();
-               $errors = [];
+               $errors         = [];
                $templateEngine->testInstall($errors);
                foreach ($errors as $error) {
                        $warningtext[] = DI::l10n()->t('Template engine (%s) error: %s', $templateEngine::$name, $error);
@@ -51,7 +50,7 @@ class Summary extends BaseAdmin
                // Avoid the database error 1615 "Prepared statement needs to be re-prepared", see https://github.com/friendica/friendica/issues/8550
                if (!DI::config()->get('database', 'pdo_emulate_prepares')) {
                        $table_definition_cache = DBA::getVariable('table_definition_cache');
-                       $table_open_cache = DBA::getVariable('table_open_cache');
+                       $table_open_cache       = DBA::getVariable('table_open_cache');
                        if (!empty($table_definition_cache) && !empty($table_open_cache)) {
                                $suggested_definition_cache = min(400 + round((int) $table_open_cache / 2, 1), 2000);
                                if ($suggested_definition_cache > $table_definition_cache) {
@@ -100,9 +99,13 @@ class Summary extends BaseAdmin
 
                // Check server vitality
                if (!self::checkSelfHostMeta()) {
-                       $well_known = DI::baseUrl() . Probe::HOST_META;
-                       $warningtext[] = DI::l10n()->t('<a href="%s">%s</a> is not reachable on your system. This is a severe configuration issue that prevents server to server communication. See <a href="%s">the installation page</a> for help.',
-                               $well_known, $well_known, DI::baseUrl() . '/help/Install');
+                       $well_known    = DI::baseUrl() . Probe::HOST_META;
+                       $warningtext[] = DI::l10n()->t(
+                               '<a href="%s">%s</a> is not reachable on your system. This is a severe configuration issue that prevents server to server communication. See <a href="%s">the installation page</a> for help.',
+                               $well_known,
+                               $well_known,
+                               DI::baseUrl() . '/help/Install'
+                       );
                }
 
                // Check logfile permission
@@ -115,7 +118,7 @@ class Summary extends BaseAdmin
 
                // check legacy basepath settings
                $configLoader = (new Config())->createConfigFileManager($basePath, $_SERVER);
-               $configCache = new Cache();
+               $configCache  = new Cache();
                $configLoader->setupCache($configCache);
                $confBasepath = $configCache->get('system', 'basepath');
                $currBasepath = DI::config()->get('system', 'basepath');
@@ -125,25 +128,31 @@ class Summary extends BaseAdmin
                                        'from' => $currBasepath,
                                        'to'   => $confBasepath,
                                ]);
-                               $warningtext[] = DI::l10n()->t('Friendica\'s system.basepath was updated from \'%s\' to \'%s\'. Please remove the system.basepath from your db to avoid differences.',
+                               $warningtext[] = DI::l10n()->t(
+                                       'Friendica\'s system.basepath was updated from \'%s\' to \'%s\'. Please remove the system.basepath from your db to avoid differences.',
                                        $currBasepath,
-                                       $confBasepath);
+                                       $confBasepath
+                               );
                        } elseif (!is_dir($currBasepath)) {
                                DI::logger()->alert('Friendica\'s system.basepath is wrong.', [
                                        'from' => $currBasepath,
                                        'to'   => $confBasepath,
                                ]);
-                               $warningtext[] = DI::l10n()->t('Friendica\'s current system.basepath \'%s\' is wrong and the config file \'%s\' isn\'t used.',
+                               $warningtext[] = DI::l10n()->t(
+                                       'Friendica\'s current system.basepath \'%s\' is wrong and the config file \'%s\' isn\'t used.',
                                        $currBasepath,
-                                       $confBasepath);
+                                       $confBasepath
+                               );
                        } else {
                                DI::logger()->alert('Friendica\'s system.basepath is wrong.', [
                                        'from' => $currBasepath,
                                        'to'   => $confBasepath,
                                ]);
-                               $warningtext[] = DI::l10n()->t('Friendica\'s current system.basepath \'%s\' is not equal to the config file \'%s\'. Please fix your configuration.',
+                               $warningtext[] = DI::l10n()->t(
+                                       'Friendica\'s current system.basepath \'%s\' is not equal to the config file \'%s\'. Please fix your configuration.',
                                        $currBasepath,
-                                       $confBasepath);
+                                       $confBasepath
+                               );
                        }
                }