From 299abe5e9681202a1eacfe9029a20c869c885392 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Thu, 9 Apr 2020 14:16:40 +0200 Subject: [PATCH] PSR 2 compliance and beautify javascript --- lib/Settings/Admin.php | 3 ++- lib/Settings/Section.php | 2 +- src/SideMenu.js | 3 +-- src/admin.js | 10 +++++----- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/Settings/Admin.php b/lib/Settings/Admin.php index ca7a121..2c02c7a 100644 --- a/lib/Settings/Admin.php +++ b/lib/Settings/Admin.php @@ -35,7 +35,8 @@ class Admin implements ISettings /** @var IConfig */ private $config; - public function __construct(IL10N $l, ILogger $logger, IConfig $config) { + public function __construct(IL10N $l, ILogger $logger, IConfig $config) + { $this->l = $l; $this->logger = $logger; $this->config = $config; diff --git a/lib/Settings/Section.php b/lib/Settings/Section.php index ade31a8..f97a7f2 100644 --- a/lib/Settings/Section.php +++ b/lib/Settings/Section.php @@ -79,6 +79,6 @@ class Section implements IIconSection */ public function getIcon() { - return $this->url->imagePath('theming', 'app-dark.svg'); + return $this->url->imagePath('theming', 'app-dark.svg'); } } diff --git a/src/SideMenu.js b/src/SideMenu.js index b259521..8eccd97 100644 --- a/src/SideMenu.js +++ b/src/SideMenu.js @@ -23,8 +23,7 @@ Vue.prototype.OC = OC Vue.prototype.OC = OCP const View = Vue.extend(SideMenu) -const sideMenu = new View({ -}) +const sideMenu = new View({}) const mountSideMenuComponent = () => { const sideMenuContainer = document.querySelector('#side-menu') diff --git a/src/admin.js b/src/admin.js index 7579dac..258ddc7 100644 --- a/src/admin.js +++ b/src/admin.js @@ -42,7 +42,7 @@ const saveSettings = (key) => { t('side_menu', (key + 1) + '/' + size) ) - if (key < size -1) { + if (key < size - 1) { saveSettings(++key) } else { OC.msg.finishedSuccess(selector, t('side_menu', 'Saved')) @@ -55,10 +55,10 @@ const saveSettings = (key) => { } $(document).ready(() => { - $('#side-menu-save').on('click', (event) => { - event.preventDefault() - OC.msg.startSaving(selector) + $('#side-menu-save').on('click', (event) => { + event.preventDefault() + OC.msg.startSaving(selector) saveSettings(0) - }); + }); });