From 58eea1adaa185acdfdd420783ded92f908813209 Mon Sep 17 00:00:00 2001 From: Philipp Date: Tue, 26 Oct 2021 22:09:11 +0200 Subject: [PATCH] Cleanup namespaces --- src/App.php | 20 +++++++++---------- src/App/BaseURL.php | 4 ++-- src/App/Module.php | 5 +++-- src/App/Page.php | 10 +++++----- src/Console/Lock.php | 2 +- src/Console/PostUpdate.php | 2 +- src/Core/StorageManager.php | 2 +- src/DI.php | 10 +++++----- src/Factory/LoggerFactory.php | 14 ++++++------- src/Model/Storage/FilesystemConfig.php | 4 ++-- src/Model/User/Cookie.php | 8 ++++---- .../Notifications/Factory/Introduction.php | 4 ++-- .../Notifications/Repository/Notify.php | 2 +- src/Security/Authentication.php | 7 ++++--- src/Security/ExAuth.php | 12 +++++------ src/Util/Emailer.php | 4 ++-- tests/Util/AppMockTrait.php | 2 +- tests/legacy/ApiTest.php | 2 +- tests/src/App/RouterTest.php | 2 +- tests/src/Core/Config/ConfigTest.php | 4 ++-- tests/src/Model/User/CookieTest.php | 2 +- tests/src/Util/EMailerTest.php | 4 ++-- .../Util/Emailer/SystemMailBuilderTest.php | 2 +- 23 files changed, 65 insertions(+), 63 deletions(-) diff --git a/src/App.php b/src/App.php index 9c0699a182..44a5eb40df 100644 --- a/src/App.php +++ b/src/App.php @@ -305,16 +305,16 @@ class App } /** - * @param Database $database The Friendica Database - * @param IManageConfigValues $config The Configuration - * @param App\Mode $mode The mode of this Friendica app - * @param BaseURL $baseURL The full base URL of this Friendica app - * @param LoggerInterface $logger The current app logger - * @param Profiler $profiler The profiler of this application - * @param L10n $l10n The translator instance - * @param App\Arguments $args The Friendica Arguments of the call - * @param Core\Process $process The process methods - * @param \Friendica\Core\PConfig\Capability\IManagePersonalConfigValues $pConfig Personal configuration + * @param Database $database The Friendica Database + * @param IManageConfigValues $config The Configuration + * @param App\Mode $mode The mode of this Friendica app + * @param BaseURL $baseURL The full base URL of this Friendica app + * @param LoggerInterface $logger The current app logger + * @param Profiler $profiler The profiler of this application + * @param L10n $l10n The translator instance + * @param App\Arguments $args The Friendica Arguments of the call + * @param Core\Process $process The process methods + * @param IManagePersonalConfigValues $pConfig Personal configuration */ public function __construct(Database $database, IManageConfigValues $config, App\Mode $mode, BaseURL $baseURL, LoggerInterface $logger, Profiler $profiler, L10n $l10n, Arguments $args, Core\Process $process, IManagePersonalConfigValues $pConfig) { diff --git a/src/App/BaseURL.php b/src/App/BaseURL.php index 40ed794168..71f51fe2ea 100644 --- a/src/App/BaseURL.php +++ b/src/App/BaseURL.php @@ -272,8 +272,8 @@ class BaseURL } /** - * @param \Friendica\Core\Config\Capability\IManageConfigValues $config The Friendica IConfiguration - * @param array $server The $_SERVER array + * @param IManageConfigValues $config The Friendica IConfiguration + * @param array $server The $_SERVER array */ public function __construct(IManageConfigValues $config, array $server) { diff --git a/src/App/Module.php b/src/App/Module.php index ce7cc98f06..cea2788edd 100644 --- a/src/App/Module.php +++ b/src/App/Module.php @@ -24,6 +24,7 @@ namespace Friendica\App; use Friendica\App; use Friendica\BaseModule; use Friendica\Core; +use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\LegacyModule; use Friendica\Module\Home; use Friendica\Module\HTTPException\MethodNotAllowed; @@ -170,13 +171,13 @@ class Module * * @param Arguments $args The Friendica execution arguments * @param Router $router The Friendica routing instance - * @param \Friendica\Core\Config\Capability\IManageConfigValues $config The Friendica Configuration + * @param IManageConfigValues $config The Friendica Configuration * * @return Module The determined module of this call * * @throws \Exception */ - public function determineClass(Arguments $args, Router $router, Core\Config\Capability\IManageConfigValues $config) + public function determineClass(Arguments $args, Router $router, IManageConfigValues $config) { $printNotAllowedAddon = false; diff --git a/src/App/Page.php b/src/App/Page.php index abc84b0e99..578f9ab3e3 100644 --- a/src/App/Page.php +++ b/src/App/Page.php @@ -190,11 +190,11 @@ class Page implements ArrayAccess * - Infinite scroll data * - head.tpl template * - * @param App $app The Friendica App instance - * @param Module $module The loaded Friendica module - * @param L10n $l10n The l10n language instance - * @param \Friendica\Core\Config\Capability\IManageConfigValues $config The Friendica configuration - * @param \Friendica\Core\PConfig\Capability\IManagePersonalConfigValues $pConfig The Friendica personal configuration (for user) + * @param App $app The Friendica App instance + * @param Module $module The loaded Friendica module + * @param L10n $l10n The l10n language instance + * @param IManageConfigValues $config The Friendica configuration + * @param IManagePersonalConfigValues $pConfig The Friendica personal configuration (for user) * * @throws HTTPException\InternalServerErrorException */ diff --git a/src/Console/Lock.php b/src/Console/Lock.php index 3b73837b6e..c43213fba8 100644 --- a/src/Console/Lock.php +++ b/src/Console/Lock.php @@ -42,7 +42,7 @@ class Lock extends \Asika\SimpleConsole\Console private $appMode; /** - * @var \Friendica\Core\Lock\Capability\ICanLock + * @var ICanLock */ private $lock; diff --git a/src/Console/PostUpdate.php b/src/Console/PostUpdate.php index 4c047e5024..d0f1da08eb 100644 --- a/src/Console/PostUpdate.php +++ b/src/Console/PostUpdate.php @@ -38,7 +38,7 @@ class PostUpdate extends \Asika\SimpleConsole\Console */ private $appMode; /** - * @var \Friendica\Core\Config\Capability\IManageConfigValues + * @var IManageConfigValues */ private $config; /** diff --git a/src/Core/StorageManager.php b/src/Core/StorageManager.php index ee6b959ff0..e27b59edb0 100644 --- a/src/Core/StorageManager.php +++ b/src/Core/StorageManager.php @@ -56,7 +56,7 @@ class StorageManager /** @var Database */ private $dba; - /** @var \Friendica\Core\Config\Capability\IManageConfigValues */ + /** @var IManageConfigValues */ private $config; /** @var LoggerInterface */ private $logger; diff --git a/src/DI.php b/src/DI.php index 570d680dfe..d45801a9f6 100644 --- a/src/DI.php +++ b/src/DI.php @@ -155,7 +155,7 @@ abstract class DI // /** - * @return \Friendica\Core\Cache\Capability\ICanCache + * @return Core\Cache\Capability\ICanCache */ public static function cache() { @@ -163,7 +163,7 @@ abstract class DI } /** - * @return \Friendica\Core\Config\Capability\IManageConfigValues + * @return Core\Config\Capability\IManageConfigValues */ public static function config() { @@ -171,7 +171,7 @@ abstract class DI } /** - * @return \Friendica\Core\PConfig\Capability\IManagePersonalConfigValues + * @return Core\PConfig\Capability\IManagePersonalConfigValues */ public static function pConfig() { @@ -179,7 +179,7 @@ abstract class DI } /** - * @return \Friendica\Core\Lock\Capability\ICanLock + * @return Core\Lock\Capability\ICanLock */ public static function lock() { @@ -203,7 +203,7 @@ abstract class DI } /** - * @return \Friendica\Core\Session\Capability\IHandleSessions + * @return Core\Session\Capability\IHandleSessions */ public static function session() { diff --git a/src/Factory/LoggerFactory.php b/src/Factory/LoggerFactory.php index 6467bf38d1..d01b477e1e 100644 --- a/src/Factory/LoggerFactory.php +++ b/src/Factory/LoggerFactory.php @@ -68,10 +68,10 @@ class LoggerFactory /** * Creates a new PSR-3 compliant logger instances * - * @param Database $database The Friendica Database instance - * @param \Friendica\Core\Config\Capability\IManageConfigValues $config The config - * @param Profiler $profiler The profiler of the app - * @param FileSystem $fileSystem FileSystem utils + * @param Database $database The Friendica Database instance + * @param IManageConfigValues $config The config + * @param Profiler $profiler The profiler of the app + * @param FileSystem $fileSystem FileSystem utils * * @return LoggerInterface The PSR-3 compliant logger instance */ @@ -156,9 +156,9 @@ class LoggerFactory * * It should never get filled during normal usage of Friendica * - * @param \Friendica\Core\Config\Capability\IManageConfigValues $config The config - * @param Profiler $profiler The profiler of the app - * @param FileSystem $fileSystem FileSystem utils + * @param IManageConfigValues $config The config + * @param Profiler $profiler The profiler of the app + * @param FileSystem $fileSystem FileSystem utils * * @return LoggerInterface The PSR-3 compliant logger instance * diff --git a/src/Model/Storage/FilesystemConfig.php b/src/Model/Storage/FilesystemConfig.php index 4c71d6cfdd..1aa1c38173 100644 --- a/src/Model/Storage/FilesystemConfig.php +++ b/src/Model/Storage/FilesystemConfig.php @@ -54,8 +54,8 @@ class FilesystemConfig implements IStorageConfiguration /** * Filesystem constructor. * - * @param \Friendica\Core\Config\Capability\IManageConfigValues $config - * @param L10n $l10n + * @param IManageConfigValues $config + * @param L10n $l10n */ public function __construct(IManageConfigValues $config, L10n $l10n) { diff --git a/src/Model/User/Cookie.php b/src/Model/User/Cookie.php index d0db091cb9..164a527a37 100644 --- a/src/Model/User/Cookie.php +++ b/src/Model/User/Cookie.php @@ -52,10 +52,10 @@ class Cookie private $data; /** - * @param \Friendica\Core\Config\Capability\IManageConfigValues $config - * @param App\BaseURL $baseURL - * @param array $SERVER The $_SERVER array - * @param array $COOKIE The $_COOKIE array + * @param IManageConfigValues $config + * @param App\BaseURL $baseURL + * @param array $SERVER The $_SERVER array + * @param array $COOKIE The $_COOKIE array */ public function __construct(IManageConfigValues $config, App\BaseURL $baseURL, array $SERVER = [], array $COOKIE = []) { diff --git a/src/Navigation/Notifications/Factory/Introduction.php b/src/Navigation/Notifications/Factory/Introduction.php index c3a3cd46dc..9f5198b181 100644 --- a/src/Navigation/Notifications/Factory/Introduction.php +++ b/src/Navigation/Notifications/Factory/Introduction.php @@ -51,9 +51,9 @@ class Introduction extends BaseFactory private $baseUrl; /** @var L10n */ private $l10n; - /** @var \Friendica\Core\PConfig\Capability\IManagePersonalConfigValues */ + /** @var IManagePersonalConfigValues */ private $pConfig; - /** @var \Friendica\Core\Session\Capability\IHandleSessions */ + /** @var IHandleSessions */ private $session; /** @var string */ private $nick; diff --git a/src/Navigation/Notifications/Repository/Notify.php b/src/Navigation/Notifications/Repository/Notify.php index a259150cf8..bfef9bd207 100644 --- a/src/Navigation/Notifications/Repository/Notify.php +++ b/src/Navigation/Notifications/Repository/Notify.php @@ -33,7 +33,7 @@ class Notify extends BaseRepository /** @var BaseURL */ protected $baseUrl; - /** @var \Friendica\Core\Config\Capability\IManageConfigValues */ + /** @var IManageConfigValues */ protected $config; /** @var Emailer */ diff --git a/src/Security/Authentication.php b/src/Security/Authentication.php index ce8bc3e321..d8d8ba4b42 100644 --- a/src/Security/Authentication.php +++ b/src/Security/Authentication.php @@ -27,6 +27,7 @@ use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\PConfig\Capability\IManagePersonalConfigValues; use Friendica\Core\Hook; use Friendica\Core\Session; +use Friendica\Core\Session\Capability\IHandleSessions; use Friendica\Core\System; use Friendica\Database\Database; use Friendica\Database\DBA; @@ -60,7 +61,7 @@ class Authentication private $logger; /** @var User\Cookie */ private $cookie; - /** @var \Friendica\Core\Session\Capability\IHandleSessions */ + /** @var IHandleSessions */ private $session; /** @var IManagePersonalConfigValues */ private $pConfig; @@ -75,10 +76,10 @@ class Authentication * @param Database $dba * @param LoggerInterface $logger * @param User\Cookie $cookie - * @param \Friendica\Core\Session\Capability\IHandleSessions $session + * @param IHandleSessions $session * @param IManagePersonalConfigValues $pConfig */ - public function __construct(IManageConfigValues $config, App\Mode $mode, App\BaseURL $baseUrl, L10n $l10n, Database $dba, LoggerInterface $logger, User\Cookie $cookie, Session\Capability\IHandleSessions $session, IManagePersonalConfigValues $pConfig) + public function __construct(IManageConfigValues $config, App\Mode $mode, App\BaseURL $baseUrl, L10n $l10n, Database $dba, LoggerInterface $logger, User\Cookie $cookie, IHandleSessions $session, IManagePersonalConfigValues $pConfig) { $this->config = $config; $this->mode = $mode; diff --git a/src/Security/ExAuth.php b/src/Security/ExAuth.php index 0e1f423847..3b4e8c5b1a 100644 --- a/src/Security/ExAuth.php +++ b/src/Security/ExAuth.php @@ -54,7 +54,7 @@ class ExAuth */ private $appMode; /** - * @var \Friendica\Core\Config\Capability\IManageConfigValues + * @var IManageConfigValues */ private $config; /** @@ -71,11 +71,11 @@ class ExAuth private $baseURL; /** - * @param App\Mode $appMode - * @param IManageConfigValues $config - * @param \Friendica\Core\PConfig\Capability\IManagePersonalConfigValues $pConfig - * @param Database $dba - * @param App\BaseURL $baseURL + * @param App\Mode $appMode + * @param IManageConfigValues $config + * @param IManagePersonalConfigValues $pConfig + * @param Database $dba + * @param App\BaseURL $baseURL * * @throws Exception */ diff --git a/src/Util/Emailer.php b/src/Util/Emailer.php index 8e63b638fa..626401b15c 100644 --- a/src/Util/Emailer.php +++ b/src/Util/Emailer.php @@ -38,9 +38,9 @@ use Psr\Log\LoggerInterface; */ class Emailer { - /** @var \Friendica\Core\Config\Capability\IManageConfigValues */ + /** @var IManageConfigValues */ private $config; - /** @var \Friendica\Core\PConfig\Capability\IManagePersonalConfigValues */ + /** @var IManagePersonalConfigValues */ private $pConfig; /** @var LoggerInterface */ private $logger; diff --git a/tests/Util/AppMockTrait.php b/tests/Util/AppMockTrait.php index 4e6e8640d6..ed3a42b264 100644 --- a/tests/Util/AppMockTrait.php +++ b/tests/Util/AppMockTrait.php @@ -42,7 +42,7 @@ trait AppMockTrait protected $app; /** - * @var MockInterface|\Friendica\Core\Config\Capability\IManageConfigValues The mocked Config Cache + * @var MockInterface|Config\Capability\IManageConfigValues The mocked Config Cache */ protected $configMock; diff --git a/tests/legacy/ApiTest.php b/tests/legacy/ApiTest.php index 90de2d6475..e800f68c80 100644 --- a/tests/legacy/ApiTest.php +++ b/tests/legacy/ApiTest.php @@ -59,7 +59,7 @@ class ApiTest extends FixtureTest parent::setUp(); - /** @var \Friendica\Core\Config\Capability\IManageConfigValues $config */ + /** @var IManageConfigValues $config */ $this->config = $this->dice->create(IManageConfigValues::class); $this->config->set('system', 'url', 'http://localhost'); diff --git a/tests/src/App/RouterTest.php b/tests/src/App/RouterTest.php index 1e9e5d5eef..f74ea423f0 100644 --- a/tests/src/App/RouterTest.php +++ b/tests/src/App/RouterTest.php @@ -41,7 +41,7 @@ class RouterTest extends TestCase */ private $cache; /** - * @var \Friendica\Core\Lock\Capability\ICanLock + * @var ICanLock */ private $lock; diff --git a/tests/src/Core/Config/ConfigTest.php b/tests/src/Core/Config/ConfigTest.php index 0c9788c9c3..46dd400adb 100644 --- a/tests/src/Core/Config/ConfigTest.php +++ b/tests/src/Core/Config/ConfigTest.php @@ -36,7 +36,7 @@ abstract class ConfigTest extends MockedTest /** @var \Friendica\Core\Config\ValueObject\Cache */ protected $configCache; - /** @var \Friendica\Core\Config\Capability\IManageConfigValues */ + /** @var IManageConfigValues */ protected $testedConfig; /** @@ -65,7 +65,7 @@ abstract class ConfigTest extends MockedTest } /** - * @return \Friendica\Core\Config\Capability\IManageConfigValues + * @return IManageConfigValues */ abstract public function getInstance(); diff --git a/tests/src/Model/User/CookieTest.php b/tests/src/Model/User/CookieTest.php index b833ef558b..eaf79f99e6 100644 --- a/tests/src/Model/User/CookieTest.php +++ b/tests/src/Model/User/CookieTest.php @@ -30,7 +30,7 @@ use Mockery\MockInterface; class CookieTest extends MockedTest { - /** @var MockInterface|\Friendica\Core\Config\Capability\IManageConfigValues */ + /** @var MockInterface|IManageConfigValues */ private $config; /** @var MockInterface|BaseURL */ private $baseUrl; diff --git a/tests/src/Util/EMailerTest.php b/tests/src/Util/EMailerTest.php index 21a0ffa2de..ec10ee089e 100644 --- a/tests/src/Util/EMailerTest.php +++ b/tests/src/Util/EMailerTest.php @@ -26,9 +26,9 @@ class EMailerTest extends MockedTest use VFSTrait; use HookMockTrait; - /** @var \Friendica\Core\Config\Capability\IManageConfigValues|MockInterface */ + /** @var IManageConfigValues|MockInterface */ private $config; - /** @var \Friendica\Core\PConfig\Capability\IManagePersonalConfigValues|MockInterface */ + /** @var IManagePersonalConfigValues|MockInterface */ private $pConfig; /** @var L10n|MockInterface */ private $l10n; diff --git a/tests/src/Util/Emailer/SystemMailBuilderTest.php b/tests/src/Util/Emailer/SystemMailBuilderTest.php index 6cb0708edd..ce3702f96f 100644 --- a/tests/src/Util/Emailer/SystemMailBuilderTest.php +++ b/tests/src/Util/Emailer/SystemMailBuilderTest.php @@ -34,7 +34,7 @@ class SystemMailBuilderTest extends MockedTest { use VFSTrait; - /** @var \Friendica\Core\Config\Capability\IManageConfigValues */ + /** @var IManageConfigValues */ private $config; /** @var L10n */ private $l10n;