]> git.mxchange.org Git - friendica.git/commitdiff
Fix code style
authorArt4 <art4@wlabs.de>
Fri, 14 Feb 2025 08:14:27 +0000 (08:14 +0000)
committerArt4 <art4@wlabs.de>
Fri, 14 Feb 2025 08:14:27 +0000 (08:14 +0000)
src/Content/Conversation.php
src/Module/Item/Compose.php
src/Module/Post/Edit.php

index 205be399efa674e1d154c3be0e007f04d428a737..e8c193926d2267cd4bd69f9d9c679b9f0cbb0d13 100644 (file)
@@ -88,20 +88,20 @@ class Conversation
 
        public function __construct(UserGServerRepository $userGServer, LoggerInterface $logger, Profiler $profiler, Activity $activity, L10n $l10n, Item $item, Arguments $args, BaseURL $baseURL, IManageConfigValues $config, IManagePersonalConfigValues $pConfig, Page $page, Mode $mode, EventDispatcherInterface $eventDispatcher, IHandleUserSessions $session)
        {
-               $this->activity    = $activity;
-               $this->item        = $item;
-               $this->config      = $config;
-               $this->mode        = $mode;
-               $this->baseURL     = $baseURL;
-               $this->profiler    = $profiler;
-               $this->logger      = $logger;
-               $this->l10n        = $l10n;
-               $this->args        = $args;
-               $this->pConfig     = $pConfig;
-               $this->page        = $page;
+               $this->activity        = $activity;
+               $this->item            = $item;
+               $this->config          = $config;
+               $this->mode            = $mode;
+               $this->baseURL         = $baseURL;
+               $this->profiler        = $profiler;
+               $this->logger          = $logger;
+               $this->l10n            = $l10n;
+               $this->args            = $args;
+               $this->pConfig         = $pConfig;
+               $this->page            = $page;
                $this->eventDispatcher = $eventDispatcher;
-               $this->session     = $session;
-               $this->userGServer = $userGServer;
+               $this->session         = $session;
+               $this->userGServer     = $userGServer;
        }
 
        /**
index 4463e6dbd8882d745c44a3ef8a7d7c486fc73493..af58c8ead7e75f5c2489e58e4b0a067a0fd10534 100644 (file)
@@ -66,13 +66,13 @@ class Compose extends BaseModule
        {
                parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
 
-               $this->systemMessages = $systemMessages;
-               $this->ACLFormatter   = $ACLFormatter;
-               $this->page           = $page;
-               $this->pConfig        = $pConfig;
-               $this->config         = $config;
-               $this->session        = $session;
-               $this->appHelper      = $appHelper;
+               $this->systemMessages  = $systemMessages;
+               $this->ACLFormatter    = $ACLFormatter;
+               $this->page            = $page;
+               $this->pConfig         = $pConfig;
+               $this->config          = $config;
+               $this->session         = $session;
+               $this->appHelper       = $appHelper;
                $this->eventDispatcher = $eventDispatcher;
        }
 
@@ -118,29 +118,28 @@ class Compose extends BaseModule
 
                switch ($posttype) {
                        case Item::PT_PERSONAL_NOTE:
-                               $compose_title = $this->l10n->t('Compose new personal note');
-                               $type = 'note';
-                               $doesFederate = false;
+                               $compose_title      = $this->l10n->t('Compose new personal note');
+                               $type               = 'note';
+                               $doesFederate       = false;
                                $contact_allow_list = [$this->appHelper->getContactId()];
-                               $circle_allow_list = [];
-                               $contact_deny_list = [];
-                               $circle_deny_list = [];
+                               $circle_allow_list  = [];
+                               $contact_deny_list  = [];
+                               $circle_deny_list   = [];
                                break;
                        default:
                                $compose_title = $this->l10n->t('Compose new post');
-                               $type = 'post';
-                               $doesFederate = true;
+                               $type          = 'post';
+                               $doesFederate  = true;
 
                                $contact_allow = $_REQUEST['contact_allow'] ?? '';
-                               $circle_allow = $_REQUEST['circle_allow'] ?? '';
-                               $contact_deny = $_REQUEST['contact_deny'] ?? '';
-                               $circle_deny = $_REQUEST['circle_deny'] ?? '';
+                               $circle_allow  = $_REQUEST['circle_allow']  ?? '';
+                               $contact_deny  = $_REQUEST['contact_deny']  ?? '';
+                               $circle_deny   = $_REQUEST['circle_deny']   ?? '';
 
                                if ($contact_allow
                                        . $circle_allow
                                        . $contact_deny
-                                   . $circle_deny)
-                               {
+                                       . $circle_deny) {
                                        $contact_allow_list = $contact_allow ? explode(',', $contact_allow) : [];
                                        $circle_allow_list  = $circle_allow  ? explode(',', $circle_allow)  : [];
                                        $contact_deny_list  = $contact_deny  ? explode(',', $contact_deny)  : [];
@@ -150,11 +149,11 @@ class Compose extends BaseModule
                                break;
                }
 
-               $title         = $_REQUEST['title']         ?? '';
-               $category      = $_REQUEST['category']      ?? '';
-               $body          = $_REQUEST['body']          ?? '';
-               $location      = $_REQUEST['location']      ?? $user['default-location'];
-               $wall          = $_REQUEST['wall']          ?? $type == 'post';
+               $title    = $_REQUEST['title']    ?? '';
+               $category = $_REQUEST['category'] ?? '';
+               $body     = $_REQUEST['body']     ?? '';
+               $location = $_REQUEST['location'] ?? $user['default-location'];
+               $wall     = $_REQUEST['wall']     ?? $type == 'post';
 
                $jotplugins = $this->eventDispatcher->dispatch(
                        new HtmlFilterEvent(HtmlFilterEvent::JOT_TOOL, ''),
@@ -206,8 +205,12 @@ class Compose extends BaseModule
                                'wait'                 => $this->l10n->t('Please wait'),
                                'placeholdertitle'     => $this->l10n->t('Set title'),
                                'placeholdercategory'  => Feature::isEnabled($this->session->getLocalUserId(), Feature::CATEGORIES) ? $this->l10n->t('Categories (comma-separated list)') : '',
-                               'always_open_compose'  => $this->pConfig->get($this->session->getLocalUserId(), 'frio', 'always_open_compose',
-                                       $this->config->get('frio', 'always_open_compose', false)) ? '' :
+                               'always_open_compose'  => $this->pConfig->get(
+                                       $this->session->getLocalUserId(),
+                                       'frio',
+                                       'always_open_compose',
+                                       $this->config->get('frio', 'always_open_compose', false)
+                               ) ? '' :
                                                $this->l10n->t('You can make this page always open when you use the New Post button in the <a href="/settings/display">Theme Customization settings</a>.'),
                        ],
 
@@ -224,11 +227,11 @@ class Compose extends BaseModule
                                $this->l10n->t('Scheduled at'),
                                'scheduled_at'
                        ),
-                       '$created_at'   => $created_at,
-                       '$title'        => $title,
-                       '$category'     => $category,
-                       '$body'         => $body,
-                       '$location'     => $location,
+                       '$created_at' => $created_at,
+                       '$title'      => $title,
+                       '$category'   => $category,
+                       '$body'       => $body,
+                       '$location'   => $location,
 
                        '$contact_allow' => implode(',', $contact_allow_list),
                        '$circle_allow'  => implode(',', $circle_allow_list),
@@ -237,7 +240,7 @@ class Compose extends BaseModule
 
                        '$jotplugins'   => $jotplugins,
                        '$rand_num'     => Crypto::randomDigits(12),
-                       '$acl_selector'  => ACL::getFullSelectorHTML($this->page, $this->session->getLocalUserId(), $doesFederate, [
+                       '$acl_selector' => ACL::getFullSelectorHTML($this->page, $this->session->getLocalUserId(), $doesFederate, [
                                'allow_cid' => $contact_allow_list,
                                'allow_gid' => $circle_allow_list,
                                'deny_cid'  => $contact_deny_list,
index 76b39389a0a6035b3015d1f47b9fda61bf03d1cf..937ebcae5afd82e974bbc26824ef3e8e60a9d1bd 100644 (file)
@@ -55,11 +55,11 @@ class Edit extends BaseModule
        {
                parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
 
-               $this->session     = $session;
-               $this->sysMessages = $sysMessages;
-               $this->page        = $page;
-               $this->mode        = $mode;
-               $this->appHelper   = $appHelper;
+               $this->session         = $session;
+               $this->sysMessages     = $sysMessages;
+               $this->page            = $page;
+               $this->mode            = $mode;
+               $this->appHelper       = $appHelper;
                $this->eventDispatcher = $eventDispatcher;
        }
 
@@ -112,7 +112,7 @@ class Edit extends BaseModule
                }
 
                $item['body'] = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body']);
-               $item = Post\Media::addHTMLAttachmentToItem($item);
+               $item         = Post\Media::addHTMLAttachmentToItem($item);
 
                $jotplugins = $this->eventDispatcher->dispatch(
                        new HtmlFilterEvent(HtmlFilterEvent::JOT_TOOL, ''),