]> git.mxchange.org Git - friendica.git/commitdiff
Fix code style
authorArt4 <art4@wlabs.de>
Tue, 4 Feb 2025 15:21:14 +0000 (15:21 +0000)
committerArt4 <art4@wlabs.de>
Tue, 4 Feb 2025 15:21:14 +0000 (15:21 +0000)
src/Core/Addon/AddonProxy.php
src/Core/Config/Util/ConfigFileManager.php
src/Module/Admin/Addons/Index.php
src/Module/BaseAdmin.php
tests/Util/CreateDatabaseTrait.php
tests/src/Core/Config/Cache/ConfigFileManagerTest.php
tests/src/Core/Config/ConfigTest.php
tests/src/Core/Config/ConfigTransactionTest.php
tests/src/Core/Storage/Repository/StorageManagerTest.php
tests/src/Database/DatabaseTest.php

index 7cbf25d9d7e6497153e116045e127ae2ded92ccf..c3f7e583d80f71e597b54cb108e51ee2978b7ec7 100644 (file)
@@ -46,7 +46,7 @@ final class AddonProxy implements AddonHelper
        public function getAvailableAddons(): array
        {
                return array_map(
-                       function(array $item) {
+                       function (array $item) {
                                return $item[0];
                        },
                        Addon::getAvailableList()
index def31c4b8c68ac279472af0c738c97ee05fab7b0..d76e3e53cdf2f6509556838f72b2c7f6876ece26 100644 (file)
@@ -123,7 +123,7 @@ class ConfigFileManager
 
                if (file_exists($configName)) {
                        return $this->loadConfigFile($configName);
-               } else if (file_exists($iniName)) {
+               } elseif (file_exists($iniName)) {
                        return $this->loadINIConfigFile($iniName);
                } else {
                        return [];
index 6bc0d0fa1dc5996017abe1ffda0683b0d74f8cfb..6038373018f20533d5fe81430f46c9a404c969e6 100644 (file)
@@ -60,9 +60,9 @@ class Index extends BaseAdmin
                        $addonInfo = $addonHelper->getAddonInfo($addonId);
 
                        $info = [
-                               'name' => $addonInfo->getName(),
+                               'name'        => $addonInfo->getName(),
                                'description' => $addonInfo->getDescription(),
-                               'version' => $addonInfo->getVersion(),
+                               'version'     => $addonInfo->getVersion(),
                        ];
 
                        $addons[] = [
index 2bede256b2d66d378565d8a8c7cd769e50a85feb..ea03efd2a9159deebc9080df9c8d2ec201cf8493 100644 (file)
@@ -68,32 +68,32 @@ abstract class BaseAdmin extends BaseModule
                // not part of $aside to make the template more adjustable
                $aside_sub = [
                        'information' => [DI::l10n()->t('Information'), [
-                               'overview'     => ['admin'             , DI::l10n()->t('Overview')                , 'overview'],
-                               'federation'   => ['admin/federation'  , DI::l10n()->t('Federation Statistics')   , 'federation']
+                               'overview'   => ['admin'             , DI::l10n()->t('Overview')                , 'overview'],
+                               'federation' => ['admin/federation'  , DI::l10n()->t('Federation Statistics')   , 'federation']
                        ]],
                        'configuration' => [DI::l10n()->t('Configuration'), [
-                               'site'         => ['admin/site'        , DI::l10n()->t('Site')                    , 'site'],
-                               'storage'      => ['admin/storage'     , DI::l10n()->t('Storage')                 , 'storage'],
-                               'addons'       => ['admin/addons'      , DI::l10n()->t('Addons')                  , 'addons'],
-                               'themes'       => ['admin/themes'      , DI::l10n()->t('Themes')                  , 'themes'],
-                               'features'     => ['admin/features'    , DI::l10n()->t('Additional features')     , 'features'],
-                               'tos'          => ['admin/tos'         , DI::l10n()->t('Terms of Service')        , 'tos'],
+                               'site'     => ['admin/site'        , DI::l10n()->t('Site')                    , 'site'],
+                               'storage'  => ['admin/storage'     , DI::l10n()->t('Storage')                 , 'storage'],
+                               'addons'   => ['admin/addons'      , DI::l10n()->t('Addons')                  , 'addons'],
+                               'themes'   => ['admin/themes'      , DI::l10n()->t('Themes')                  , 'themes'],
+                               'features' => ['admin/features'    , DI::l10n()->t('Additional features')     , 'features'],
+                               'tos'      => ['admin/tos'         , DI::l10n()->t('Terms of Service')        , 'tos'],
                        ]],
                        'database' => [DI::l10n()->t('Database'), [
-                               'dbsync'       => ['admin/dbsync'      , DI::l10n()->t('DB updates')              , 'dbsync'],
-                               'deferred'     => ['admin/queue/deferred', DI::l10n()->t('Inspect Deferred Workers'), 'deferred'],
-                               'workerqueue'  => ['admin/queue'       , DI::l10n()->t('Inspect worker Queue')    , 'workerqueue'],
+                               'dbsync'      => ['admin/dbsync'      , DI::l10n()->t('DB updates')              , 'dbsync'],
+                               'deferred'    => ['admin/queue/deferred', DI::l10n()->t('Inspect Deferred Workers'), 'deferred'],
+                               'workerqueue' => ['admin/queue'       , DI::l10n()->t('Inspect worker Queue')    , 'workerqueue'],
                        ]],
                        'logs' => [DI::l10n()->t('Logs'), [
-                               'logsconfig'   => ['admin/logs/', DI::l10n()->t('Logs')                           , 'logs'],
-                               'logsview'     => ['admin/logs/view'    , DI::l10n()->t('View Logs')              , 'viewlogs'],
+                               'logsconfig' => ['admin/logs/', DI::l10n()->t('Logs')                           , 'logs'],
+                               'logsview'   => ['admin/logs/view'    , DI::l10n()->t('View Logs')              , 'viewlogs'],
                        ]],
                        'diagnostics' => [DI::l10n()->t('Diagnostics'), [
-                               'phpinfo'      => ['admin/phpinfo?t=' . self::getFormSecurityToken('phpinfo'), DI::l10n()->t('PHP Info')                , 'phpinfo'],
-                               'probe'        => ['probe'             , DI::l10n()->t('probe address')           , 'probe'],
-                               'webfinger'    => ['webfinger'         , DI::l10n()->t('check webfinger')         , 'webfinger'],
-                               'babel'        => ['babel'             , DI::l10n()->t('Babel')                   , 'babel'],
-                               'debug/ap'     => ['debug/ap'          , DI::l10n()->t('ActivityPub Conversion')  , 'debug/ap'],
+                               'phpinfo'   => ['admin/phpinfo?t=' . self::getFormSecurityToken('phpinfo'), DI::l10n()->t('PHP Info')                , 'phpinfo'],
+                               'probe'     => ['probe'             , DI::l10n()->t('probe address')           , 'probe'],
+                               'webfinger' => ['webfinger'         , DI::l10n()->t('check webfinger')         , 'webfinger'],
+                               'babel'     => ['babel'             , DI::l10n()->t('Babel')                   , 'babel'],
+                               'debug/ap'  => ['debug/ap'          , DI::l10n()->t('ActivityPub Conversion')  , 'debug/ap'],
                        ]],
                ];
 
@@ -109,12 +109,12 @@ abstract class BaseAdmin extends BaseModule
 
                $t = Renderer::getMarkupTemplate('admin/aside.tpl');
                DI::page()['aside'] .= Renderer::replaceMacros($t, [
-                       '$admin' => ['addons_admin' => $addons_admin],
-                       '$subpages' => $aside_sub,
-                       '$admtxt' => DI::l10n()->t('Admin'),
+                       '$admin'      => ['addons_admin' => $addons_admin],
+                       '$subpages'   => $aside_sub,
+                       '$admtxt'     => DI::l10n()->t('Admin'),
                        '$plugadmtxt' => DI::l10n()->t('Addon Features'),
-                       '$h_pending' => DI::l10n()->t('User registrations waiting for confirmation'),
-                       '$admurl' => 'admin/'
+                       '$h_pending'  => DI::l10n()->t('User registrations waiting for confirmation'),
+                       '$admurl'     => 'admin/'
                ]);
 
                return '';
index bae22a9e79007c28ae0bb5ddcf8f9d035cd1349e..05d3d6c0ca5632a8bcbf21dd01a2f6986d9c25ba 100644 (file)
@@ -15,8 +15,6 @@ use Friendica\Database\Definition\DbaDefinition;
 use Friendica\Database\Definition\ViewDefinition;
 use Friendica\Test\DatabaseTestTrait;
 use Friendica\Test\Util\Database\StaticDatabase;
-use Friendica\Util\Profiler;
-use Psr\Log\NullLogger;
 
 trait CreateDatabaseTrait
 {
@@ -38,7 +36,7 @@ trait CreateDatabaseTrait
                        $this->root->url() . '/config',
                        $this->root->url() . '/static'
                );
-               $config            = new ReadOnlyFileConfig(new Cache([
+               $config = new ReadOnlyFileConfig(new Cache([
                        'database' => [
                                'disable_pdo' => true
                        ],
index 098f8c3e74788cab23a1a9b338585d0dbc9f8f5f..6ccfc9733c76deea80ec01bb5c455dca3a07f3c9 100644 (file)
@@ -66,7 +66,7 @@ class ConfigFileManagerTest extends MockedTestCase
                        $this->root->url() . DIRECTORY_SEPARATOR . Config::CONFIG_DIR,
                        $this->root->url() . DIRECTORY_SEPARATOR . Config::STATIC_DIR
                );
-               $configCache      = new Cache();
+               $configCache = new Cache();
 
                $configFileLoader->setupCache($configCache);
        }
@@ -96,7 +96,7 @@ class ConfigFileManagerTest extends MockedTestCase
                        $this->root->url() . DIRECTORY_SEPARATOR . Config::CONFIG_DIR,
                        $this->root->url() . DIRECTORY_SEPARATOR . Config::STATIC_DIR
                );
-               $configCache      = new Cache();
+               $configCache = new Cache();
 
                $configFileLoader->setupCache($configCache);
 
@@ -134,7 +134,7 @@ class ConfigFileManagerTest extends MockedTestCase
                        $this->root->url() . DIRECTORY_SEPARATOR . Config::CONFIG_DIR,
                        $this->root->url() . DIRECTORY_SEPARATOR . Config::STATIC_DIR
                );
-               $configCache      = new Cache();
+               $configCache = new Cache();
 
                $configFileLoader->setupCache($configCache);
 
@@ -171,7 +171,7 @@ class ConfigFileManagerTest extends MockedTestCase
                        $this->root->url() . DIRECTORY_SEPARATOR . Config::CONFIG_DIR,
                        $this->root->url() . DIRECTORY_SEPARATOR . Config::STATIC_DIR
                );
-               $configCache      = new Cache();
+               $configCache = new Cache();
 
                $configFileLoader->setupCache($configCache);
 
@@ -264,7 +264,7 @@ class ConfigFileManagerTest extends MockedTestCase
                        $this->root->url() . DIRECTORY_SEPARATOR . Config::CONFIG_DIR,
                        $this->root->url() . DIRECTORY_SEPARATOR . Config::STATIC_DIR
                );
-               $configCache      = new Cache();
+               $configCache = new Cache();
 
                $configFileLoader->setupCache($configCache);
 
@@ -299,7 +299,7 @@ class ConfigFileManagerTest extends MockedTestCase
                        $this->root->url() . DIRECTORY_SEPARATOR . Config::CONFIG_DIR,
                        $this->root->url() . DIRECTORY_SEPARATOR . Config::STATIC_DIR
                );
-               $configCache      = new Cache();
+               $configCache = new Cache();
 
                $configFileLoader->setupCache($configCache);
 
@@ -355,7 +355,7 @@ class ConfigFileManagerTest extends MockedTestCase
                        $this->root->url() . '/addon',
                        ['FRIENDICA_CONFIG_DIR' => '/a/wrong/dir/'],
                );
-               $configCache       = new Cache();
+               $configCache = new Cache();
 
                $configFileManager->setupCache($configCache);
 
@@ -385,7 +385,7 @@ class ConfigFileManagerTest extends MockedTestCase
                        $this->root->url() . '/addon',
                        ['FRIENDICA_CONFIG_DIR' => $this->root->getChild('config2')->url()],
                );
-               $configCache       = new Cache();
+               $configCache = new Cache();
 
                $configFileManager->setupCache($configCache);
 
@@ -407,7 +407,7 @@ class ConfigFileManagerTest extends MockedTestCase
                        $this->root->url(),
                        $this->root->url() . '/addon',
                );
-               $configCache       = new Cache();
+               $configCache = new Cache();
 
                $configFileManager->setupCache($configCache);
        }
