From e6b39e5f1c21f405f5c1438cf38ac3457cdf618f Mon Sep 17 00:00:00 2001 From: Art4 Date: Sun, 10 Nov 2024 11:42:59 +0000 Subject: [PATCH] Fix cs in App and AppLegacy classes --- src/App.php | 39 ++++++++++++++------------------------- src/AppLegacy.php | 24 ++++++++++++------------ 2 files changed, 26 insertions(+), 37 deletions(-) diff --git a/src/App.php b/src/App.php index f41ac73631..ba254d1b0c 100644 --- a/src/App.php +++ b/src/App.php @@ -262,18 +262,6 @@ class App implements AppHelper return $this->appHelper->getBasePath(); } - /** - * @param IManageConfigValues $config The Configuration - * @param 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 IHandleUserSessions $session The (User)Session handler - * @param DbaDefinition $dbaDefinition - * @param ViewDefinition $viewDefinition - */ public function __construct( Request $request, Authentication $auth, @@ -288,17 +276,17 @@ class App implements AppHelper DbaDefinition $dbaDefinition, ViewDefinition $viewDefinition ) { - $this->requestId = $request->getRequestId(); - $this->auth = $auth; - $this->config = $config; - $this->mode = $mode; - $this->baseURL = $baseURL; - $this->profiler = $profiler; - $this->logger = $logger; - $this->l10n = $l10n; - $this->args = $args; - $this->session = $session; - $this->appHelper = DI::apphelper(); + $this->requestId = $request->getRequestId(); + $this->auth = $auth; + $this->config = $config; + $this->mode = $mode; + $this->baseURL = $baseURL; + $this->profiler = $profiler; + $this->logger = $logger; + $this->l10n = $l10n; + $this->args = $args; + $this->session = $session; + $this->appHelper = DI::apphelper(); $this->load($dbaDefinition, $viewDefinition); } @@ -328,7 +316,8 @@ class App implements AppHelper get_include_path() . PATH_SEPARATOR . $this->appHelper->getBasePath() . DIRECTORY_SEPARATOR . 'include' . PATH_SEPARATOR . $this->appHelper->getBasePath() . DIRECTORY_SEPARATOR . 'library' . PATH_SEPARATOR - . $this->appHelper->getBasePath()); + . $this->appHelper->getBasePath() + ); $this->profiler->reset(); @@ -592,7 +581,7 @@ class App implements AppHelper // Let the module run its internal process (init, get, post, ...) $timestamp = microtime(true); - $response = $module->run($httpException, $input); + $response = $module->run($httpException, $input); $this->profiler->set(microtime(true) - $timestamp, 'content'); // Wrapping HTML responses in the theme template diff --git a/src/AppLegacy.php b/src/AppLegacy.php index 49375d02be..4aa3f25e4c 100644 --- a/src/AppLegacy.php +++ b/src/AppLegacy.php @@ -52,7 +52,7 @@ final class AppLegacy implements AppHelper // Allow themes to control internal parameters // by changing App values in theme.php private $theme_info = [ - 'videowidth' => 425, + 'videowidth' => 425, 'videoheight' => 350, ]; @@ -101,12 +101,12 @@ final class AppLegacy implements AppHelper IHandleUserSessions $session ) { $this->database = $database; - $this->config = $config; - $this->mode = $mode; - $this->l10n = $l10n; - $this->baseURL = $baseURL; - $this->pConfig = $pConfig; - $this->session = $session; + $this->config = $config; + $this->mode = $mode; + $this->l10n = $l10n; + $this->baseURL = $baseURL; + $this->pConfig = $pConfig; + $this->session = $session; } /** @@ -320,7 +320,7 @@ final class AppLegacy implements AppHelper // Sane default $this->setCurrentTheme($system_theme); - $page_theme = null; + $page_theme = null; $profile_owner = $this->getProfileOwner(); // Find the theme that belongs to the user whose stuff we are looking at @@ -337,9 +337,9 @@ final class AppLegacy implements AppHelper $theme_name = Strings::sanitizeFilePathItem($theme_name); if ($theme_name - && in_array($theme_name, Theme::getAllowedList()) - && (file_exists('view/theme/' . $theme_name . '/style.css') - || file_exists('view/theme/' . $theme_name . '/style.php')) + && in_array($theme_name, Theme::getAllowedList()) + && (file_exists('view/theme/' . $theme_name . '/style.css') + || file_exists('view/theme/' . $theme_name . '/style.php')) ) { $this->setCurrentTheme($theme_name); } @@ -356,7 +356,7 @@ final class AppLegacy implements AppHelper $this->setCurrentMobileTheme($system_mobile_theme); $page_mobile_theme = null; - $profile_owner = $this->getProfileOwner(); + $profile_owner = $this->getProfileOwner(); // Find the theme that belongs to the user whose stuff we are looking at if (!empty($profile_owner) && ($profile_owner != $this->session->getLocalUserId())) {