index 079c39eb6600f43df32a1e826dcca145f4e0e94d..fc2c41a16440acac1d251cd7c0f0e7427d9971be 100644 (file)
@@ -16,7 +16,6 @@ use Friendica\Core\Config\ValueObject\Cache;
 use Friendica\Test\DatabaseTestCase;
 use Friendica\Test\Util\CreateDatabaseTrait;
 use Friendica\Test\Util\VFSTrait;
-use org\bovigo\vfs\vfsStream;
 
 class ConfigTest extends DatabaseTestCase
 {
@@ -55,7 +54,7 @@ class ConfigTest extends DatabaseTestCase
 
                parent::setUp();
 
-               $this->configCache = new Cache();
+               $this->configCache       = new Cache();
                $this->configFileManager = new ConfigFileManager(
                        $this->root->url(),
                        $this->root->url() . '/addon',
@@ -99,7 +98,7 @@ class ConfigTest extends DatabaseTestCase
                                'key1' => 'value1a',
                                'key4' => 'value4',
                        ],
-                       'other'  => [
+                       'other' => [
                                'key5' => 'value5',
                                'key6' => 'value6',
                        ],
@@ -113,18 +112,18 @@ class ConfigTest extends DatabaseTestCase
                                        'config',
                                        'other'
                                ],
-                               'load'         => [
+                               'load' => [
                                        'system',
                                ],
                        ],
-                       'other'  => [
+                       'other' => [
                                'data'         => $data,
                                'possibleCats' => [
                                        'system',
                                        'config',
                                        'other'
                                ],
-                               'load'         => [
+                               'load' => [
                                        'other',
                                ],
                        ],
@@ -135,18 +134,18 @@ class ConfigTest extends DatabaseTestCase
                                        'config',
                                        'other'
                                ],
-                               'load'         => [
+                               'load' => [
                                        'config',
                                ],
                        ],
-                       'all'    => [
+                       'all' => [
                                'data'         => $data,
                                'possibleCats' => [
                                        'system',
                                        'config',
                                        'other'
                                ],
-                               'load'         => [
+                               'load' => [
                                        'system',
                                        'config',
                                        'other'
@@ -178,7 +177,7 @@ class ConfigTest extends DatabaseTestCase
         */
        public function testSetUp(array $data)
        {
-               $this->loadDirectFixture($this->configToDbArray($data) , $this->getDbInstance());
+               $this->loadDirectFixture($this->configToDbArray($data), $this->getDbInstance());
 
                $this->testedConfig = $this->getInstance();
                self::assertInstanceOf(Cache::class, $this->testedConfig->getCache());
@@ -214,13 +213,13 @@ class ConfigTest extends DatabaseTestCase
        {
                return [
                        'config' => [
-                               'data1'  => [
+                               'data1' => [
                                        'config' => [
                                                'key1' => 'value1',
                                                'key2' => 'value2',
                                        ],
                                ],
-                               'data2'  => [
+                               'data2' => [
                                        'config' => [
                                                'key1' => 'overwritten!',
                                                'key3' => 'value3',
@@ -235,19 +234,19 @@ class ConfigTest extends DatabaseTestCase
                                        ],
                                ],
                        ],
-                       'other'  => [
-                               'data1'  => [
+                       'other' => [
+                               'data1' => [
                                        'config' => [
                                                'key12' => 'data4',
                                                'key45' => 7,
                                        ],
-                                       'other'  => [
+                                       'other' => [
                                                'key1' => 'value1',
                                                'key2' => 'value2',
                                        ],
                                ],
-                               'data2'  => [
-                                       'other'  => [
+                               'data2' => [
+                                       'other' => [
                                                'key1' => 'overwritten!',
                                                'key3' => 'value3',
                                        ],
@@ -257,7 +256,7 @@ class ConfigTest extends DatabaseTestCase
                                        ]
                                ],
                                'expect' => [
-                                       'other'  => [
+                                       'other' => [
                                                // load should overwrite values everytime!
                                                'key1' => 'overwritten!',
                                                'key2' => 'value2',
@@ -404,26 +403,26 @@ class ConfigTest extends DatabaseTestCase
        public function dataTestCat()
        {
                return [
-                       'test_with_hashmap'     => [
-                               'data'      => [
+                       'test_with_hashmap' => [
+                               'data' => [
                                        'test_with_hashmap' => [
                                                'notifyall' => [
                                                        'last_update' => 1671051565,
                                                        'admin'       => true,
                                                ],
-                                               'blockbot'  => [
+                                               'blockbot' => [
                                                        'last_update' => 1658952852,
                                                        'admin'       => true,
                                                ],
                                        ],
-                                       'config'            => [
+                                       'config' => [
                                                'register_policy' => 2,
                                                'register_text'   => '',
                                                'sitename'        => 'Friendica Social Network23',
                                                'hostname'        => 'friendica.local',
                                                'private_addons'  => false,
                                        ],
-                                       'system'            => [
+                                       'system' => [
                                                'dbclean_expire_conversation' => 90,
                                        ],
                                ],
@@ -433,14 +432,14 @@ class ConfigTest extends DatabaseTestCase
                                                'last_update' => 1671051565,
                                                'admin'       => true,
                                        ],
-                                       'blockbot'  => [
+                                       'blockbot' => [
                                                'last_update' => 1658952852,
                                                'admin'       => true,
                                        ],
                                ],
                        ],
-                       'test_with_keys'        => [
-                               'data'      => [
+                       'test_with_keys' => [
+                               'data' => [
                                        'test_with_keys' => [
                                                [
                                                        'last_update' => 1671051565,
@@ -451,14 +450,14 @@ class ConfigTest extends DatabaseTestCase
                                                        'admin'       => true,
                                                ],
                                        ],
-                                       'config'            => [
+                                       'config' => [
                                                'register_policy' => 2,
                                                'register_text'   => '',
                                                'sitename'        => 'Friendica Social Network23',
                                                'hostname'        => 'friendica.local',
                                                'private_addons'  => false,
                                        ],
-                                       'system'            => [
+                                       'system' => [
                                                'dbclean_expire_conversation' => 90,
                                        ],
                                ],
@@ -475,7 +474,7 @@ class ConfigTest extends DatabaseTestCase
                                ],
                        ],
                        'test_with_inner_array' => [
-                               'data'      => [
+                               'data' => [
                                        'test_with_inner_array' => [
                                                'notifyall' => [
                                                        'last_update' => 1671051565,
@@ -484,19 +483,19 @@ class ConfigTest extends DatabaseTestCase
                                                                'no'  => 1.5,
                                                        ],
                                                ],
-                                               'blogbot'   => [
+                                               'blogbot' => [
                                                        'last_update' => 1658952852,
                                                        'admin'       => true,
                                                ],
                                        ],
-                                       'config'                => [
+                                       'config' => [
                                                'register_policy' => 2,
                                                'register_text'   => '',
                                                'sitename'        => 'Friendica Social Network23',
                                                'hostname'        => 'friendica.local',
                                                'private_addons'  => false,
                                        ],
-                                       'system'                => [
+                                       'system' => [
                                                'dbclean_expire_conversation' => 90,
                                        ],
                                ],
@@ -509,7 +508,7 @@ class ConfigTest extends DatabaseTestCase
                                                        'no'  => 1.5,
                                                ],
                                        ],
-                                       'blogbot'   => [
+                                       'blogbot' => [
                                                'last_update' => 1658952852,
                                                'admin'       => true,
                                        ],
@@ -524,7 +523,7 @@ class ConfigTest extends DatabaseTestCase
        public function testGetCategory(array $data, string $category, array $assertion)
        {
                $this->configCache = new Cache($data);
-               $config = new ReadOnlyFileConfig($this->configCache);
+               $config            = new ReadOnlyFileConfig($this->configCache);
 
                self::assertEquals($assertion, $config->get($category));
        }
@@ -533,15 +532,15 @@ class ConfigTest extends DatabaseTestCase
        {
                return [
                        'default' => [
-                               'value' => ['test' => ['array']],
+                               'value'     => ['test' => ['array']],
                                'assertion' => ['test' => ['array']],
                        ],
                        'issue-12803' => [
-                               'value' => 's:48:"s:40:"s:32:"https://punkrock-underground.com";";";',
+                               'value'     => 's:48:"s:40:"s:32:"https://punkrock-underground.com";";";',
                                'assertion' => 'https://punkrock-underground.com',
                        ],
                        'double-serialized-array' => [
-                               'value' => 's:53:"a:1:{s:9:"testArray";a:1:{s:4:"with";s:7:"entries";}}";',
+                               'value'     => 's:53:"a:1:{s:9:"testArray";a:1:{s:4:"with";s:7:"entries";}}";',
                                'assertion' => ['testArray' => ['with' => 'entries']],
                        ],
                ];
@@ -563,33 +562,33 @@ class ConfigTest extends DatabaseTestCase
                $data = [
                        'config' => [
                                'admin_email' => 'value1',
-                               'timezone' => 'value2',
-                               'language' => 'value3',
-                               'sitename' => 'value',
+                               'timezone'    => 'value2',
+                               'language'    => 'value3',
+                               'sitename'    => 'value',
                        ],
                        'system' => [
-                               'url' => 'value1a',
+                               'url'       => 'value1a',
                                'debugging' => true,
-                               'logfile' => 'value4',
-                               'loglevel' => 'notice',
-                               'proflier' => true,
+                               'logfile'   => 'value4',
+                               'loglevel'  => 'notice',
+                               'proflier'  => true,
                        ],
-                       'proxy'  => [
+                       'proxy' => [
                                'trusted_proxies' => 'value5',
                        ],
                ];
 
                return [
                        'empty' => [
-                               'data'   => $data,
-                               'server' => [],
+                               'data'           => $data,
+                               'server'         => [],
                                'assertDisabled' => [],
                        ],
                        'mixed' => [
                                'data'   => $data,
                                'server' => [
                                        'FRIENDICA_ADMIN_MAIL' => 'test@friendica.local',
-                                       'FRIENDICA_DEBUGGING' => true,
+                                       'FRIENDICA_DEBUGGING'  => true,
                                ],
                                'assertDisabled' => [
                                        'config' => [
index 5e1435cf36328b53cf64cf2b1dadd12cefe6281b..42ec830ce6d48a505f3704d0414a196589f1f694 100644 (file)
@@ -9,16 +9,11 @@ namespace Friendica\Test\src\Core\Config;
 
 use Friendica\Core\Config\Capability\ISetConfigValuesTransactionally;
 use Friendica\Core\Config\Model\DatabaseConfig;
-use Friendica\Core\Config\Model\ReadOnlyFileConfig;
 use Friendica\Core\Config\Model\ConfigTransaction;
 use Friendica\Core\Config\Util\ConfigFileManager;
 use Friendica\Core\Config\ValueObject\Cache;
 use Friendica\Database\Database;
-use Friendica\Test\DatabaseTestCase;
 use Friendica\Test\FixtureTestCase;
-use Friendica\Test\MockedTest;
-use Friendica\Test\Util\Database\StaticDatabase;
-use Friendica\Test\Util\VFSTrait;
 use Mockery\Exception\InvalidCountException;
 
 class ConfigTransactionTest extends FixtureTestCase
@@ -101,7 +96,7 @@ class ConfigTransactionTest extends FixtureTestCase
        {
                $this->configFileManager = \Mockery::spy(ConfigFileManager::class);
 
-               $config = new DatabaseConfig($this->dice->create(Database::class), new Cache());
+               $config            = new DatabaseConfig($this->dice->create(Database::class), new Cache());
                $configTransaction = new ConfigTransaction($config);
 
                // commit empty transaction
index 4e56c094c13613c48ec27bb240d46c92a757e4ce..7697f593814077b34f9aa07c22376a75a7ef40f8 100644 (file)
@@ -21,16 +21,12 @@ use Friendica\Core\Storage\Repository\StorageManager;
 use Friendica\Core\Storage\Type\Filesystem;
 use Friendica\Core\Storage\Type\SystemResource;
 use Friendica\Database\Database;
-use Friendica\Database\Definition\DbaDefinition;
-use Friendica\Database\Definition\ViewDefinition;
 use Friendica\DI;
 use Friendica\Core\Config\Factory\Config;
 use Friendica\Core\Storage\Type;
 use Friendica\Test\DatabaseTestCase;
 use Friendica\Test\Util\CreateDatabaseTrait;
 use Friendica\Test\Util\Database\StaticDatabase;
-use Friendica\Test\Util\VFSTrait;
-use Friendica\Util\Profiler;
 use org\bovigo\vfs\vfsStream;
 use Psr\Log\LoggerInterface;
 use Psr\Log\NullLogger;
@@ -60,7 +56,7 @@ class StorageManagerTest extends DatabaseTestCase
 
                vfsStream::newDirectory(Type\FilesystemConfig::DEFAULT_BASE_FOLDER, 0777)->at($this->root);
 
-               $this->logger = new NullLogger();
+               $this->logger   = new NullLogger();
                $this->database = $this->getDbInstance();
 
                $configFactory     = new Config();
@@ -68,7 +64,7 @@ class StorageManagerTest extends DatabaseTestCase
                        $this->root->url(),
                        $this->root->url() . '/addon',
                );
-               $configCache       = $configFactory->createCache($configFileManager);
+               $configCache = $configFactory->createCache($configFileManager);
 
                $this->config = new \Friendica\Core\Config\Model\DatabaseConfig($this->database, $configCache);
                $this->config->set('storage', 'name', 'Database');
@@ -99,21 +95,21 @@ class StorageManagerTest extends DatabaseTestCase
        public function dataStorages()
        {
                return [
-                       'empty'          => [
+                       'empty' => [
                                'name'       => '',
                                'valid'      => false,
                                'interface'  => ICanReadFromStorage::class,
                                'assert'     => null,
                                'assertName' => '',
                        ],
-                       'database'       => [
+                       'database' => [
                                'name'       => Type\Database::NAME,
                                'valid'      => true,
                                'interface'  => ICanWriteToStorage::class,
                                'assert'     => Type\Database::class,
                                'assertName' => Type\Database::NAME,
                        ],
-                       'filesystem'     => [
+                       'filesystem' => [
                                'name'       => Filesystem::NAME,
                                'valid'      => true,
                                'interface'  => ICanWriteToStorage::class,
@@ -127,7 +123,7 @@ class StorageManagerTest extends DatabaseTestCase
                                'assert'     => SystemResource::class,
                                'assertName' => SystemResource::NAME,
                        ],
-                       'invalid'        => [
+                       'invalid' => [
                                'name'        => 'invalid',
                                'valid'       => false,
                                'interface'   => null,
index 5e01ed79da75f1185103d59b96417678ad06182d..c9b6dd9528081887b97e1c427d8b02f106b6a1a9 100644 (file)
@@ -92,7 +92,7 @@ class DatabaseTest extends FixtureTestCase
 
                self::assertTrue($db->update('gserver', ['active-week-users' => 0, 'registered-users' => 0], ['nurl' => 'http://friendica.local']));
 
-               $fields = ["`registered-users` = `registered-users` + 1"];
+               $fields   = ["`registered-users` = `registered-users` + 1"];
                $fields[] = "`active-week-users` = `active-week-users` + 2";
 
                self::assertTrue($db->update('gserver', $fields, ['nurl' => 'http://friendica.local']));