Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-10-05 16:12:57 +0300
committerMorris Jobke <hey@morrisjobke.de>2020-10-05 21:25:24 +0300
commitd9015a8c94bfd71fe484618a06d276701d3bf9ff (patch)
tree3f7a1cd6ec2fd982dd02de71b76076f7f01cef70 /apps
parentd357f4b10fe1b59e1e07bb90641d647522c7bfe2 (diff)
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps')
-rw-r--r--apps/accessibility/appinfo/routes.php6
-rw-r--r--apps/accessibility/lib/AccessibilityProvider.php22
-rw-r--r--apps/accessibility/lib/Controller/AccessibilityController.php30
-rw-r--r--apps/accessibility/lib/Controller/ConfigController.php10
-rw-r--r--apps/accessibility/lib/Settings/Personal.php18
-rw-r--r--apps/accessibility/lib/Settings/PersonalSection.php4
-rw-r--r--apps/admin_audit/lib/BackgroundJobs/Rotate.php2
-rw-r--r--apps/comments/lib/EventHandler.php2
-rw-r--r--apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php2
-rw-r--r--apps/dav/lib/BackgroundJob/CleanupDirectLinksJob.php4
-rw-r--r--apps/dav/lib/BackgroundJob/UploadCleanup.php4
-rw-r--r--apps/dav/lib/CalDAV/BirthdayService.php6
-rw-r--r--apps/dav/lib/CalDAV/CalDavBackend.php172
-rw-r--r--apps/dav/lib/CalDAV/Calendar.php4
-rw-r--r--apps/dav/lib/CalDAV/CalendarHome.php4
-rw-r--r--apps/dav/lib/CalDAV/CalendarImpl.php2
-rw-r--r--apps/dav/lib/CalDAV/Proxy/ProxyMapper.php2
-rw-r--r--apps/dav/lib/CalDAV/Reminder/INotificationProvider.php2
-rw-r--r--apps/dav/lib/CalDAV/Reminder/NotificationProvider/AbstractProvider.php2
-rw-r--r--apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php2
-rw-r--r--apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php4
-rw-r--r--apps/dav/lib/CalDAV/Reminder/ReminderService.php8
-rw-r--r--apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php2
-rw-r--r--apps/dav/lib/CalDAV/Schedule/IMipPlugin.php2
-rw-r--r--apps/dav/lib/CalDAV/Schedule/Plugin.php18
-rw-r--r--apps/dav/lib/CalDAV/Search/Xml/Request/CalendarSearchReport.php18
-rw-r--r--apps/dav/lib/CalDAV/WebcalCaching/Plugin.php2
-rw-r--r--apps/dav/lib/CardDAV/AddressBook.php4
-rw-r--r--apps/dav/lib/CardDAV/CardDavBackend.php2
-rw-r--r--apps/dav/lib/CardDAV/Converter.php4
-rw-r--r--apps/dav/lib/CardDAV/HasPhotoPlugin.php2
-rw-r--r--apps/dav/lib/CardDAV/MultiGetExportPlugin.php4
-rw-r--r--apps/dav/lib/CardDAV/PhotoCache.php2
-rw-r--r--apps/dav/lib/Comments/CommentNode.php6
-rw-r--r--apps/dav/lib/Comments/CommentsPlugin.php6
-rw-r--r--apps/dav/lib/Comments/EntityCollection.php2
-rw-r--r--apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php6
-rw-r--r--apps/dav/lib/Connector/Sabre/FilesReportPlugin.php2
-rw-r--r--apps/dav/lib/Controller/InvitationResponseController.php4
-rw-r--r--apps/dav/lib/DAV/Sharing/Backend.php2
-rw-r--r--apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php8
-rw-r--r--apps/dav/lib/Search/TasksSearchProvider.php2
-rw-r--r--apps/dav/tests/unit/CalDAV/BirthdayCalendar/EnablePluginTest.php2
-rw-r--r--apps/dav/tests/unit/CalDAV/CalDavBackendTest.php4
-rw-r--r--apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php4
-rw-r--r--apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php2
-rw-r--r--apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php2
-rw-r--r--apps/dav/tests/unit/CardDAV/CardDavBackendTest.php8
-rw-r--r--apps/dav/tests/unit/Comments/CommentsPluginTest.php8
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/CommentsPropertiesPluginTest.php2
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/FileTest.php4
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php4
-rw-r--r--apps/dav/tests/unit/Controller/DirectControllerTest.php2
-rw-r--r--apps/dav/tests/unit/Upload/AssemblyStreamTest.php2
-rw-r--r--apps/encryption/lib/Crypto/DecryptAll.php2
-rw-r--r--apps/encryption/lib/Crypto/EncryptAll.php2
-rw-r--r--apps/encryption/lib/KeyManager.php2
-rw-r--r--apps/encryption/lib/Settings/Admin.php6
-rw-r--r--apps/encryption/templates/settings-personal.php2
-rw-r--r--apps/encryption/tests/Crypto/CryptTest.php2
-rw-r--r--apps/encryption/tests/Crypto/EncryptAllTest.php6
-rw-r--r--apps/encryption/tests/KeyManagerTest.php2
-rw-r--r--apps/federatedfilesharing/lib/FederatedShareProvider.php2
-rw-r--r--apps/federatedfilesharing/lib/Notifications.php4
-rw-r--r--apps/federation/lib/DbHandler.php2
-rw-r--r--apps/federation/tests/Controller/OCSAuthAPIControllerTest.php2
-rw-r--r--apps/files/lib/AppInfo/Application.php2
-rw-r--r--apps/files/lib/Command/Scan.php2
-rw-r--r--apps/files/lib/Command/ScanAppData.php2
-rw-r--r--apps/files/lib/Controller/ViewController.php88
-rw-r--r--apps/files/lib/Helper.php4
-rw-r--r--apps/files_external/lib/Lib/Storage/FTP.php24
-rw-r--r--apps/files_external/lib/Lib/Storage/SFTP.php4
-rw-r--r--apps/files_external/lib/Lib/StorageConfig.php2
-rw-r--r--apps/files_external/lib/Settings/Admin.php16
-rw-r--r--apps/files_external/lib/Settings/Personal.php16
-rw-r--r--apps/files_external/tests/Controller/AjaxControllerTest.php2
-rw-r--r--apps/files_external/tests/Settings/AdminTest.php16
-rw-r--r--apps/files_external/tests/Storage/FtpTest.php2
-rw-r--r--apps/files_external/tests/config.php88
-rw-r--r--apps/files_sharing/appinfo/routes.php20
-rw-r--r--apps/files_sharing/lib/Capabilities.php2
-rw-r--r--apps/files_sharing/lib/External/Manager.php34
-rw-r--r--apps/files_sharing/lib/External/Storage.php2
-rw-r--r--apps/files_sharing/lib/Notification/Notifier.php4
-rw-r--r--apps/files_sharing/lib/Updater.php4
-rw-r--r--apps/files_sharing/tests/ApiTest.php4
-rw-r--r--apps/files_sharing/tests/Controller/ShareAPIControllerTest.php6
-rw-r--r--apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php2
-rw-r--r--apps/files_sharing/tests/ShareTest.php2
-rw-r--r--apps/files_sharing/tests/SharedStorageTest.php2
-rw-r--r--apps/files_sharing/tests/SizePropagationTest.php2
-rw-r--r--apps/files_trashbin/lib/Expiration.php2
-rw-r--r--apps/files_trashbin/lib/Helper.php2
-rw-r--r--apps/files_trashbin/tests/Command/CleanUpTest.php2
-rw-r--r--apps/files_trashbin/tests/ExpirationTest.php18
-rw-r--r--apps/files_versions/lib/Expiration.php6
-rw-r--r--apps/files_versions/lib/Storage.php10
-rw-r--r--apps/files_versions/tests/ExpirationTest.php12
-rw-r--r--apps/files_versions/tests/VersioningTest.php2
-rw-r--r--apps/provisioning_api/lib/Controller/GroupsController.php4
-rw-r--r--apps/provisioning_api/lib/Controller/UsersController.php2
-rw-r--r--apps/provisioning_api/tests/Controller/AppsControllerTest.php2
-rw-r--r--apps/settings/lib/AppInfo/Application.php2
-rw-r--r--apps/settings/lib/Controller/CommonSettingsTrait.php6
-rw-r--r--apps/settings/lib/Controller/MailSettingsController.php4
-rw-r--r--apps/settings/lib/Controller/UsersController.php4
-rw-r--r--apps/settings/lib/Settings/Admin/Mail.php22
-rw-r--r--apps/settings/lib/Settings/Admin/Overview.php2
-rw-r--r--apps/settings/lib/Settings/Admin/Security.php6
-rw-r--r--apps/settings/lib/Settings/Admin/Server.php6
-rw-r--r--apps/settings/lib/Settings/Admin/Sharing.php40
-rw-r--r--apps/settings/lib/Settings/Personal/PersonalInfo.php4
-rw-r--r--apps/settings/templates/settings/admin/additional-mail.php14
-rw-r--r--apps/settings/templates/settings/admin/server.php2
-rw-r--r--apps/settings/templates/settings/personal/personal.info.php6
-rw-r--r--apps/settings/tests/Controller/CheckSetupControllerTest.php2
-rw-r--r--apps/settings/tests/Settings/Admin/MailTest.php22
-rw-r--r--apps/settings/tests/Settings/Admin/ServerTest.php6
-rw-r--r--apps/settings/tests/Settings/Admin/SharingTest.php64
-rw-r--r--apps/sharebymail/tests/ShareByMailProviderTest.php6
-rw-r--r--apps/systemtags/lib/Activity/Listener.php2
-rw-r--r--apps/testing/appinfo/routes.php16
-rw-r--r--apps/theming/appinfo/routes.php6
-rw-r--r--apps/theming/lib/Controller/ThemingController.php4
-rw-r--r--apps/theming/lib/IconBuilder.php2
-rw-r--r--apps/theming/lib/Settings/Admin.php22
-rw-r--r--apps/theming/lib/ThemingDefaults.php2
-rw-r--r--apps/theming/lib/Util.php6
-rw-r--r--apps/theming/tests/Controller/ThemingControllerTest.php6
-rw-r--r--apps/theming/tests/ImageManagerTest.php2
-rw-r--r--apps/theming/tests/ThemingDefaultsTest.php4
-rw-r--r--apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php2
-rw-r--r--apps/updatenotification/lib/UpdateChecker.php2
-rw-r--r--apps/updatenotification/tests/UpdateCheckerTest.php16
-rw-r--r--apps/user_ldap/ajax/getNewServerConfigPrefix.php2
-rw-r--r--apps/user_ldap/lib/Command/Search.php2
-rw-r--r--apps/user_ldap/lib/Configuration.php206
-rw-r--r--apps/user_ldap/lib/Connection.php6
-rw-r--r--apps/user_ldap/lib/Jobs/CleanUp.php2
-rw-r--r--apps/user_ldap/lib/Jobs/UpdateGroups.php2
-rw-r--r--apps/user_ldap/lib/LDAP.php2
-rw-r--r--apps/user_ldap/lib/User/Manager.php20
-rw-r--r--apps/user_ldap/lib/User/OfflineUser.php10
-rw-r--r--apps/user_ldap/lib/User/User.php22
-rw-r--r--apps/user_ldap/lib/Wizard.php24
-rw-r--r--apps/user_ldap/tests/AccessTest.php4
-rw-r--r--apps/user_ldap/tests/ConfigurationTest.php16
-rw-r--r--apps/user_ldap/tests/ConnectionTest.php4
-rw-r--r--apps/user_ldap/tests/Integration/AbstractIntegrationTest.php4
-rw-r--r--apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserAvatar.php2
-rw-r--r--apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserCleanUp.php2
-rw-r--r--apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserDisplayName.php2
-rw-r--r--apps/user_ldap/tests/Jobs/CleanUpTest.php6
-rw-r--r--apps/user_ldap/tests/Jobs/SyncTest.php4
-rw-r--r--apps/user_ldap/tests/LDAPProviderTest.php6
-rw-r--r--apps/user_ldap/tests/User/UserTest.php2
-rw-r--r--apps/user_ldap/tests/User_LDAPTest.php8
-rw-r--r--apps/user_ldap/tests/WizardTest.php4
-rw-r--r--apps/user_status/lib/Controller/StatusesController.php2
-rw-r--r--apps/user_status/tests/Unit/Dashboard/UserStatusWidgetTest.php2
-rw-r--r--apps/workflowengine/lib/BackgroundJobs/Rotate.php2
-rw-r--r--apps/workflowengine/lib/Manager.php2
163 files changed, 791 insertions, 791 deletions
diff --git a/apps/accessibility/appinfo/routes.php b/apps/accessibility/appinfo/routes.php
index da0bfdbd18f..02bf52eac7e 100644
--- a/apps/accessibility/appinfo/routes.php
+++ b/apps/accessibility/appinfo/routes.php
@@ -31,17 +31,17 @@ return [
'ocs' => [
[
'name' => 'Config#getConfig',
- 'url' => '/api/v1/config',
+ 'url' => '/api/v1/config',
'verb' => 'GET',
],
[
'name' => 'Config#setConfig',
- 'url' => '/api/v1/config/{key}',
+ 'url' => '/api/v1/config/{key}',
'verb' => 'PUT',
],
[
'name' => 'Config#deleteConfig',
- 'url' => '/api/v1/config/{key}',
+ 'url' => '/api/v1/config/{key}',
'verb' => 'DELETE',
],
]
diff --git a/apps/accessibility/lib/AccessibilityProvider.php b/apps/accessibility/lib/AccessibilityProvider.php
index 1325c731662..09182eba626 100644
--- a/apps/accessibility/lib/AccessibilityProvider.php
+++ b/apps/accessibility/lib/AccessibilityProvider.php
@@ -53,41 +53,41 @@ class AccessibilityProvider {
public function __construct(string $appName,
IURLGenerator $urlGenerator,
IL10N $l) {
- $this->appName = $appName;
+ $this->appName = $appName;
$this->urlGenerator = $urlGenerator;
- $this->l = $l;
+ $this->l = $l;
}
public function getThemes() {
return [
[
- 'id' => 'dark',
- 'img' => $this->urlGenerator->imagePath($this->appName, 'theme-dark.jpg'),
+ 'id' => 'dark',
+ 'img' => $this->urlGenerator->imagePath($this->appName, 'theme-dark.jpg'),
'title' => $this->l->t('Dark theme'),
'enableLabel' => $this->l->t('Enable dark theme'),
- 'text' => $this->l->t('A dark theme to ease your eyes by reducing the overall luminosity and brightness. It is still under development, so please report any issues you may find.')
+ 'text' => $this->l->t('A dark theme to ease your eyes by reducing the overall luminosity and brightness. It is still under development, so please report any issues you may find.')
]
];
}
public function getHighContrast() {
return [
- 'id' => 'highcontrast',
- 'img' => $this->urlGenerator->imagePath($this->appName, 'mode-highcontrast.jpg'),
+ 'id' => 'highcontrast',
+ 'img' => $this->urlGenerator->imagePath($this->appName, 'mode-highcontrast.jpg'),
'title' => $this->l->t('High contrast mode'),
'enableLabel' => $this->l->t('Enable high contrast mode'),
- 'text' => $this->l->t('A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased.')
+ 'text' => $this->l->t('A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased.')
];
}
public function getFonts() {
return [
[
- 'id' => 'fontdyslexic',
- 'img' => $this->urlGenerator->imagePath($this->appName, 'font-opendyslexic.jpg'),
+ 'id' => 'fontdyslexic',
+ 'img' => $this->urlGenerator->imagePath($this->appName, 'font-opendyslexic.jpg'),
'title' => $this->l->t('Dyslexia font'),
'enableLabel' => $this->l->t('Enable dyslexia font'),
- 'text' => $this->l->t('OpenDyslexic is a free typeface/font designed to mitigate some of the common reading errors caused by dyslexia.')
+ 'text' => $this->l->t('OpenDyslexic is a free typeface/font designed to mitigate some of the common reading errors caused by dyslexia.')
]
];
}
diff --git a/apps/accessibility/lib/Controller/AccessibilityController.php b/apps/accessibility/lib/Controller/AccessibilityController.php
index 9ea6e110193..5c732816b8a 100644
--- a/apps/accessibility/lib/Controller/AccessibilityController.php
+++ b/apps/accessibility/lib/Controller/AccessibilityController.php
@@ -113,19 +113,19 @@ class AccessibilityController extends Controller {
IconsCacher $iconsCacher,
\OC_Defaults $defaults) {
parent::__construct($appName, $request);
- $this->appName = $appName;
- $this->config = $config;
- $this->userManager = $userManager;
- $this->logger = $logger;
+ $this->appName = $appName;
+ $this->config = $config;
+ $this->userManager = $userManager;
+ $this->logger = $logger;
$this->urlGenerator = $urlGenerator;
- $this->timeFactory = $timeFactory;
- $this->userSession = $userSession;
- $this->appManager = $appManager;
- $this->iconsCacher = $iconsCacher;
- $this->defaults = $defaults;
+ $this->timeFactory = $timeFactory;
+ $this->userSession = $userSession;
+ $this->appManager = $appManager;
+ $this->iconsCacher = $iconsCacher;
+ $this->defaults = $defaults;
$this->serverRoot = \OC::$SERVERROOT;
- $this->appRoot = $this->appManager->getAppPath($this->appName);
+ $this->appRoot = $this->appManager->getAppPath($this->appName);
}
/**
@@ -136,8 +136,8 @@ class AccessibilityController extends Controller {
* @return DataDisplayResponse
*/
public function getCss(): DataDisplayResponse {
- $css = '';
- $imports = '';
+ $css = '';
+ $imports = '';
if ($this->userSession->isLoggedIn()) {
$userValues = $this->getUserValues();
} else {
@@ -182,7 +182,7 @@ class AccessibilityController extends Controller {
// Rebase all urls
$appWebRoot = substr($this->appRoot, strlen($this->serverRoot) - strlen(\OC::$WEBROOT));
- $css = $this->rebaseUrls($css, $appWebRoot . '/css');
+ $css = $this->rebaseUrls($css, $appWebRoot . '/css');
if (in_array('dark', $userValues) && $this->iconsCacher->getCachedList() && $this->iconsCacher->getCachedList()->getSize() > 0) {
$iconsCss = $this->invertSvgIconsColor($this->iconsCacher->getCachedList()->getContent());
@@ -215,7 +215,7 @@ class AccessibilityController extends Controller {
*/
private function getUserValues(): array {
$userTheme = $this->config->getUserValue($this->userSession->getUser()->getUID(), $this->appName, 'theme', false);
- $userFont = $this->config->getUserValue($this->userSession->getUser()->getUID(), $this->appName, 'font', false);
+ $userFont = $this->config->getUserValue($this->userSession->getUser()->getUID(), $this->appName, 'font', false);
$userHighContrast = $this->config->getUserValue($this->userSession->getUser()->getUID(), $this->appName, 'highcontrast', false);
return [$userTheme, $userHighContrast, $userFont];
@@ -240,7 +240,7 @@ class AccessibilityController extends Controller {
* @return string
*/
private function rebaseUrls(string $css, string $webDir): string {
- $re = '/url\([\'"]([^\/][\.\w?=\/-]*)[\'"]\)/x';
+ $re = '/url\([\'"]([^\/][\.\w?=\/-]*)[\'"]\)/x';
$subst = 'url(\'' . $webDir . '/$1\')';
return preg_replace($re, $subst, $css);
diff --git a/apps/accessibility/lib/Controller/ConfigController.php b/apps/accessibility/lib/Controller/ConfigController.php
index a66a69a3a73..5f2f77ed3e1 100644
--- a/apps/accessibility/lib/Controller/ConfigController.php
+++ b/apps/accessibility/lib/Controller/ConfigController.php
@@ -75,11 +75,11 @@ class ConfigController extends OCSController {
IUserSession $userSession,
AccessibilityProvider $accessibilityProvider) {
parent::__construct($appName, $request);
- $this->appName = $appName;
- $this->config = $config;
- $this->userSession = $userSession;
+ $this->appName = $appName;
+ $this->config = $config;
+ $this->userSession = $userSession;
$this->accessibilityProvider = $accessibilityProvider;
- $this->userId = $userSession->getUser()->getUID();
+ $this->userId = $userSession->getUser()->getUID();
}
/**
@@ -115,7 +115,7 @@ class ConfigController extends OCSController {
$themes = $this->accessibilityProvider->getThemes();
$highcontrast = [$this->accessibilityProvider->getHighContrast()];
- $fonts = $this->accessibilityProvider->getFonts();
+ $fonts = $this->accessibilityProvider->getFonts();
$availableOptions = array_map(function ($option) {
return $option['id'];
diff --git a/apps/accessibility/lib/Settings/Personal.php b/apps/accessibility/lib/Settings/Personal.php
index 3f687bc1b6e..b1cff20fac8 100644
--- a/apps/accessibility/lib/Settings/Personal.php
+++ b/apps/accessibility/lib/Settings/Personal.php
@@ -74,13 +74,13 @@ class Personal implements ISettings {
IURLGenerator $urlGenerator,
AccessibilityProvider $accessibilityProvider,
IInitialStateService $initialStateService) {
- $this->appName = $appName;
- $this->config = $config;
- $this->userSession = $userSession;
- $this->l = $l;
- $this->urlGenerator = $urlGenerator;
+ $this->appName = $appName;
+ $this->config = $config;
+ $this->userSession = $userSession;
+ $this->l = $l;
+ $this->urlGenerator = $urlGenerator;
$this->accessibilityProvider = $accessibilityProvider;
- $this->initialStateService = $initialStateService;
+ $this->initialStateService = $initialStateService;
}
/**
@@ -93,14 +93,14 @@ class Personal implements ISettings {
$availableConfig = [
'themes' => $this->accessibilityProvider->getThemes(),
- 'fonts' => $this->accessibilityProvider->getFonts(),
+ 'fonts' => $this->accessibilityProvider->getFonts(),
'highcontrast' => $this->accessibilityProvider->getHighContrast()
];
$userConfig = [
'highcontrast' => $this->config->getUserValue($this->userSession->getUser()->getUID(), $this->appName, 'highcontrast', false),
- 'theme' => $this->config->getUserValue($this->userSession->getUser()->getUID(), $this->appName, 'theme', false),
- 'font' => $this->config->getUserValue($this->userSession->getUser()->getUID(), $this->appName, 'font', false)
+ 'theme' => $this->config->getUserValue($this->userSession->getUser()->getUID(), $this->appName, 'theme', false),
+ 'font' => $this->config->getUserValue($this->userSession->getUser()->getUID(), $this->appName, 'font', false)
];
$this->initialStateService->provideInitialState($this->appName, 'available-config', $availableConfig);
diff --git a/apps/accessibility/lib/Settings/PersonalSection.php b/apps/accessibility/lib/Settings/PersonalSection.php
index c925ceec2c6..ab61bbbdf30 100644
--- a/apps/accessibility/lib/Settings/PersonalSection.php
+++ b/apps/accessibility/lib/Settings/PersonalSection.php
@@ -48,9 +48,9 @@ class PersonalSection implements IIconSection {
public function __construct(string $appName,
IURLGenerator $urlGenerator,
IL10N $l) {
- $this->appName = $appName;
+ $this->appName = $appName;
$this->urlGenerator = $urlGenerator;
- $this->l = $l;
+ $this->l = $l;
}
/**
diff --git a/apps/admin_audit/lib/BackgroundJobs/Rotate.php b/apps/admin_audit/lib/BackgroundJobs/Rotate.php
index 61c173c453c..4785993bee1 100644
--- a/apps/admin_audit/lib/BackgroundJobs/Rotate.php
+++ b/apps/admin_audit/lib/BackgroundJobs/Rotate.php
@@ -31,7 +31,7 @@ class Rotate extends TimedJob {
use RotationTrait;
public function __construct() {
- $this->setInterval(60*60*3);
+ $this->setInterval(60 * 60 * 3);
}
protected function run($argument) {
diff --git a/apps/comments/lib/EventHandler.php b/apps/comments/lib/EventHandler.php
index e5f0c6b61d4..20a15a9b026 100644
--- a/apps/comments/lib/EventHandler.php
+++ b/apps/comments/lib/EventHandler.php
@@ -42,7 +42,7 @@ class EventHandler implements ICommentsEventHandler {
private $notificationListener;
public function __construct(ActivityListener $activityListener, NotificationListener $notificationListener) {
- $this->activityListener = $activityListener;
+ $this->activityListener = $activityListener;
$this->notificationListener = $notificationListener;
}
diff --git a/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php b/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php
index 28b23dc43bd..61fdbf5d52e 100644
--- a/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php
+++ b/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php
@@ -53,7 +53,7 @@ class CommentersSorterTest extends TestCase {
$commentMocks = [];
foreach ($data['actors'] as $actorType => $actors) {
foreach ($actors as $actorId => $noOfComments) {
- for ($i=0;$i<$noOfComments;$i++) {
+ for ($i = 0;$i < $noOfComments;$i++) {
$mock = $this->createMock(IComment::class);
$mock->expects($this->atLeastOnce())
->method('getActorType')
diff --git a/apps/dav/lib/BackgroundJob/CleanupDirectLinksJob.php b/apps/dav/lib/BackgroundJob/CleanupDirectLinksJob.php
index 60eae25fdcc..33f2a14b7fd 100644
--- a/apps/dav/lib/BackgroundJob/CleanupDirectLinksJob.php
+++ b/apps/dav/lib/BackgroundJob/CleanupDirectLinksJob.php
@@ -38,7 +38,7 @@ class CleanupDirectLinksJob extends TimedJob {
private $mapper;
public function __construct(ITimeFactory $timeFactory, DirectMapper $mapper) {
- $this->setInterval(60*60*24);
+ $this->setInterval(60 * 60 * 24);
$this->timeFactory = $timeFactory;
$this->mapper = $mapper;
@@ -46,6 +46,6 @@ class CleanupDirectLinksJob extends TimedJob {
protected function run($argument) {
// Delete all shares expired 24 hours ago
- $this->mapper->deleteExpired($this->timeFactory->getTime() - 60*60*24);
+ $this->mapper->deleteExpired($this->timeFactory->getTime() - 60 * 60 * 24);
}
}
diff --git a/apps/dav/lib/BackgroundJob/UploadCleanup.php b/apps/dav/lib/BackgroundJob/UploadCleanup.php
index b1cdd6fa0c4..104faf12b65 100644
--- a/apps/dav/lib/BackgroundJob/UploadCleanup.php
+++ b/apps/dav/lib/BackgroundJob/UploadCleanup.php
@@ -51,7 +51,7 @@ class UploadCleanup extends TimedJob {
$this->jobList = $jobList;
// Run once a day
- $this->setInterval(60*60*24);
+ $this->setInterval(60 * 60 * 24);
}
protected function run($argument) {
@@ -65,7 +65,7 @@ class UploadCleanup extends TimedJob {
$uploads = $userRoot->get('uploads');
/** @var Folder $uploadFolder */
$uploadFolder = $uploads->get($folder);
- } catch (NotFoundException|NoUserException $e) {
+ } catch (NotFoundException | NoUserException $e) {
$this->jobList->remove(self::class, $argument);
return;
}
diff --git a/apps/dav/lib/CalDAV/BirthdayService.php b/apps/dav/lib/CalDAV/BirthdayService.php
index e64e886a01c..39e8d6c3940 100644
--- a/apps/dav/lib/CalDAV/BirthdayService.php
+++ b/apps/dav/lib/CalDAV/BirthdayService.php
@@ -166,7 +166,7 @@ class BirthdayService {
$this->calDavBackEnd->createCalendar($principal, self::BIRTHDAY_CALENDAR_URI, [
'{DAV:}displayname' => 'Contact birthdays',
'{http://apple.com/ns/ical/}calendar-color' => '#E9D859',
- 'components' => 'VEVENT',
+ 'components' => 'VEVENT',
]);
return $this->calDavBackEnd->getCalendarByUri($principal, self::BIRTHDAY_CALENDAR_URI);
@@ -427,8 +427,8 @@ class BirthdayService {
*/
private function formatTitle(string $field,
string $name,
- int $year=null,
- bool $supports4Byte=true):string {
+ int $year = null,
+ bool $supports4Byte = true):string {
if ($supports4Byte) {
switch ($field) {
case 'BDAY':
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php
index d0f88195e58..83c42c38639 100644
--- a/apps/dav/lib/CalDAV/CalDavBackend.php
+++ b/apps/dav/lib/CalDAV/CalDavBackend.php
@@ -126,11 +126,11 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @var array
*/
public $propertyMap = [
- '{DAV:}displayname' => 'displayname',
+ '{DAV:}displayname' => 'displayname',
'{urn:ietf:params:xml:ns:caldav}calendar-description' => 'description',
- '{urn:ietf:params:xml:ns:caldav}calendar-timezone' => 'timezone',
- '{http://apple.com/ns/ical/}calendar-order' => 'calendarorder',
- '{http://apple.com/ns/ical/}calendar-color' => 'calendarcolor',
+ '{urn:ietf:params:xml:ns:caldav}calendar-timezone' => 'timezone',
+ '{http://apple.com/ns/ical/}calendar-order' => 'calendarorder',
+ '{http://apple.com/ns/ical/}calendar-color' => 'calendarcolor',
];
/**
@@ -139,12 +139,12 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @var array
*/
public $subscriptionPropertyMap = [
- '{DAV:}displayname' => 'displayname',
- '{http://apple.com/ns/ical/}refreshrate' => 'refreshrate',
- '{http://apple.com/ns/ical/}calendar-order' => 'calendarorder',
- '{http://apple.com/ns/ical/}calendar-color' => 'calendarcolor',
- '{http://calendarserver.org/ns/}subscribed-strip-todos' => 'striptodos',
- '{http://calendarserver.org/ns/}subscribed-strip-alarms' => 'stripalarms',
+ '{DAV:}displayname' => 'displayname',
+ '{http://apple.com/ns/ical/}refreshrate' => 'refreshrate',
+ '{http://apple.com/ns/ical/}calendar-order' => 'calendarorder',
+ '{http://apple.com/ns/ical/}calendar-color' => 'calendarcolor',
+ '{http://calendarserver.org/ns/}subscribed-strip-todos' => 'striptodos',
+ '{http://calendarserver.org/ns/}subscribed-strip-alarms' => 'stripalarms',
'{http://calendarserver.org/ns/}subscribed-strip-attachments' => 'stripattachments',
];
@@ -311,7 +311,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
'{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal' => $this->convertPrincipal($principalUri, !$this->legacyEndpoint),
];
- foreach ($this->propertyMap as $xmlName=>$dbName) {
+ foreach ($this->propertyMap as $xmlName => $dbName) {
$calendar[$xmlName] = $row[$dbName];
}
@@ -331,7 +331,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$principals = array_map(function ($principal) {
return urldecode($principal);
}, $principals);
- $principals[]= $principalUri;
+ $principals[] = $principalUri;
$fields = array_values($this->propertyMap);
$fields[] = 'a.id';
@@ -389,7 +389,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$readOnlyPropertyName => $readOnly,
];
- foreach ($this->propertyMap as $xmlName=>$dbName) {
+ foreach ($this->propertyMap as $xmlName => $dbName) {
$calendar[$xmlName] = $row[$dbName];
}
@@ -436,7 +436,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
'{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
'{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'),
];
- foreach ($this->propertyMap as $xmlName=>$dbName) {
+ foreach ($this->propertyMap as $xmlName => $dbName) {
$calendar[$xmlName] = $row[$dbName];
}
@@ -511,7 +511,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
'{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}public' => (int)$row['access'] === self::ACCESS_PUBLIC,
];
- foreach ($this->propertyMap as $xmlName=>$dbName) {
+ foreach ($this->propertyMap as $xmlName => $dbName) {
$calendar[$xmlName] = $row[$dbName];
}
@@ -577,7 +577,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
'{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}public' => (int)$row['access'] === self::ACCESS_PUBLIC,
];
- foreach ($this->propertyMap as $xmlName=>$dbName) {
+ foreach ($this->propertyMap as $xmlName => $dbName) {
$calendar[$xmlName] = $row[$dbName];
}
@@ -629,7 +629,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
'{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'),
];
- foreach ($this->propertyMap as $xmlName=>$dbName) {
+ foreach ($this->propertyMap as $xmlName => $dbName) {
$calendar[$xmlName] = $row[$dbName];
}
@@ -679,7 +679,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
'{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'),
];
- foreach ($this->propertyMap as $xmlName=>$dbName) {
+ foreach ($this->propertyMap as $xmlName => $dbName) {
$calendar[$xmlName] = $row[$dbName];
}
@@ -705,7 +705,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
->from('calendarsubscriptions')
->where($query->expr()->eq('id', $query->createNamedParameter($subscriptionId)))
->orderBy('calendarorder', 'asc');
- $stmt =$query->execute();
+ $stmt = $query->execute();
$row = $stmt->fetch(\PDO::FETCH_ASSOC);
$stmt->closeCursor();
@@ -714,16 +714,16 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
}
$subscription = [
- 'id' => $row['id'],
- 'uri' => $row['uri'],
+ 'id' => $row['id'],
+ 'uri' => $row['uri'],
'principaluri' => $row['principaluri'],
- 'source' => $row['source'],
+ 'source' => $row['source'],
'lastmodified' => $row['lastmodified'],
'{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet(['VTODO', 'VEVENT']),
'{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0',
];
- foreach ($this->subscriptionPropertyMap as $xmlName=>$dbName) {
+ foreach ($this->subscriptionPropertyMap as $xmlName => $dbName) {
if (!is_null($row[$dbName])) {
$subscription[$xmlName] = $row[$dbName];
}
@@ -746,11 +746,11 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
public function createCalendar($principalUri, $calendarUri, array $properties) {
$values = [
'principaluri' => $this->convertPrincipal($principalUri, true),
- 'uri' => $calendarUri,
- 'synctoken' => 1,
- 'transparent' => 0,
- 'components' => 'VEVENT,VTODO',
- 'displayname' => $calendarUri
+ 'uri' => $calendarUri,
+ 'synctoken' => 1,
+ 'transparent' => 0,
+ 'components' => 'VEVENT,VTODO',
+ 'displayname' => $calendarUri
];
// Default value
@@ -771,7 +771,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$values['transparent'] = (int) ($properties[$transp]->getValue() === 'transparent');
}
- foreach ($this->propertyMap as $xmlName=>$dbName) {
+ foreach ($this->propertyMap as $xmlName => $dbName) {
if (isset($properties[$xmlName])) {
$values[$dbName] = $properties[$xmlName];
}
@@ -939,7 +939,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @param int $calendarType
* @return array
*/
- public function getCalendarObjects($calendarId, $calendarType=self::CALENDAR_TYPE_CALENDAR):array {
+ public function getCalendarObjects($calendarId, $calendarType = self::CALENDAR_TYPE_CALENDAR):array {
$query = $this->db->getQueryBuilder();
$query->select(['id', 'uri', 'lastmodified', 'etag', 'calendarid', 'size', 'componenttype', 'classification'])
->from('calendarobjects')
@@ -950,14 +950,14 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$result = [];
foreach ($stmt->fetchAll(\PDO::FETCH_ASSOC) as $row) {
$result[] = [
- 'id' => $row['id'],
- 'uri' => $row['uri'],
+ 'id' => $row['id'],
+ 'uri' => $row['uri'],
'lastmodified' => $row['lastmodified'],
- 'etag' => '"' . $row['etag'] . '"',
- 'calendarid' => $row['calendarid'],
- 'size' => (int)$row['size'],
- 'component' => strtolower($row['componenttype']),
- 'classification'=> (int)$row['classification']
+ 'etag' => '"' . $row['etag'] . '"',
+ 'calendarid' => $row['calendarid'],
+ 'size' => (int)$row['size'],
+ 'component' => strtolower($row['componenttype']),
+ 'classification' => (int)$row['classification']
];
}
@@ -981,7 +981,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @param int $calendarType
* @return array|null
*/
- public function getCalendarObject($calendarId, $objectUri, $calendarType=self::CALENDAR_TYPE_CALENDAR) {
+ public function getCalendarObject($calendarId, $objectUri, $calendarType = self::CALENDAR_TYPE_CALENDAR) {
$query = $this->db->getQueryBuilder();
$query->select(['id', 'uri', 'lastmodified', 'etag', 'calendarid', 'size', 'calendardata', 'componenttype', 'classification'])
->from('calendarobjects')
@@ -996,15 +996,15 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
}
return [
- 'id' => $row['id'],
- 'uri' => $row['uri'],
- 'lastmodified' => $row['lastmodified'],
- 'etag' => '"' . $row['etag'] . '"',
- 'calendarid' => $row['calendarid'],
- 'size' => (int)$row['size'],
- 'calendardata' => $this->readBlob($row['calendardata']),
- 'component' => strtolower($row['componenttype']),
- 'classification'=> (int)$row['classification']
+ 'id' => $row['id'],
+ 'uri' => $row['uri'],
+ 'lastmodified' => $row['lastmodified'],
+ 'etag' => '"' . $row['etag'] . '"',
+ 'calendarid' => $row['calendarid'],
+ 'size' => (int)$row['size'],
+ 'calendardata' => $this->readBlob($row['calendardata']),
+ 'component' => strtolower($row['componenttype']),
+ 'classification' => (int)$row['classification']
];
}
@@ -1021,7 +1021,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @param int $calendarType
* @return array
*/
- public function getMultipleCalendarObjects($calendarId, array $uris, $calendarType=self::CALENDAR_TYPE_CALENDAR):array {
+ public function getMultipleCalendarObjects($calendarId, array $uris, $calendarType = self::CALENDAR_TYPE_CALENDAR):array {
if (empty($uris)) {
return [];
}
@@ -1042,14 +1042,14 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
while ($row = $result->fetch()) {
$objects[] = [
- 'id' => $row['id'],
- 'uri' => $row['uri'],
+ 'id' => $row['id'],
+ 'uri' => $row['uri'],
'lastmodified' => $row['lastmodified'],
- 'etag' => '"' . $row['etag'] . '"',
- 'calendarid' => $row['calendarid'],
- 'size' => (int)$row['size'],
+ 'etag' => '"' . $row['etag'] . '"',
+ 'calendarid' => $row['calendarid'],
+ 'size' => (int)$row['size'],
'calendardata' => $this->readBlob($row['calendardata']),
- 'component' => strtolower($row['componenttype']),
+ 'component' => strtolower($row['componenttype']),
'classification' => (int)$row['classification']
];
}
@@ -1078,7 +1078,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @param int $calendarType
* @return string
*/
- public function createCalendarObject($calendarId, $objectUri, $calendarData, $calendarType=self::CALENDAR_TYPE_CALENDAR) {
+ public function createCalendarObject($calendarId, $objectUri, $calendarData, $calendarType = self::CALENDAR_TYPE_CALENDAR) {
$extraData = $this->getDenormalizedData($calendarData);
$q = $this->db->getQueryBuilder();
@@ -1169,7 +1169,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @param int $calendarType
* @return string
*/
- public function updateCalendarObject($calendarId, $objectUri, $calendarData, $calendarType=self::CALENDAR_TYPE_CALENDAR) {
+ public function updateCalendarObject($calendarId, $objectUri, $calendarData, $calendarType = self::CALENDAR_TYPE_CALENDAR) {
$extraData = $this->getDenormalizedData($calendarData);
$query = $this->db->getQueryBuilder();
$query->update('calendarobjects')
@@ -1252,7 +1252,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @param int $calendarType
* @return void
*/
- public function deleteCalendarObject($calendarId, $objectUri, $calendarType=self::CALENDAR_TYPE_CALENDAR) {
+ public function deleteCalendarObject($calendarId, $objectUri, $calendarType = self::CALENDAR_TYPE_CALENDAR) {
$data = $this->getCalendarObject($calendarId, $objectUri, $calendarType);
if (is_array($data)) {
if ($calendarType === self::CALENDAR_TYPE_CALENDAR) {
@@ -1345,7 +1345,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @param int $calendarType
* @return array
*/
- public function calendarQuery($calendarId, array $filters, $calendarType=self::CALENDAR_TYPE_CALENDAR):array {
+ public function calendarQuery($calendarId, array $filters, $calendarType = self::CALENDAR_TYPE_CALENDAR):array {
$componentType = null;
$requirePostFilter = true;
$timeRange = null;
@@ -1439,7 +1439,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @param integer|null $offset
* @return array
*/
- public function calendarSearch($principalUri, array $filters, $limit=null, $offset=null) {
+ public function calendarSearch($principalUri, array $filters, $limit = null, $offset = null) {
$calendars = $this->getCalendarsForUser($principalUri);
$ownCalendars = [];
$sharedCalendars = [];
@@ -1932,7 +1932,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @param int $calendarType
* @return array
*/
- public function getChangesForCalendar($calendarId, $syncToken, $syncLevel, $limit = null, $calendarType=self::CALENDAR_TYPE_CALENDAR) {
+ public function getChangesForCalendar($calendarId, $syncToken, $syncLevel, $limit = null, $calendarType = self::CALENDAR_TYPE_CALENDAR) {
// Current synctoken
$stmt = $this->db->prepare('SELECT `synctoken` FROM `*PREFIX*calendars` WHERE `id` = ?');
$stmt->execute([ $calendarId ]);
@@ -1944,15 +1944,15 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$result = [
'syncToken' => $currentToken,
- 'added' => [],
- 'modified' => [],
- 'deleted' => [],
+ 'added' => [],
+ 'modified' => [],
+ 'deleted' => [],
];
if ($syncToken) {
$query = "SELECT `uri`, `operation` FROM `*PREFIX*calendarchanges` WHERE `synctoken` >= ? AND `synctoken` < ? AND `calendarid` = ? AND `calendartype` = ? ORDER BY `synctoken`";
- if ($limit>0) {
- $query.= " LIMIT " . (int)$limit;
+ if ($limit > 0) {
+ $query .= " LIMIT " . (int)$limit;
}
// Fetching all changes
@@ -2037,22 +2037,22 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
->from('calendarsubscriptions')
->where($query->expr()->eq('principaluri', $query->createNamedParameter($principalUri)))
->orderBy('calendarorder', 'asc');
- $stmt =$query->execute();
+ $stmt = $query->execute();
$subscriptions = [];
while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) {
$subscription = [
- 'id' => $row['id'],
- 'uri' => $row['uri'],
+ 'id' => $row['id'],
+ 'uri' => $row['uri'],
'principaluri' => $row['principaluri'],
- 'source' => $row['source'],
+ 'source' => $row['source'],
'lastmodified' => $row['lastmodified'],
'{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet(['VTODO', 'VEVENT']),
'{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0',
];
- foreach ($this->subscriptionPropertyMap as $xmlName=>$dbName) {
+ foreach ($this->subscriptionPropertyMap as $xmlName => $dbName) {
if (!is_null($row[$dbName])) {
$subscription[$xmlName] = $row[$dbName];
}
@@ -2082,14 +2082,14 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$values = [
'principaluri' => $principalUri,
- 'uri' => $uri,
- 'source' => $properties['{http://calendarserver.org/ns/}source']->getHref(),
+ 'uri' => $uri,
+ 'source' => $properties['{http://calendarserver.org/ns/}source']->getHref(),
'lastmodified' => time(),
];
$propertiesBoolean = ['striptodos', 'stripalarms', 'stripattachments'];
- foreach ($this->subscriptionPropertyMap as $xmlName=>$dbName) {
+ foreach ($this->subscriptionPropertyMap as $xmlName => $dbName) {
if (array_key_exists($xmlName, $properties)) {
$values[$dbName] = $properties[$xmlName];
if (in_array($dbName, $propertiesBoolean)) {
@@ -2147,7 +2147,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$propPatch->handle($supportedProperties, function ($mutations) use ($subscriptionId) {
$newValues = [];
- foreach ($mutations as $propertyName=>$propertyValue) {
+ foreach ($mutations as $propertyName => $propertyValue) {
if ($propertyName === '{http://calendarserver.org/ns/}source') {
$newValues['source'] = $propertyValue->getHref();
} else {
@@ -2159,7 +2159,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$query = $this->db->getQueryBuilder();
$query->update('calendarsubscriptions')
->set('lastmodified', $query->createNamedParameter(time()));
- foreach ($newValues as $fieldName=>$value) {
+ foreach ($newValues as $fieldName => $value) {
$query->set($fieldName, $query->createNamedParameter($value));
}
$query->where($query->expr()->eq('id', $query->createNamedParameter($subscriptionId)))
@@ -2252,11 +2252,11 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
}
return [
- 'uri' => $row['uri'],
+ 'uri' => $row['uri'],
'calendardata' => $row['calendardata'],
'lastmodified' => $row['lastmodified'],
- 'etag' => '"' . $row['etag'] . '"',
- 'size' => (int)$row['size'],
+ 'etag' => '"' . $row['etag'] . '"',
+ 'size' => (int)$row['size'],
];
}
@@ -2282,10 +2282,10 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
foreach ($stmt->fetchAll(\PDO::FETCH_ASSOC) as $row) {
$result[] = [
'calendardata' => $row['calendardata'],
- 'uri' => $row['uri'],
+ 'uri' => $row['uri'],
'lastmodified' => $row['lastmodified'],
- 'etag' => '"' . $row['etag'] . '"',
- 'size' => (int)$row['size'],
+ 'etag' => '"' . $row['etag'] . '"',
+ 'size' => (int)$row['size'],
];
}
@@ -2338,7 +2338,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @param int $calendarType
* @return void
*/
- protected function addChange($calendarId, $objectUri, $operation, $calendarType=self::CALENDAR_TYPE_CALENDAR) {
+ protected function addChange($calendarId, $objectUri, $operation, $calendarType = self::CALENDAR_TYPE_CALENDAR) {
$table = $calendarType === self::CALENDAR_TYPE_CALENDAR ? 'calendars': 'calendarsubscriptions';
$query = $this->db->getQueryBuilder();
@@ -2388,7 +2388,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$uid = null;
$classification = self::CLASSIFICATION_PUBLIC;
foreach ($vObject->getComponents() as $component) {
- if ($component->name!=='VTIMEZONE') {
+ if ($component->name !== 'VTIMEZONE') {
$componentType = $component->name;
$uid = (string)$component->UID;
break;
@@ -2446,7 +2446,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
'size' => strlen($calendarData),
'componentType' => $componentType,
'firstOccurence' => is_null($firstOccurrence) ? null : max(0, $firstOccurrence),
- 'lastOccurence' => $lastOccurrence,
+ 'lastOccurence' => $lastOccurrence,
'uid' => $uid,
'classification' => $classification
];
@@ -2493,7 +2493,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @param int $calendarType
* @return array
*/
- public function getShares($resourceId, $calendarType=self::CALENDAR_TYPE_CALENDAR) {
+ public function getShares($resourceId, $calendarType = self::CALENDAR_TYPE_CALENDAR) {
return $this->calendarSharingBackend->getShares($resourceId);
}
@@ -2574,7 +2574,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @param string $calendarData
* @param int $calendarType
*/
- public function updateProperties($calendarId, $objectUri, $calendarData, $calendarType=self::CALENDAR_TYPE_CALENDAR) {
+ public function updateProperties($calendarId, $objectUri, $calendarData, $calendarType = self::CALENDAR_TYPE_CALENDAR) {
$objectId = $this->getCalendarObjectId($calendarId, $objectUri, $calendarType);
try {
diff --git a/apps/dav/lib/CalDAV/Calendar.php b/apps/dav/lib/CalDAV/Calendar.php
index 913401b624d..abddf2b706f 100644
--- a/apps/dav/lib/CalDAV/Calendar.php
+++ b/apps/dav/lib/CalDAV/Calendar.php
@@ -138,7 +138,7 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable {
* @return array
*/
public function getACL() {
- $acl = [
+ $acl = [
[
'privilege' => '{DAV:}read',
'principal' => $this->getOwner(),
@@ -191,7 +191,7 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable {
}
if ($this->getOwner() !== parent::getOwner()) {
- $acl[] = [
+ $acl[] = [
'privilege' => '{DAV:}read',
'principal' => parent::getOwner(),
'protected' => true,
diff --git a/apps/dav/lib/CalDAV/CalendarHome.php b/apps/dav/lib/CalDAV/CalendarHome.php
index 90f8f294212..1a00ad94af5 100644
--- a/apps/dav/lib/CalDAV/CalendarHome.php
+++ b/apps/dav/lib/CalDAV/CalendarHome.php
@@ -52,7 +52,7 @@ class CalendarHome extends \Sabre\CalDAV\CalendarHome {
private $pluginManager;
/** @var bool */
- private $returnCachedSubscriptions=false;
+ private $returnCachedSubscriptions = false;
public function __construct(BackendInterface $caldavBackend, $principalInfo) {
parent::__construct($caldavBackend, $principalInfo);
@@ -183,7 +183,7 @@ class CalendarHome extends \Sabre\CalDAV\CalendarHome {
* @param integer|null $limit
* @param integer|null $offset
*/
- public function calendarSearch(array $filters, $limit=null, $offset=null) {
+ public function calendarSearch(array $filters, $limit = null, $offset = null) {
$principalUri = $this->principalInfo['uri'];
return $this->caldavBackend->calendarSearch($principalUri, $filters, $limit, $offset);
}
diff --git a/apps/dav/lib/CalDAV/CalendarImpl.php b/apps/dav/lib/CalDAV/CalendarImpl.php
index b938a8999a6..2f4aa858a32 100644
--- a/apps/dav/lib/CalDAV/CalendarImpl.php
+++ b/apps/dav/lib/CalDAV/CalendarImpl.php
@@ -89,7 +89,7 @@ class CalendarImpl implements ICalendar {
* @return array an array of events/journals/todos which are arrays of key-value-pairs
* @since 13.0.0
*/
- public function search($pattern, array $searchProperties=[], array $options=[], $limit=null, $offset=null) {
+ public function search($pattern, array $searchProperties = [], array $options = [], $limit = null, $offset = null) {
return $this->backend->search($this->calendarInfo, $pattern,
$searchProperties, $options, $limit, $offset);
}
diff --git a/apps/dav/lib/CalDAV/Proxy/ProxyMapper.php b/apps/dav/lib/CalDAV/Proxy/ProxyMapper.php
index e29d492538d..a422b19a46b 100644
--- a/apps/dav/lib/CalDAV/Proxy/ProxyMapper.php
+++ b/apps/dav/lib/CalDAV/Proxy/ProxyMapper.php
@@ -37,7 +37,7 @@ use OCP\IDBConnection;
* @package OCA\DAV\CalDAV\Proxy
*/
class ProxyMapper extends QBMapper {
- public const PERMISSION_READ = 1;
+ public const PERMISSION_READ = 1;
public const PERMISSION_WRITE = 2;
/**
diff --git a/apps/dav/lib/CalDAV/Reminder/INotificationProvider.php b/apps/dav/lib/CalDAV/Reminder/INotificationProvider.php
index 23fd60a290d..87fdc68baf0 100644
--- a/apps/dav/lib/CalDAV/Reminder/INotificationProvider.php
+++ b/apps/dav/lib/CalDAV/Reminder/INotificationProvider.php
@@ -47,5 +47,5 @@ interface INotificationProvider {
*/
public function send(VEvent $vevent,
string $calendarDisplayName,
- array $users=[]): void;
+ array $users = []): void;
}
diff --git a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/AbstractProvider.php b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/AbstractProvider.php
index 9a6c3fa6aeb..5b46271f453 100644
--- a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/AbstractProvider.php
+++ b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/AbstractProvider.php
@@ -95,7 +95,7 @@ abstract class AbstractProvider implements INotificationProvider {
*/
abstract public function send(VEvent $vevent,
string $calendarDisplayName,
- array $users=[]): void;
+ array $users = []): void;
/**
* @return string
diff --git a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php
index ef824821e31..754cdc8c616 100644
--- a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php
+++ b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php
@@ -83,7 +83,7 @@ class EmailProvider extends AbstractProvider {
*/
public function send(VEvent $vevent,
string $calendarDisplayName,
- array $users=[]):void {
+ array $users = []):void {
$fallbackLanguage = $this->getFallbackLanguage();
$emailAddressesOfSharees = $this->getEMailAddressesOfAllUsersWithWriteAccessToCalendar($users);
diff --git a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php
index 769f9927e47..6db3ca563ae 100644
--- a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php
+++ b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php
@@ -86,8 +86,8 @@ class PushProvider extends AbstractProvider {
* @throws \Exception
*/
public function send(VEvent $vevent,
- string $calendarDisplayName=null,
- array $users=[]):void {
+ string $calendarDisplayName = null,
+ array $users = []):void {
if ($this->config->getAppValue('dav', 'sendEventRemindersPush', 'no') !== 'yes') {
return;
}
diff --git a/apps/dav/lib/CalDAV/Reminder/ReminderService.php b/apps/dav/lib/CalDAV/Reminder/ReminderService.php
index 76b4765a4fd..688b4ce6107 100644
--- a/apps/dav/lib/CalDAV/Reminder/ReminderService.php
+++ b/apps/dav/lib/CalDAV/Reminder/ReminderService.php
@@ -330,10 +330,10 @@ class ReminderService {
*/
private function getRemindersForVAlarm(VAlarm $valarm,
array $objectData,
- string $eventHash=null,
- string $alarmHash=null,
- bool $isRecurring=false,
- bool $isRecurrenceException=false):array {
+ string $eventHash = null,
+ string $alarmHash = null,
+ bool $isRecurring = false,
+ bool $isRecurrenceException = false):array {
if ($eventHash === null) {
$eventHash = $this->getEventHash($valarm->parent);
}
diff --git a/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php b/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php
index d2309232df7..481c576081e 100644
--- a/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php
+++ b/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php
@@ -435,7 +435,7 @@ abstract class AbstractPrincipalBackend implements BackendInterface {
* @param String[] $metadata
* @return Array
*/
- private function rowToPrincipal(array $row, array $metadata=[]):array {
+ private function rowToPrincipal(array $row, array $metadata = []):array {
return array_merge([
'uri' => $this->principalPrefix . '/' . $row['backend_id'] . '-' . $row['resource_id'],
'{DAV:}displayname' => $row['displayname'],
diff --git a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
index e360273383e..b88364aaa9d 100644
--- a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
+++ b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
@@ -293,7 +293,7 @@ class IMipPlugin extends SabreIMipPlugin {
$failed = $this->mailer->send($message);
$iTipMessage->scheduleStatus = '1.1; Scheduling message is sent via iMip';
if ($failed) {
- $this->logger->error('Unable to deliver message to {failed}', ['app' => 'dav', 'failed' => implode(', ', $failed)]);
+ $this->logger->error('Unable to deliver message to {failed}', ['app' => 'dav', 'failed' => implode(', ', $failed)]);
$iTipMessage->scheduleStatus = '5.0; EMail delivery failed';
}
} catch (\Exception $ex) {
diff --git a/apps/dav/lib/CalDAV/Schedule/Plugin.php b/apps/dav/lib/CalDAV/Schedule/Plugin.php
index aa597d0cab8..9ccabdc86fd 100644
--- a/apps/dav/lib/CalDAV/Schedule/Plugin.php
+++ b/apps/dav/lib/CalDAV/Schedule/Plugin.php
@@ -208,7 +208,7 @@ class Plugin extends \Sabre\CalDAV\Schedule\Plugin {
}
$dtstart = $vevent->DTSTART;
- $dtend = $this->getDTEndFromVEvent($vevent);
+ $dtend = $this->getDTEndFromVEvent($vevent);
$uid = $vevent->UID->getValue();
$sequence = isset($vevent->SEQUENCE) ? $vevent->SEQUENCE->getValue() : 0;
$recurrenceId = isset($vevent->{'RECURRENCE-ID'}) ? $vevent->{'RECURRENCE-ID'}->serialize() : '';
@@ -455,20 +455,20 @@ EOF;
'start' => $start,
'end' => $end,
],
- 'comp-filters' => [],
- 'prop-filters' => [],
+ 'comp-filters' => [],
+ 'prop-filters' => [],
],
[
'name' => 'VEVENT',
'is-not-defined' => false,
'time-range' => null,
- 'comp-filters' => [],
- 'prop-filters' => [
+ 'comp-filters' => [],
+ 'prop-filters' => [
[
- 'name' => 'UID',
+ 'name' => 'UID',
'is-not-defined' => false,
- 'time-range' => null,
- 'text-match' => [
+ 'time-range' => null,
+ 'text-match' => [
'value' => $ignoreUID,
'negate-condition' => true,
'collation' => 'i;octet',
@@ -549,7 +549,7 @@ EOF;
* @return string
*/
private function stripOffMailTo(string $email): string {
- if (stripos($email, 'mailto:') === 0) {
+ if (stripos($email, 'mailto:') === 0) {
return substr($email, 7);
}
diff --git a/apps/dav/lib/CalDAV/Search/Xml/Request/CalendarSearchReport.php b/apps/dav/lib/CalDAV/Search/Xml/Request/CalendarSearchReport.php
index 14e9c764678..d9215a5a73c 100644
--- a/apps/dav/lib/CalDAV/Search/Xml/Request/CalendarSearchReport.php
+++ b/apps/dav/lib/CalDAV/Search/Xml/Request/CalendarSearchReport.php
@@ -87,20 +87,20 @@ class CalendarSearchReport implements XmlDeserializable {
*/
public static function xmlDeserialize(Reader $reader) {
$elems = $reader->parseInnerTree([
- '{http://nextcloud.com/ns}comp-filter' => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\CompFilter',
- '{http://nextcloud.com/ns}prop-filter' => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\PropFilter',
+ '{http://nextcloud.com/ns}comp-filter' => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\CompFilter',
+ '{http://nextcloud.com/ns}prop-filter' => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\PropFilter',
'{http://nextcloud.com/ns}param-filter' => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\ParamFilter',
- '{http://nextcloud.com/ns}search-term' => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\SearchTermFilter',
- '{http://nextcloud.com/ns}limit' => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\LimitFilter',
- '{http://nextcloud.com/ns}offset' => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\OffsetFilter',
- '{DAV:}prop' => 'Sabre\\Xml\\Element\\KeyValue',
+ '{http://nextcloud.com/ns}search-term' => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\SearchTermFilter',
+ '{http://nextcloud.com/ns}limit' => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\LimitFilter',
+ '{http://nextcloud.com/ns}offset' => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\OffsetFilter',
+ '{DAV:}prop' => 'Sabre\\Xml\\Element\\KeyValue',
]);
$newProps = [
- 'filters' => [],
+ 'filters' => [],
'properties' => [],
- 'limit' => null,
- 'offset' => null
+ 'limit' => null,
+ 'offset' => null
];
if (!is_array($elems)) {
diff --git a/apps/dav/lib/CalDAV/WebcalCaching/Plugin.php b/apps/dav/lib/CalDAV/WebcalCaching/Plugin.php
index 4b50fa5b5b9..ac592797d3d 100644
--- a/apps/dav/lib/CalDAV/WebcalCaching/Plugin.php
+++ b/apps/dav/lib/CalDAV/WebcalCaching/Plugin.php
@@ -49,7 +49,7 @@ class Plugin extends ServerPlugin {
/**
* @var bool
*/
- private $enabled=false;
+ private $enabled = false;
/**
* @var Server
diff --git a/apps/dav/lib/CardDAV/AddressBook.php b/apps/dav/lib/CardDAV/AddressBook.php
index 50aa9d219c8..0078dece854 100644
--- a/apps/dav/lib/CardDAV/AddressBook.php
+++ b/apps/dav/lib/CardDAV/AddressBook.php
@@ -105,7 +105,7 @@ class AddressBook extends \Sabre\CardDAV\AddressBook implements IShareable {
}
public function getACL() {
- $acl = [
+ $acl = [
[
'privilege' => '{DAV:}read',
'principal' => $this->getOwner(),
@@ -130,7 +130,7 @@ class AddressBook extends \Sabre\CardDAV\AddressBook implements IShareable {
}
if ($this->getOwner() !== parent::getOwner()) {
- $acl[] = [
+ $acl[] = [
'privilege' => '{DAV:}read',
'principal' => parent::getOwner(),
'protected' => true,
diff --git a/apps/dav/lib/CardDAV/CardDavBackend.php b/apps/dav/lib/CardDAV/CardDavBackend.php
index 14ade3f16e2..b9aecbd1c36 100644
--- a/apps/dav/lib/CardDAV/CardDavBackend.php
+++ b/apps/dav/lib/CardDAV/CardDavBackend.php
@@ -1044,7 +1044,7 @@ class CardDavBackend implements BackendInterface, SyncSupport {
$query2 = $this->db->getQueryBuilder();
- $addressBookOr = $query2->expr()->orX();
+ $addressBookOr = $query2->expr()->orX();
foreach ($addressBookIds as $addressBookId) {
$addressBookOr->add($query2->expr()->eq('cp.addressbookid', $query2->createNamedParameter($addressBookId)));
}
diff --git a/apps/dav/lib/CardDAV/Converter.php b/apps/dav/lib/CardDAV/Converter.php
index 8dea77bd0a6..dd7ceb77c55 100644
--- a/apps/dav/lib/CardDAV/Converter.php
+++ b/apps/dav/lib/CardDAV/Converter.php
@@ -124,9 +124,9 @@ class Converter {
$elements = explode(' ', $fullName);
$result = ['', '', '', '', ''];
if (count($elements) > 2) {
- $result[0] = implode(' ', array_slice($elements, count($elements)-1));
+ $result[0] = implode(' ', array_slice($elements, count($elements) - 1));
$result[1] = $elements[0];
- $result[2] = implode(' ', array_slice($elements, 1, count($elements)-2));
+ $result[2] = implode(' ', array_slice($elements, 1, count($elements) - 2));
} elseif (count($elements) === 2) {
$result[0] = $elements[1];
$result[1] = $elements[0];
diff --git a/apps/dav/lib/CardDAV/HasPhotoPlugin.php b/apps/dav/lib/CardDAV/HasPhotoPlugin.php
index d54b8581ad9..a77a75c6cc6 100644
--- a/apps/dav/lib/CardDAV/HasPhotoPlugin.php
+++ b/apps/dav/lib/CardDAV/HasPhotoPlugin.php
@@ -99,7 +99,7 @@ class HasPhotoPlugin extends ServerPlugin {
*/
public function getPluginInfo() {
return [
- 'name' => $this->getPluginName(),
+ 'name' => $this->getPluginName(),
'description' => 'Return a boolean stating if the vcard have a photo property set or not.'
];
}
diff --git a/apps/dav/lib/CardDAV/MultiGetExportPlugin.php b/apps/dav/lib/CardDAV/MultiGetExportPlugin.php
index bb911ffc033..e2dbb049bf0 100644
--- a/apps/dav/lib/CardDAV/MultiGetExportPlugin.php
+++ b/apps/dav/lib/CardDAV/MultiGetExportPlugin.php
@@ -70,7 +70,7 @@ class MultiGetExportPlugin extends DAV\ServerPlugin {
// Get the xml response
$responseBody = $response->getBodyAsString();
- $responseXml = $this->server->xml->parse($responseBody);
+ $responseXml = $this->server->xml->parse($responseBody);
// Reduce the vcards into one string
$output = array_reduce($responseXml->getResponses(), function ($vcf, $card) {
@@ -114,7 +114,7 @@ class MultiGetExportPlugin extends DAV\ServerPlugin {
*/
public function getPluginInfo() {
return [
- 'name' => $this->getPluginName(),
+ 'name' => $this->getPluginName(),
'description' => 'Intercept a multi-get request and return a single vcf file instead.'
];
}
diff --git a/apps/dav/lib/CardDAV/PhotoCache.php b/apps/dav/lib/CardDAV/PhotoCache.php
index 620a88dcfb8..3d88eef5789 100644
--- a/apps/dav/lib/CardDAV/PhotoCache.php
+++ b/apps/dav/lib/CardDAV/PhotoCache.php
@@ -240,7 +240,7 @@ class PhotoCache {
return [
'Content-Type' => $type,
- 'body' => $val
+ 'body' => $val
];
} catch (\Exception $e) {
$this->logger->logException($e, [
diff --git a/apps/dav/lib/Comments/CommentNode.php b/apps/dav/lib/Comments/CommentNode.php
index f0552dcdc8e..4a0cfe78028 100644
--- a/apps/dav/lib/Comments/CommentNode.php
+++ b/apps/dav/lib/Comments/CommentNode.php
@@ -256,7 +256,7 @@ class CommentNode implements \Sabre\DAV\INode, \Sabre\DAV\IProperties {
$result[self::PROPERTY_NAME_MENTIONS] = $this->composeMentionsPropertyValue();
$unread = null;
- $user = $this->userSession->getUser();
+ $user = $this->userSession->getUser();
if (!is_null($user)) {
$readUntil = $this->commentsManager->getReadMark(
$this->comment->getObjectType(),
@@ -295,8 +295,8 @@ class CommentNode implements \Sabre\DAV\INode, \Sabre\DAV\IProperties {
return [
self::PROPERTY_NAME_MENTION => [
- self::PROPERTY_NAME_MENTION_TYPE => $mention['type'],
- self::PROPERTY_NAME_MENTION_ID => $mention['id'],
+ self::PROPERTY_NAME_MENTION_TYPE => $mention['type'],
+ self::PROPERTY_NAME_MENTION_ID => $mention['id'],
self::PROPERTY_NAME_MENTION_DISPLAYNAME => $displayName,
]
];
diff --git a/apps/dav/lib/Comments/CommentsPlugin.php b/apps/dav/lib/Comments/CommentsPlugin.php
index ec15d497276..058ed968f1f 100644
--- a/apps/dav/lib/Comments/CommentsPlugin.php
+++ b/apps/dav/lib/Comments/CommentsPlugin.php
@@ -48,9 +48,9 @@ class CommentsPlugin extends ServerPlugin {
// namespace
public const NS_OWNCLOUD = 'http://owncloud.org/ns';
- public const REPORT_NAME = '{http://owncloud.org/ns}filter-comments';
- public const REPORT_PARAM_LIMIT = '{http://owncloud.org/ns}limit';
- public const REPORT_PARAM_OFFSET = '{http://owncloud.org/ns}offset';
+ public const REPORT_NAME = '{http://owncloud.org/ns}filter-comments';
+ public const REPORT_PARAM_LIMIT = '{http://owncloud.org/ns}limit';
+ public const REPORT_PARAM_OFFSET = '{http://owncloud.org/ns}offset';
public const REPORT_PARAM_TIMESTAMP = '{http://owncloud.org/ns}datetime';
/** @var ICommentsManager */
diff --git a/apps/dav/lib/Comments/EntityCollection.php b/apps/dav/lib/Comments/EntityCollection.php
index 106d6f99432..b68e3b9cf46 100644
--- a/apps/dav/lib/Comments/EntityCollection.php
+++ b/apps/dav/lib/Comments/EntityCollection.php
@@ -42,7 +42,7 @@ use Sabre\DAV\PropPatch;
* @package OCA\DAV\Comments
*/
class EntityCollection extends RootCollection implements IProperties {
- public const PROPERTY_NAME_READ_MARKER = '{http://owncloud.org/ns}readMarker';
+ public const PROPERTY_NAME_READ_MARKER = '{http://owncloud.org/ns}readMarker';
/** @var string */
protected $id;
diff --git a/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php b/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php
index 22e418ee561..d5eb7062dd1 100644
--- a/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php
@@ -32,8 +32,8 @@ use Sabre\DAV\PropFind;
use Sabre\DAV\ServerPlugin;
class CommentPropertiesPlugin extends ServerPlugin {
- public const PROPERTY_NAME_HREF = '{http://owncloud.org/ns}comments-href';
- public const PROPERTY_NAME_COUNT = '{http://owncloud.org/ns}comments-count';
+ public const PROPERTY_NAME_HREF = '{http://owncloud.org/ns}comments-href';
+ public const PROPERTY_NAME_COUNT = '{http://owncloud.org/ns}comments-count';
public const PROPERTY_NAME_UNREAD = '{http://owncloud.org/ns}comments-unread';
/** @var \Sabre\DAV\Server */
@@ -131,7 +131,7 @@ class CommentPropertiesPlugin extends ServerPlugin {
* @return mixed|string
*/
public function getCommentsLink(Node $node) {
- $href = $this->server->getBaseUri();
+ $href = $this->server->getBaseUri();
$entryPoint = strpos($href, '/remote.php/');
if ($entryPoint === false) {
// in case we end up somewhere else, unexpectedly.
diff --git a/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php b/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php
index 0e7db3f57ce..8721613fea4 100644
--- a/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php
@@ -49,7 +49,7 @@ class FilesReportPlugin extends ServerPlugin {
// namespace
public const NS_OWNCLOUD = 'http://owncloud.org/ns';
- public const REPORT_NAME = '{http://owncloud.org/ns}filter-files';
+ public const REPORT_NAME = '{http://owncloud.org/ns}filter-files';
public const SYSTEMTAG_PROPERTYNAME = '{http://owncloud.org/ns}systemtag';
public const CIRCLE_PROPERTYNAME = '{http://owncloud.org/ns}circle';
diff --git a/apps/dav/lib/Controller/InvitationResponseController.php b/apps/dav/lib/Controller/InvitationResponseController.php
index eafbe6fbbd8..726ee1c498a 100644
--- a/apps/dav/lib/Controller/InvitationResponseController.php
+++ b/apps/dav/lib/Controller/InvitationResponseController.php
@@ -192,8 +192,8 @@ class InvitationResponseController extends Controller {
* @param string|null $comment
* @return Message
*/
- private function buildITipResponse(array $row, string $partStat, int $guests=null,
- string $comment=null):Message {
+ private function buildITipResponse(array $row, string $partStat, int $guests = null,
+ string $comment = null):Message {
$iTipMessage = new Message();
$iTipMessage->uid = $row['uid'];
$iTipMessage->component = 'VEVENT';
diff --git a/apps/dav/lib/DAV/Sharing/Backend.php b/apps/dav/lib/DAV/Sharing/Backend.php
index 2f8fb0c3107..979eb391354 100644
--- a/apps/dav/lib/DAV/Sharing/Backend.php
+++ b/apps/dav/lib/DAV/Sharing/Backend.php
@@ -198,7 +198,7 @@ class Backend {
$shares = [];
while ($row = $result->fetch()) {
$p = $this->principalBackend->getPrincipalByPath($row['principaluri']);
- $shares[]= [
+ $shares[] = [
'href' => "principal:${row['principaluri']}",
'commonName' => isset($p['{DAV:}displayname']) ? $p['{DAV:}displayname'] : '',
'status' => 1,
diff --git a/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php b/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php
index b364639f69f..c736824d857 100644
--- a/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php
+++ b/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php
@@ -46,7 +46,7 @@ class ShareRequest implements XmlDeserializable {
public static function xmlDeserialize(Reader $reader) {
$elements = $reader->parseInnerTree([
- '{' . Plugin::NS_OWNCLOUD. '}set' => 'Sabre\\Xml\\Element\\KeyValue',
+ '{' . Plugin::NS_OWNCLOUD. '}set' => 'Sabre\\Xml\\Element\\KeyValue',
'{' . Plugin::NS_OWNCLOUD . '}remove' => 'Sabre\\Xml\\Element\\KeyValue',
]);
@@ -63,10 +63,10 @@ class ShareRequest implements XmlDeserializable {
$commonName = '{' . Plugin::NS_OWNCLOUD . '}common-name';
$set[] = [
- 'href' => $sharee['{DAV:}href'],
+ 'href' => $sharee['{DAV:}href'],
'commonName' => isset($sharee[$commonName]) ? $sharee[$commonName] : null,
- 'summary' => isset($sharee[$sumElem]) ? $sharee[$sumElem] : null,
- 'readOnly' => !array_key_exists('{' . Plugin::NS_OWNCLOUD . '}read-write', $sharee),
+ 'summary' => isset($sharee[$sumElem]) ? $sharee[$sumElem] : null,
+ 'readOnly' => !array_key_exists('{' . Plugin::NS_OWNCLOUD . '}read-write', $sharee),
];
break;
diff --git a/apps/dav/lib/Search/TasksSearchProvider.php b/apps/dav/lib/Search/TasksSearchProvider.php
index 23ccdab323f..26fb659aa18 100644
--- a/apps/dav/lib/Search/TasksSearchProvider.php
+++ b/apps/dav/lib/Search/TasksSearchProvider.php
@@ -162,7 +162,7 @@ class TasksSearchProvider extends ACalendarSearchProvider {
$formattedDate = $this->l10n->l('date', $dueDateTime, ['width' => 'medium']);
if ($taskComponent->DUE->hasTime()) {
- $formattedTime = $this->l10n->l('time', $dueDateTime, ['width' => 'short']);
+ $formattedTime = $this->l10n->l('time', $dueDateTime, ['width' => 'short']);
return $this->l10n->t('Due on %s by %s', [$formattedDate, $formattedTime]);
}
diff --git a/apps/dav/tests/unit/CalDAV/BirthdayCalendar/EnablePluginTest.php b/apps/dav/tests/unit/CalDAV/BirthdayCalendar/EnablePluginTest.php
index 3d2eda235eb..0e6e76d3927 100644
--- a/apps/dav/tests/unit/CalDAV/BirthdayCalendar/EnablePluginTest.php
+++ b/apps/dav/tests/unit/CalDAV/BirthdayCalendar/EnablePluginTest.php
@@ -131,7 +131,7 @@ class EnablePluginTest extends TestCase {
$this->server->xml->expects($this->once())
->method('parse')
->willReturnCallback(function ($requestBody, $url, &$documentType) {
- $documentType = '{http://nextcloud.com/ns}disable-birthday-calendar';
+ $documentType = '{http://nextcloud.com/ns}disable-birthday-calendar';
});
$this->config->expects($this->never())
diff --git a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php
index 06b963ffb4b..157eaa1ee48 100644
--- a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php
+++ b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php
@@ -563,7 +563,7 @@ EOD;
}
public function providesSchedulingData() {
- $data =<<<EOS
+ $data = <<<EOS
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Sabre//Sabre VObject 3.5.0//EN
@@ -888,7 +888,7 @@ END:VCALENDAR
EOD;
$uriCount = count($uris);
- for ($i=0; $i < $uriCount; $i++) {
+ for ($i = 0; $i < $uriCount; $i++) {
$this->backend->createCalendarObject($calendarId,
$uris[$i], $calData[$i]);
}
diff --git a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php
index 226a7a28baf..47fcc1680f6 100644
--- a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php
+++ b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php
@@ -381,7 +381,7 @@ class EmailProviderTest extends AbstractNotificationProviderTest {
* @param array $replyTo
* @return IMessage
*/
- private function getMessageMock(string $toMail, IEMailTemplate $templateMock, array $replyTo=null):IMessage {
+ private function getMessageMock(string $toMail, IEMailTemplate $templateMock, array $replyTo = null):IMessage {
$message = $this->createMock(IMessage::class);
$i = 0;
@@ -473,7 +473,7 @@ class EmailProviderTest extends AbstractNotificationProviderTest {
return $vcalendar;
}
- private function setupURLGeneratorMock(int $times=1):void {
+ private function setupURLGeneratorMock(int $times = 1):void {
for ($i = 0; $i < $times; $i++) {
$this->urlGenerator
->expects($this->at(8 * $i))
diff --git a/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php b/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php
index 2195563753f..2d4cbfd0c8c 100644
--- a/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php
+++ b/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php
@@ -397,7 +397,7 @@ EOD;
'is_relative' => false,
'notification_date' => 1465344000,
'is_repeat_based' => false,
- 'calendardata' => self::CALENDAR_DATA,
+ 'calendardata' => self::CALENDAR_DATA,
'displayname' => 'Displayname 123',
'principaluri' => 'principals/users/user001',
],
diff --git a/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php b/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php
index 60a4ee1c046..5d1323ba8b9 100644
--- a/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php
+++ b/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php
@@ -345,7 +345,7 @@ class BirthdayServiceTest extends TestCase {
->with('principal001', 'contact_birthdays', [
'{DAV:}displayname' => 'Contact birthdays',
'{http://apple.com/ns/ical/}calendar-color' => '#E9D859',
- 'components' => 'VEVENT',
+ 'components' => 'VEVENT',
]);
$this->service->ensureCalendarExists('principal001');
}
diff --git a/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php b/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php
index 95617001b31..fe83a41038c 100644
--- a/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php
+++ b/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php
@@ -358,7 +358,7 @@ class CardDavBackendTest extends TestCase {
$this->assertArrayHasKey('lastmodified', $card);
$this->assertArrayHasKey('etag', $card);
$this->assertArrayHasKey('size', $card);
- $this->assertEquals($this->{ 'vcardTest'.($index+1) }, $card['carddata']);
+ $this->assertEquals($this->{ 'vcardTest'.($index + 1) }, $card['carddata']);
}
// delete the card
@@ -668,7 +668,7 @@ class CardDavBackendTest extends TestCase {
$vCardIds = [];
$query = $this->db->getQueryBuilder();
- for ($i=0; $i < 3; $i++) {
+ for ($i = 0; $i < 3; $i++) {
$query->insert($this->dbCardsTable)
->values(
[
@@ -767,7 +767,7 @@ class CardDavBackendTest extends TestCase {
'limit' => ['john', ['FN'], ['limit' => 1], [['uri0', 'John Doe']]],
'limit and offset' => ['john', ['FN'], ['limit' => 1, 'offset' => 1], [['uri1', 'John M. Doe']]],
'find "_" escaped' => ['_', ['CLOUD'], [], [['uri2', 'find without options']]],
- 'find not empty CLOUD' => ['%_%', ['CLOUD'], ['escape_like_param'=>false], [['uri0', 'John Doe'], ['uri2', 'find without options']]],
+ 'find not empty CLOUD' => ['%_%', ['CLOUD'], ['escape_like_param' => false], [['uri0', 'John Doe'], ['uri2', 'find without options']]],
];
}
@@ -800,7 +800,7 @@ class CardDavBackendTest extends TestCase {
public function testGetContact() {
$query = $this->db->getQueryBuilder();
- for ($i=0; $i<2; $i++) {
+ for ($i = 0; $i < 2; $i++) {
$query->insert($this->dbCardsTable)
->values(
[
diff --git a/apps/dav/tests/unit/Comments/CommentsPluginTest.php b/apps/dav/tests/unit/Comments/CommentsPluginTest.php
index c2234f116fc..02d702e9f46 100644
--- a/apps/dav/tests/unit/Comments/CommentsPluginTest.php
+++ b/apps/dav/tests/unit/Comments/CommentsPluginTest.php
@@ -668,11 +668,11 @@ class CommentsPluginTest extends \Test\TestCase {
$parameters = [
[
- 'name' => '{http://owncloud.org/ns}limit',
+ 'name' => '{http://owncloud.org/ns}limit',
'value' => 5,
],
[
- 'name' => '{http://owncloud.org/ns}offset',
+ 'name' => '{http://owncloud.org/ns}offset',
'value' => 10,
],
[
@@ -723,11 +723,11 @@ class CommentsPluginTest extends \Test\TestCase {
$parameters = [
[
- 'name' => '{http://owncloud.org/ns}limit',
+ 'name' => '{http://owncloud.org/ns}limit',
'value' => 5,
],
[
- 'name' => '{http://owncloud.org/ns}offset',
+ 'name' => '{http://owncloud.org/ns}offset',
'value' => 10,
],
[
diff --git a/apps/dav/tests/unit/Connector/Sabre/CommentsPropertiesPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/CommentsPropertiesPluginTest.php
index 9585fae9cf8..6ad053e9164 100644
--- a/apps/dav/tests/unit/Connector/Sabre/CommentsPropertiesPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/CommentsPropertiesPluginTest.php
@@ -62,7 +62,7 @@ class CommentsPropertiesPluginTest extends \Test\TestCase {
public function nodeProvider() {
$mocks = [];
foreach (['\OCA\DAV\Connector\Sabre\File', '\OCA\DAV\Connector\Sabre\Directory', '\Sabre\DAV\INode'] as $class) {
- $mocks[] = $this->getMockBuilder($class)
+ $mocks[] = $this->getMockBuilder($class)
->disableOriginalConstructor()
->getMock();
}
diff --git a/apps/dav/tests/unit/Connector/Sabre/FileTest.php b/apps/dav/tests/unit/Connector/Sabre/FileTest.php
index 7770239fe55..f7c3de34f9d 100644
--- a/apps/dav/tests/unit/Connector/Sabre/FileTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/FileTest.php
@@ -1177,8 +1177,8 @@ class FileTest extends TestCase {
$storage = new Temporary([]);
$storage->file_put_contents('file.txt', 'old content');
$noCreateStorage = new PermissionsMask([
- 'storage'=> $storage,
- 'mask' => Constants::PERMISSION_ALL - Constants::PERMISSION_CREATE
+ 'storage' => $storage,
+ 'mask' => Constants::PERMISSION_ALL - Constants::PERMISSION_CREATE
]);
$this->registerMount($this->user, $noCreateStorage, '/' . $this->user . '/files/root');
diff --git a/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php
index 2a6bd96c543..56b83aa46b6 100644
--- a/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php
@@ -199,14 +199,14 @@ class FilesReportPluginTest extends \Test\TestCase {
$parameters = [
[
- 'name' => '{DAV:}prop',
+ 'name' => '{DAV:}prop',
'value' => [
['name' => '{DAV:}getcontentlength', 'value' => ''],
['name' => '{http://owncloud.org/ns}size', 'value' => ''],
],
],
[
- 'name' => '{http://owncloud.org/ns}filter-rules',
+ 'name' => '{http://owncloud.org/ns}filter-rules',
'value' => [
['name' => '{http://owncloud.org/ns}systemtag', 'value' => '123'],
['name' => '{http://owncloud.org/ns}systemtag', 'value' => '456'],
diff --git a/apps/dav/tests/unit/Controller/DirectControllerTest.php b/apps/dav/tests/unit/Controller/DirectControllerTest.php
index 849cabc7da5..0cfe7c5cde4 100644
--- a/apps/dav/tests/unit/Controller/DirectControllerTest.php
+++ b/apps/dav/tests/unit/Controller/DirectControllerTest.php
@@ -141,7 +141,7 @@ class DirectControllerTest extends TestCase {
$this->assertSame('awesomeUser', $direct->getUserId());
$this->assertSame(101, $direct->getFileId());
$this->assertSame('superduperlongtoken', $direct->getToken());
- $this->assertSame(42 + 60*60*8, $direct->getExpiration());
+ $this->assertSame(42 + 60 * 60 * 8, $direct->getExpiration());
});
$this->urlGenerator->method('getAbsoluteURL')
diff --git a/apps/dav/tests/unit/Upload/AssemblyStreamTest.php b/apps/dav/tests/unit/Upload/AssemblyStreamTest.php
index 6031c090ab0..ec710e8d2ca 100644
--- a/apps/dav/tests/unit/Upload/AssemblyStreamTest.php
+++ b/apps/dav/tests/unit/Upload/AssemblyStreamTest.php
@@ -80,7 +80,7 @@ class AssemblyStreamTest extends \Test\TestCase {
$tonofnodes = [];
$tonofdata = "";
for ($i = 0; $i < 101; $i++) {
- $thisdata = rand(0,100); // variable length and content
+ $thisdata = rand(0,100); // variable length and content
$tonofdata .= $thisdata;
array_push($tonofnodes, $this->buildNode($i,$thisdata));
}
diff --git a/apps/encryption/lib/Crypto/DecryptAll.php b/apps/encryption/lib/Crypto/DecryptAll.php
index d8760a0b717..926d4b38db1 100644
--- a/apps/encryption/lib/Crypto/DecryptAll.php
+++ b/apps/encryption/lib/Crypto/DecryptAll.php
@@ -84,7 +84,7 @@ class DecryptAll {
if ($this->util->isMasterKeyEnabled()) {
$output->writeln('Use master key to decrypt all files');
$user = $this->keyManager->getMasterKeyId();
- $password =$this->keyManager->getMasterKeyPassword();
+ $password = $this->keyManager->getMasterKeyPassword();
} else {
$recoveryKeyId = $this->keyManager->getRecoveryKeyId();
if (!empty($user)) {
diff --git a/apps/encryption/lib/Crypto/EncryptAll.php b/apps/encryption/lib/Crypto/EncryptAll.php
index 8fa2214234e..8124f2a7a75 100644
--- a/apps/encryption/lib/Crypto/EncryptAll.php
+++ b/apps/encryption/lib/Crypto/EncryptAll.php
@@ -264,7 +264,7 @@ class EncryptAll {
protected function encryptUsersFiles($uid, ProgressBar $progress, $userCount) {
$this->setupUserFS($uid);
$directories = [];
- $directories[] = '/' . $uid . '/files';
+ $directories[] = '/' . $uid . '/files';
while ($root = array_pop($directories)) {
$content = $this->rootView->getDirectoryContent($root);
diff --git a/apps/encryption/lib/KeyManager.php b/apps/encryption/lib/KeyManager.php
index 0a4a29eb166..64ef1bd232c 100644
--- a/apps/encryption/lib/KeyManager.php
+++ b/apps/encryption/lib/KeyManager.php
@@ -508,7 +508,7 @@ class KeyManager {
* @param View $view
*/
public function setVersion($path, $version, View $view) {
- $fileInfo= $view->getFileInfo($path);
+ $fileInfo = $view->getFileInfo($path);
if ($fileInfo !== false) {
$cache = $fileInfo->getStorage()->getCache();
diff --git a/apps/encryption/lib/Settings/Admin.php b/apps/encryption/lib/Settings/Admin.php
index d3b64bee4ee..c7493278ead 100644
--- a/apps/encryption/lib/Settings/Admin.php
+++ b/apps/encryption/lib/Settings/Admin.php
@@ -99,10 +99,10 @@ class Admin implements ISettings {
$encryptHomeStorage = $util->shouldEncryptHomeStorage();
$parameters = [
- 'recoveryEnabled' => $recoveryAdminEnabled,
- 'initStatus' => $session->getStatus(),
+ 'recoveryEnabled' => $recoveryAdminEnabled,
+ 'initStatus' => $session->getStatus(),
'encryptHomeStorage' => $encryptHomeStorage,
- 'masterKeyEnabled' => $util->isMasterKeyEnabled(),
+ 'masterKeyEnabled' => $util->isMasterKeyEnabled(),
];
return new TemplateResponse('encryption', 'settings-admin', $parameters, '');
diff --git a/apps/encryption/templates/settings-personal.php b/apps/encryption/templates/settings-personal.php
index 23886b7c824..899ba4a1747 100644
--- a/apps/encryption/templates/settings-personal.php
+++ b/apps/encryption/templates/settings-personal.php
@@ -42,7 +42,7 @@ script('encryption', 'settings-personal');
<span class="msg"></span>
</p>
- <?php elseif ($_["recoveryEnabled"] && $_["privateKeySet"] && $_["initialized"] === \OCA\Encryption\Session::INIT_SUCCESSFUL): ?>
+ <?php elseif ($_["recoveryEnabled"] && $_["privateKeySet"] && $_["initialized"] === \OCA\Encryption\Session::INIT_SUCCESSFUL): ?>
<br />
<p id="userEnableRecovery">
<label for="userEnableRecovery"><?php p($l->t("Enable password recovery:")); ?></label>
diff --git a/apps/encryption/tests/Crypto/CryptTest.php b/apps/encryption/tests/Crypto/CryptTest.php
index a49a37bea08..7bfaed0b17e 100644
--- a/apps/encryption/tests/Crypto/CryptTest.php
+++ b/apps/encryption/tests/Crypto/CryptTest.php
@@ -306,7 +306,7 @@ class CryptTest extends TestCase {
* test parseHeader()
*/
public function testParseHeader() {
- $header= 'HBEGIN:foo:bar:cipher:AES-256-CFB:HEND';
+ $header = 'HBEGIN:foo:bar:cipher:AES-256-CFB:HEND';
$result = self::invokePrivate($this->crypt, 'parseHeader', [$header]);
$this->assertTrue(is_array($result));
diff --git a/apps/encryption/tests/Crypto/EncryptAllTest.php b/apps/encryption/tests/Crypto/EncryptAllTest.php
index 10d667bb4a8..8254cfc9b78 100644
--- a/apps/encryption/tests/Crypto/EncryptAllTest.php
+++ b/apps/encryption/tests/Crypto/EncryptAllTest.php
@@ -306,15 +306,15 @@ class EncryptAllTest extends TestCase {
$this->view->expects($this->at(0))->method('getDirectoryContent')
->with('/user1/files')->willReturn(
[
- ['name' => 'foo', 'type'=>'dir'],
- ['name' => 'bar', 'type'=>'file'],
+ ['name' => 'foo', 'type' => 'dir'],
+ ['name' => 'bar', 'type' => 'file'],
]
);
$this->view->expects($this->at(3))->method('getDirectoryContent')
->with('/user1/files/foo')->willReturn(
[
- ['name' => 'subfile', 'type'=>'file']
+ ['name' => 'subfile', 'type' => 'file']
]
);
diff --git a/apps/encryption/tests/KeyManagerTest.php b/apps/encryption/tests/KeyManagerTest.php
index d3350af21e8..1180c65a871 100644
--- a/apps/encryption/tests/KeyManagerTest.php
+++ b/apps/encryption/tests/KeyManagerTest.php
@@ -237,7 +237,7 @@ class KeyManagerTest extends TestCase {
$this->keyStorageMock->expects($this->exactly(2))
->method('getUserKey')
->willReturnCallback(function ($uid, $keyID, $encryptionModuleId) {
- if ($keyID=== 'privateKey') {
+ if ($keyID === 'privateKey') {
return '';
}
return 'key';
diff --git a/apps/federatedfilesharing/lib/FederatedShareProvider.php b/apps/federatedfilesharing/lib/FederatedShareProvider.php
index f68ec027819..ac6f3c96a16 100644
--- a/apps/federatedfilesharing/lib/FederatedShareProvider.php
+++ b/apps/federatedfilesharing/lib/FederatedShareProvider.php
@@ -465,7 +465,7 @@ class FederatedShareProvider implements IShareProvider {
$query->insert('federated_reshares')
->values(
[
- 'share_id' => $query->createNamedParameter($shareId),
+ 'share_id' => $query->createNamedParameter($shareId),
'remote_id' => $query->createNamedParameter($remoteId),
]
);
diff --git a/apps/federatedfilesharing/lib/Notifications.php b/apps/federatedfilesharing/lib/Notifications.php
index 61513cd2298..3dfb5de7230 100644
--- a/apps/federatedfilesharing/lib/Notifications.php
+++ b/apps/federatedfilesharing/lib/Notifications.php
@@ -118,7 +118,7 @@ class Notifications {
$ocsStatus = isset($status['ocs']);
$ocsSuccess = $ocsStatus && ($status['ocs']['meta']['statuscode'] === 100 || $status['ocs']['meta']['statuscode'] === 200);
- if ($result['success'] && (!$ocsStatus ||$ocsSuccess)) {
+ if ($result['success'] && (!$ocsStatus || $ocsSuccess)) {
$event = new FederatedShareAddedEvent($remote);
$this->eventDispatcher->dispatchTyped($event);
return true;
@@ -305,7 +305,7 @@ class Notifications {
* @return array
* @throws \Exception
*/
- protected function tryHttpPostToShareEndpoint($remoteDomain, $urlSuffix, array $fields, $action="share") {
+ protected function tryHttpPostToShareEndpoint($remoteDomain, $urlSuffix, array $fields, $action = "share") {
if ($this->addressHandler->urlContainProtocol($remoteDomain) === false) {
$remoteDomain = 'https://' . $remoteDomain;
}
diff --git a/apps/federation/lib/DbHandler.php b/apps/federation/lib/DbHandler.php
index 365a70e2b74..c30bbf51ad8 100644
--- a/apps/federation/lib/DbHandler.php
+++ b/apps/federation/lib/DbHandler.php
@@ -77,7 +77,7 @@ class DbHandler {
$query->insert($this->dbTable)
->values(
[
- 'url' => $query->createParameter('url'),
+ 'url' => $query->createParameter('url'),
'url_hash' => $query->createParameter('url_hash'),
]
)
diff --git a/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php b/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php
index 80d83abdda0..b7bad3aaf35 100644
--- a/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php
+++ b/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php
@@ -181,7 +181,7 @@ class OCSAuthAPIControllerTest extends TestCase {
try {
$result = $ocsAuthApi->getSharedSecret($url, $token);
$this->assertTrue($ok);
- $data = $result->getData();
+ $data = $result->getData();
$this->assertSame('secret', $data['sharedSecret']);
} catch (OCSForbiddenException $e) {
$this->assertFalse($ok);
diff --git a/apps/files/lib/AppInfo/Application.php b/apps/files/lib/AppInfo/Application.php
index 434fb482aa8..7bd3acdf8e4 100644
--- a/apps/files/lib/AppInfo/Application.php
+++ b/apps/files/lib/AppInfo/Application.php
@@ -69,7 +69,7 @@ use Psr\Container\ContainerInterface;
class Application extends App implements IBootstrap {
public const APP_ID = 'files';
- public function __construct(array $urlParams=[]) {
+ public function __construct(array $urlParams = []) {
parent::__construct(self::APP_ID, $urlParams);
}
diff --git a/apps/files/lib/Command/Scan.php b/apps/files/lib/Command/Scan.php
index 6ca6ba76945..2f96e495018 100644
--- a/apps/files/lib/Command/Scan.php
+++ b/apps/files/lib/Command/Scan.php
@@ -299,7 +299,7 @@ class Scan extends Base {
protected function formatExecTime() {
$secs = round($this->execTime);
# convert seconds into HH:MM:SS form
- return sprintf('%02d:%02d:%02d', ($secs/3600), ($secs/60%60), $secs%60);
+ return sprintf('%02d:%02d:%02d', ($secs / 3600), ($secs / 60 % 60), $secs % 60);
}
/**
diff --git a/apps/files/lib/Command/ScanAppData.php b/apps/files/lib/Command/ScanAppData.php
index 7b20fb011b0..f67ac7e6d2d 100644
--- a/apps/files/lib/Command/ScanAppData.php
+++ b/apps/files/lib/Command/ScanAppData.php
@@ -246,7 +246,7 @@ class ScanAppData extends Base {
protected function formatExecTime() {
$secs = round($this->execTime);
# convert seconds into HH:MM:SS form
- return sprintf('%02d:%02d:%02d', ($secs/3600), ($secs/60%60), $secs%60);
+ return sprintf('%02d:%02d:%02d', ($secs / 3600), ($secs / 60 % 60), $secs % 60);
}
/**
diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php
index 1568e0c9f54..c5ff6eff194 100644
--- a/apps/files/lib/Controller/ViewController.php
+++ b/apps/files/lib/Controller/ViewController.php
@@ -95,16 +95,16 @@ class ViewController extends Controller {
Helper $activityHelper
) {
parent::__construct($appName, $request);
- $this->appName = $appName;
- $this->request = $request;
- $this->urlGenerator = $urlGenerator;
- $this->l10n = $l10n;
- $this->config = $config;
+ $this->appName = $appName;
+ $this->request = $request;
+ $this->urlGenerator = $urlGenerator;
+ $this->l10n = $l10n;
+ $this->config = $config;
$this->eventDispatcher = $eventDispatcher;
- $this->userSession = $userSession;
- $this->appManager = $appManager;
- $this->rootFolder = $rootFolder;
- $this->activityHelper = $activityHelper;
+ $this->userSession = $userSession;
+ $this->appManager = $appManager;
+ $this->rootFolder = $rootFolder;
+ $this->activityHelper = $activityHelper;
}
/**
@@ -113,8 +113,8 @@ class ViewController extends Controller {
* @return string
*/
protected function renderScript($appName, $scriptName) {
- $content = '';
- $appPath = \OC_App::getAppPath($appName);
+ $content = '';
+ $appPath = \OC_App::getAppPath($appName);
$scriptPath = $appPath . '/' . $scriptName;
if (file_exists($scriptPath)) {
// TODO: sanitize path / script name ?
@@ -203,19 +203,19 @@ class ViewController extends Controller {
$favoritesSublistArray = [];
$navBarPositionPosition = 6;
- $currentCount = 0;
+ $currentCount = 0;
foreach ($favElements['folders'] as $dir) {
- $link = $this->urlGenerator->linkToRoute('files.view.index', ['dir' => $dir, 'view' => 'files']);
+ $link = $this->urlGenerator->linkToRoute('files.view.index', ['dir' => $dir, 'view' => 'files']);
$sortingValue = ++$currentCount;
- $element = [
- 'id' => str_replace('/', '-', $dir),
- 'view' => 'files',
- 'href' => $link,
- 'dir' => $dir,
- 'order' => $navBarPositionPosition,
- 'folderPosition' => $sortingValue,
- 'name' => basename($dir),
- 'icon' => 'files',
+ $element = [
+ 'id' => str_replace('/', '-', $dir),
+ 'view' => 'files',
+ 'href' => $link,
+ 'dir' => $dir,
+ 'order' => $navBarPositionPosition,
+ 'folderPosition' => $sortingValue,
+ 'name' => basename($dir),
+ 'icon' => 'files',
'quickaccesselement' => 'true'
];
@@ -266,13 +266,13 @@ class ViewController extends Controller {
$subcontent = $this->renderScript($subitem['appname'], $subitem['script']);
}
$contentItems[$subitem['id']] = [
- 'id' => $subitem['id'],
+ 'id' => $subitem['id'],
'content' => $subcontent
];
}
}
$contentItems[$item['id']] = [
- 'id' => $item['id'],
+ 'id' => $item['id'],
'content' => $content
];
}
@@ -285,22 +285,22 @@ class ViewController extends Controller {
$this->eventDispatcher->dispatchTyped(new LoadViewer());
}
- $params = [];
- $params['usedSpacePercent'] = (int) $storageInfo['relative'];
- $params['owner'] = $storageInfo['owner'] ?? '';
- $params['ownerDisplayName'] = $storageInfo['ownerDisplayName'] ?? '';
- $params['isPublic'] = false;
- $params['allowShareWithLink'] = $this->config->getAppValue('core', 'shareapi_allow_links', 'yes');
- $params['defaultFileSorting'] = $this->config->getUserValue($user, 'files', 'file_sorting', 'name');
+ $params = [];
+ $params['usedSpacePercent'] = (int) $storageInfo['relative'];
+ $params['owner'] = $storageInfo['owner'] ?? '';
+ $params['ownerDisplayName'] = $storageInfo['ownerDisplayName'] ?? '';
+ $params['isPublic'] = false;
+ $params['allowShareWithLink'] = $this->config->getAppValue('core', 'shareapi_allow_links', 'yes');
+ $params['defaultFileSorting'] = $this->config->getUserValue($user, 'files', 'file_sorting', 'name');
$params['defaultFileSortingDirection'] = $this->config->getUserValue($user, 'files', 'file_sorting_direction', 'asc');
- $params['showgridview'] = $this->config->getUserValue($user, 'files', 'show_grid', false);
- $params['isIE'] = \OCP\Util::isIE();
- $showHidden = (bool) $this->config->getUserValue($this->userSession->getUser()->getUID(), 'files', 'show_hidden', false);
- $params['showHiddenFiles'] = $showHidden ? 1 : 0;
- $params['fileNotFound'] = $fileNotFound ? 1 : 0;
- $params['appNavigation'] = $nav;
- $params['appContents'] = $contentItems;
- $params['hiddenFields'] = $event->getHiddenFields();
+ $params['showgridview'] = $this->config->getUserValue($user, 'files', 'show_grid', false);
+ $params['isIE'] = \OCP\Util::isIE();
+ $showHidden = (bool) $this->config->getUserValue($this->userSession->getUser()->getUID(), 'files', 'show_hidden', false);
+ $params['showHiddenFiles'] = $showHidden ? 1 : 0;
+ $params['fileNotFound'] = $fileNotFound ? 1 : 0;
+ $params['appNavigation'] = $nav;
+ $params['appContents'] = $contentItems;
+ $params['hiddenFields'] = $event->getHiddenFields();
$response = new TemplateResponse(
$this->appName,
@@ -322,14 +322,14 @@ class ViewController extends Controller {
* @throws \OCP\Files\NotFoundException
*/
private function redirectToFile($fileId) {
- $uid = $this->userSession->getUser()->getUID();
+ $uid = $this->userSession->getUser()->getUID();
$baseFolder = $this->rootFolder->getUserFolder($uid);
- $files = $baseFolder->getById($fileId);
- $params = [];
+ $files = $baseFolder->getById($fileId);
+ $params = [];
if (empty($files) && $this->appManager->isEnabledForUser('files_trashbin')) {
- $baseFolder = $this->rootFolder->get($uid . '/files_trashbin/files/');
- $files = $baseFolder->getById($fileId);
+ $baseFolder = $this->rootFolder->get($uid . '/files_trashbin/files/');
+ $files = $baseFolder->getById($fileId);
$params['view'] = 'trashbin';
}
diff --git a/apps/files/lib/Helper.php b/apps/files/lib/Helper.php
index 2d5a3e2f26e..69ab8f8f64f 100644
--- a/apps/files/lib/Helper.php
+++ b/apps/files/lib/Helper.php
@@ -56,11 +56,11 @@ class Helper {
return [
'uploadMaxFilesize' => $maxUploadFileSize,
- 'maxHumanFilesize' => $maxHumanFileSize,
+ 'maxHumanFilesize' => $maxHumanFileSize,
'freeSpace' => $storageInfo['free'],
'quota' => $storageInfo['quota'],
'used' => $storageInfo['used'],
- 'usedSpacePercent' => (int)$storageInfo['relative'],
+ 'usedSpacePercent' => (int)$storageInfo['relative'],
'owner' => $storageInfo['owner'],
'ownerDisplayName' => $storageInfo['ownerDisplayName'],
'mountType' => $storageInfo['mountType'],
diff --git a/apps/files_external/lib/Lib/Storage/FTP.php b/apps/files_external/lib/Lib/Storage/FTP.php
index d9e5e2a0d5a..60ee33facc0 100644
--- a/apps/files_external/lib/Lib/Storage/FTP.php
+++ b/apps/files_external/lib/Lib/Storage/FTP.php
@@ -47,17 +47,17 @@ class FTP extends StreamWrapper {
public function __construct($params) {
if (isset($params['host']) && isset($params['user']) && isset($params['password'])) {
- $this->host=$params['host'];
- $this->user=$params['user'];
- $this->password=$params['password'];
+ $this->host = $params['host'];
+ $this->user = $params['user'];
+ $this->password = $params['password'];
if (isset($params['secure'])) {
$this->secure = $params['secure'];
} else {
$this->secure = false;
}
- $this->root=isset($params['root'])?$params['root']:'/';
- if (! $this->root || $this->root[0]!=='/') {
- $this->root='/'.$this->root;
+ $this->root = isset($params['root'])?$params['root']:'/';
+ if (! $this->root || $this->root[0] !== '/') {
+ $this->root = '/'.$this->root;
}
if (substr($this->root, -1) !== '/') {
$this->root .= '/';
@@ -77,11 +77,11 @@ class FTP extends StreamWrapper {
* @return string
*/
public function constructUrl($path) {
- $url='ftp';
+ $url = 'ftp';
if ($this->secure) {
- $url.='s';
+ $url .= 's';
}
- $url.='://'.urlencode($this->user).':'.urlencode($this->password).'@'.$this->host.$this->root.$path;
+ $url .= '://'.urlencode($this->user).':'.urlencode($this->password).'@'.$this->host.$this->root.$path;
return $url;
}
@@ -120,10 +120,10 @@ class FTP extends StreamWrapper {
case 'c':
case 'c+':
//emulate these
- if (strrpos($path, '.')!==false) {
- $ext=substr($path, strrpos($path, '.'));
+ if (strrpos($path, '.') !== false) {
+ $ext = substr($path, strrpos($path, '.'));
} else {
- $ext='';
+ $ext = '';
}
$tmpFile = \OC::$server->getTempManager()->getTemporaryFile();
if ($this->file_exists($path)) {
diff --git a/apps/files_external/lib/Lib/Storage/SFTP.php b/apps/files_external/lib/Lib/Storage/SFTP.php
index d1aea027cee..6921b157a20 100644
--- a/apps/files_external/lib/Lib/Storage/SFTP.php
+++ b/apps/files_external/lib/Lib/Storage/SFTP.php
@@ -86,7 +86,7 @@ class SFTP extends \OC\Files\Storage\Common {
// Register sftp://
Stream::register();
- $parsedHost = $this->splitHost($params['host']);
+ $parsedHost = $this->splitHost($params['host']);
$this->host = $parsedHost[0];
$this->port = $parsedHost[1];
@@ -404,7 +404,7 @@ class SFTP extends \OC\Files\Storage\Common {
/**
* {@inheritdoc}
*/
- public function touch($path, $mtime=null) {
+ public function touch($path, $mtime = null) {
try {
if (!is_null($mtime)) {
return false;
diff --git a/apps/files_external/lib/Lib/StorageConfig.php b/apps/files_external/lib/Lib/StorageConfig.php
index 7840b4c6dd8..ca26d49521c 100644
--- a/apps/files_external/lib/Lib/StorageConfig.php
+++ b/apps/files_external/lib/Lib/StorageConfig.php
@@ -184,7 +184,7 @@ class StorageConfig implements \JsonSerializable {
* @param Backend $backend
*/
public function setBackend(Backend $backend) {
- $this->backend= $backend;
+ $this->backend = $backend;
}
/**
diff --git a/apps/files_external/lib/Settings/Admin.php b/apps/files_external/lib/Settings/Admin.php
index ddb18c43dfb..85ad14886f8 100644
--- a/apps/files_external/lib/Settings/Admin.php
+++ b/apps/files_external/lib/Settings/Admin.php
@@ -62,14 +62,14 @@ class Admin implements ISettings {
*/
public function getForm() {
$parameters = [
- 'encryptionEnabled' => $this->encryptionManager->isEnabled(),
- 'visibilityType' => BackendService::VISIBILITY_ADMIN,
- 'storages' => $this->globalStoragesService->getStorages(),
- 'backends' => $this->backendService->getAvailableBackends(),
- 'authMechanisms' => $this->backendService->getAuthMechanisms(),
- 'dependencies' => \OCA\Files_External\MountConfig::dependencyMessage($this->backendService->getBackends()),
- 'allowUserMounting' => $this->backendService->isUserMountingAllowed(),
- 'globalCredentials' => $this->globalAuth->getAuth(''),
+ 'encryptionEnabled' => $this->encryptionManager->isEnabled(),
+ 'visibilityType' => BackendService::VISIBILITY_ADMIN,
+ 'storages' => $this->globalStoragesService->getStorages(),
+ 'backends' => $this->backendService->getAvailableBackends(),
+ 'authMechanisms' => $this->backendService->getAuthMechanisms(),
+ 'dependencies' => \OCA\Files_External\MountConfig::dependencyMessage($this->backendService->getBackends()),
+ 'allowUserMounting' => $this->backendService->isUserMountingAllowed(),
+ 'globalCredentials' => $this->globalAuth->getAuth(''),
'globalCredentialsUid' => '',
];
diff --git a/apps/files_external/lib/Settings/Personal.php b/apps/files_external/lib/Settings/Personal.php
index 85c9d5460fd..916c3c3d366 100644
--- a/apps/files_external/lib/Settings/Personal.php
+++ b/apps/files_external/lib/Settings/Personal.php
@@ -70,14 +70,14 @@ class Personal implements ISettings {
$uid = $this->userSession->getUser()->getUID();
$parameters = [
- 'encryptionEnabled' => $this->encryptionManager->isEnabled(),
- 'visibilityType' => BackendService::VISIBILITY_PERSONAL,
- 'storages' => $this->userGlobalStoragesService->getStorages(),
- 'backends' => $this->backendService->getAvailableBackends(),
- 'authMechanisms' => $this->backendService->getAuthMechanisms(),
- 'dependencies' => \OCA\Files_External\MountConfig::dependencyMessage($this->backendService->getBackends()),
- 'allowUserMounting' => $this->backendService->isUserMountingAllowed(),
- 'globalCredentials' => $this->globalAuth->getAuth($uid),
+ 'encryptionEnabled' => $this->encryptionManager->isEnabled(),
+ 'visibilityType' => BackendService::VISIBILITY_PERSONAL,
+ 'storages' => $this->userGlobalStoragesService->getStorages(),
+ 'backends' => $this->backendService->getAvailableBackends(),
+ 'authMechanisms' => $this->backendService->getAuthMechanisms(),
+ 'dependencies' => \OCA\Files_External\MountConfig::dependencyMessage($this->backendService->getBackends()),
+ 'allowUserMounting' => $this->backendService->isUserMountingAllowed(),
+ 'globalCredentials' => $this->globalAuth->getAuth($uid),
'globalCredentialsUid' => $uid,
];
diff --git a/apps/files_external/tests/Controller/AjaxControllerTest.php b/apps/files_external/tests/Controller/AjaxControllerTest.php
index a4f91de1979..1c4cb232ed0 100644
--- a/apps/files_external/tests/Controller/AjaxControllerTest.php
+++ b/apps/files_external/tests/Controller/AjaxControllerTest.php
@@ -80,7 +80,7 @@ class AjaxControllerTest extends TestCase {
'publickey' => 'MyPublicKey',
]);
- $expected = new JSONResponse(
+ $expected = new JSONResponse(
[
'data' => [
'private_key' => 'MyPrivateKey',
diff --git a/apps/files_external/tests/Settings/AdminTest.php b/apps/files_external/tests/Settings/AdminTest.php
index e1cb491fca6..3f58ce8e685 100644
--- a/apps/files_external/tests/Settings/AdminTest.php
+++ b/apps/files_external/tests/Settings/AdminTest.php
@@ -91,14 +91,14 @@ class AdminTest extends TestCase {
->with('')
->willReturn('asdf:asdf');
$params = [
- 'encryptionEnabled' => false,
- 'visibilityType' => BackendService::VISIBILITY_ADMIN,
- 'storages' => ['a', 'b', 'c'],
- 'backends' => ['d', 'e', 'f'],
- 'authMechanisms' => ['g', 'h', 'i'],
- 'dependencies' => \OCA\Files_External\MountConfig::dependencyMessage($this->backendService->getBackends()),
- 'allowUserMounting' => true,
- 'globalCredentials' => 'asdf:asdf',
+ 'encryptionEnabled' => false,
+ 'visibilityType' => BackendService::VISIBILITY_ADMIN,
+ 'storages' => ['a', 'b', 'c'],
+ 'backends' => ['d', 'e', 'f'],
+ 'authMechanisms' => ['g', 'h', 'i'],
+ 'dependencies' => \OCA\Files_External\MountConfig::dependencyMessage($this->backendService->getBackends()),
+ 'allowUserMounting' => true,
+ 'globalCredentials' => 'asdf:asdf',
'globalCredentialsUid' => '',
];
$expected = new TemplateResponse('files_external', 'settings', $params, '');
diff --git a/apps/files_external/tests/Storage/FtpTest.php b/apps/files_external/tests/Storage/FtpTest.php
index d9a90f5b19f..5b1c15e5a5b 100644
--- a/apps/files_external/tests/Storage/FtpTest.php
+++ b/apps/files_external/tests/Storage/FtpTest.php
@@ -63,7 +63,7 @@ class FtpTest extends \Test\Files\Storage\Storage {
}
public function testConstructUrl() {
- $config = [ 'host' => 'localhost',
+ $config = [ 'host' => 'localhost',
'user' => 'ftp',
'password' => 'ftp',
'root' => '/',
diff --git a/apps/files_external/tests/config.php b/apps/files_external/tests/config.php
index 21e6536acd5..5f35b937df4 100644
--- a/apps/files_external/tests/config.php
+++ b/apps/files_external/tests/config.php
@@ -35,30 +35,30 @@ if (file_exists($privateConfigFile)) {
// this is now more a template now for your private configurations
return [
- 'ftp'=>[
- 'run'=>false,
- 'host'=>'localhost',
- 'user'=>'test',
- 'password'=>'test',
- 'root'=>'/test',
+ 'ftp' => [
+ 'run' => false,
+ 'host' => 'localhost',
+ 'user' => 'test',
+ 'password' => 'test',
+ 'root' => '/test',
],
- 'webdav'=>[
- 'run'=>false,
- 'host'=>'localhost',
- 'user'=>'test',
- 'password'=>'test',
- 'root'=>'',
+ 'webdav' => [
+ 'run' => false,
+ 'host' => 'localhost',
+ 'user' => 'test',
+ 'password' => 'test',
+ 'root' => '',
// wait delay in seconds after write operations
// (only in tests)
// set to higher value for lighttpd webdav
- 'wait'=> 0
+ 'wait' => 0
],
- 'owncloud'=>[
- 'run'=>false,
- 'host'=>'localhost/owncloud',
- 'user'=>'test',
- 'password'=>'test',
- 'root'=>'',
+ 'owncloud' => [
+ 'run' => false,
+ 'host' => 'localhost/owncloud',
+ 'user' => 'test',
+ 'password' => 'test',
+ 'root' => '',
],
'swift' => [
'run' => false,
@@ -72,19 +72,19 @@ return [
//'url' => 'https://identity.api.rackspacecloud.com/v2.0/', //to be used with Rackspace Cloud Files and OpenStack Object Storage
//'timeout' => 5 // timeout of HTTP requests in seconds
],
- 'smb'=>[
- 'run'=>false,
- 'user'=>'test',
- 'password'=>'test',
- 'host'=>'localhost',
- 'share'=>'/test',
- 'root'=>'/test/',
+ 'smb' => [
+ 'run' => false,
+ 'user' => 'test',
+ 'password' => 'test',
+ 'host' => 'localhost',
+ 'share' => '/test',
+ 'root' => '/test/',
],
- 'amazons3'=>[
- 'run'=>false,
- 'key'=>'test',
- 'secret'=>'test',
- 'bucket'=>'bucket'
+ 'amazons3' => [
+ 'run' => false,
+ 'key' => 'test',
+ 'secret' => 'test',
+ 'bucket' => 'bucket'
//'hostname' => 'your.host.name',
//'port' => '443',
//'use_ssl' => 'true',
@@ -92,19 +92,19 @@ return [
//'test'=>'true',
//'timeout'=>20
],
- 'sftp' => [
- 'run'=>false,
- 'host'=>'localhost',
- 'user'=>'test',
- 'password'=>'test',
- 'root'=>'/test'
+ 'sftp' => [
+ 'run' => false,
+ 'host' => 'localhost',
+ 'user' => 'test',
+ 'password' => 'test',
+ 'root' => '/test'
],
- 'sftp_key' => [
- 'run'=>false,
- 'host'=>'localhost',
- 'user'=>'test',
- 'public_key'=>'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDJPTvz3OLonF2KSGEKP/nd4CPmRYvemG2T4rIiNYjDj0U5y+2sKEWbjiUlQl2bsqYuVoJ+/UNJlGQbbZ08kQirFeo1GoWBzqioaTjUJfbLN6TzVVKXxR9YIVmH7Ajg2iEeGCndGgbmnPfj+kF9TR9IH8vMVvtubQwf7uEwB0ALhw== phpseclib-generated-key',
- 'private_key'=>'test',
- 'root'=>'/test'
+ 'sftp_key' => [
+ 'run' => false,
+ 'host' => 'localhost',
+ 'user' => 'test',
+ 'public_key' => 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDJPTvz3OLonF2KSGEKP/nd4CPmRYvemG2T4rIiNYjDj0U5y+2sKEWbjiUlQl2bsqYuVoJ+/UNJlGQbbZ08kQirFeo1GoWBzqioaTjUJfbLN6TzVVKXxR9YIVmH7Ajg2iEeGCndGgbmnPfj+kF9TR9IH8vMVvtubQwf7uEwB0ALhw== phpseclib-generated-key',
+ 'private_key' => 'test',
+ 'root' => '/test'
],
];
diff --git a/apps/files_sharing/appinfo/routes.php b/apps/files_sharing/appinfo/routes.php
index 8915f135ba2..7d1d5c386d8 100644
--- a/apps/files_sharing/appinfo/routes.php
+++ b/apps/files_sharing/appinfo/routes.php
@@ -94,42 +94,42 @@ return [
*/
[
'name' => 'ShareAPI#getShares',
- 'url' => '/api/v1/shares',
+ 'url' => '/api/v1/shares',
'verb' => 'GET',
],
[
'name' => 'ShareAPI#getInheritedShares',
- 'url' => '/api/v1/shares/inherited',
+ 'url' => '/api/v1/shares/inherited',
'verb' => 'GET',
],
[
'name' => 'ShareAPI#createShare',
- 'url' => '/api/v1/shares',
+ 'url' => '/api/v1/shares',
'verb' => 'POST',
],
[
'name' => 'ShareAPI#pendingShares',
- 'url' => '/api/v1/shares/pending',
+ 'url' => '/api/v1/shares/pending',
'verb' => 'GET',
],
[
'name' => 'ShareAPI#getShare',
- 'url' => '/api/v1/shares/{id}',
+ 'url' => '/api/v1/shares/{id}',
'verb' => 'GET',
],
[
'name' => 'ShareAPI#updateShare',
- 'url' => '/api/v1/shares/{id}',
+ 'url' => '/api/v1/shares/{id}',
'verb' => 'PUT',
],
[
'name' => 'ShareAPI#deleteShare',
- 'url' => '/api/v1/shares/{id}',
+ 'url' => '/api/v1/shares/{id}',
'verb' => 'DELETE',
],
[
'name' => 'ShareAPI#acceptShare',
- 'url' => '/api/v1/shares/pending/{id}',
+ 'url' => '/api/v1/shares/pending/{id}',
'verb' => 'POST',
],
/*
@@ -137,12 +137,12 @@ return [
*/
[
'name' => 'DeletedShareAPI#index',
- 'url' => '/api/v1/deletedshares',
+ 'url' => '/api/v1/deletedshares',
'verb' => 'GET',
],
[
'name' => 'DeletedShareAPI#undelete',
- 'url' => '/api/v1/deletedshares/{id}',
+ 'url' => '/api/v1/deletedshares/{id}',
'verb' => 'POST',
],
/*
diff --git a/apps/files_sharing/lib/Capabilities.php b/apps/files_sharing/lib/Capabilities.php
index 61e8f3b63b6..d4190708241 100644
--- a/apps/files_sharing/lib/Capabilities.php
+++ b/apps/files_sharing/lib/Capabilities.php
@@ -108,7 +108,7 @@ class Capabilities implements ICapability {
//Federated sharing
$res['federation'] = [
- 'outgoing' => $this->config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') === 'yes',
+ 'outgoing' => $this->config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') === 'yes',
'incoming' => $this->config->getAppValue('files_sharing', 'incoming_server2server_share_enabled', 'yes') === 'yes',
'expire_date' => ['enabled' => true]
];
diff --git a/apps/files_sharing/lib/External/Manager.php b/apps/files_sharing/lib/External/Manager.php
index 526e4fcce45..c922754207c 100644
--- a/apps/files_sharing/lib/External/Manager.php
+++ b/apps/files_sharing/lib/External/Manager.php
@@ -131,7 +131,7 @@ class Manager {
* @return Mount|null
* @throws \Doctrine\DBAL\DBALException
*/
- public function addShare($remote, $token, $password, $name, $owner, $shareType, $accepted=false, $user = null, $remoteId = -1, $parent = -1) {
+ public function addShare($remote, $token, $password, $name, $owner, $shareType, $accepted = false, $user = null, $remoteId = -1, $parent = -1) {
$user = $user ? $user : $this->uid;
$accepted = $accepted ? IShare::STATUS_ACCEPTED : IShare::STATUS_PENDING;
$name = Filesystem::normalizePath('/' . $name);
@@ -145,17 +145,17 @@ class Manager {
$mountPoint = $tmpMountPointName;
$hash = md5($tmpMountPointName);
$data = [
- 'remote' => $remote,
- 'share_token' => $token,
- 'password' => $password,
- 'name' => $name,
- 'owner' => $owner,
- 'user' => $user,
- 'mountpoint' => $mountPoint,
- 'mountpoint_hash' => $hash,
- 'accepted' => $accepted,
- 'remote_id' => $remoteId,
- 'share_type' => $shareType,
+ 'remote' => $remote,
+ 'share_token' => $token,
+ 'password' => $password,
+ 'name' => $name,
+ 'owner' => $owner,
+ 'user' => $user,
+ 'mountpoint' => $mountPoint,
+ 'mountpoint_hash' => $hash,
+ 'accepted' => $accepted,
+ 'remote_id' => $remoteId,
+ 'share_type' => $shareType,
];
$i = 1;
@@ -175,11 +175,11 @@ class Manager {
$this->writeShareToDb($remote, $token, $password, $name, $owner, $user, $mountPoint, $hash, $accepted, $remoteId, $parent, $shareType);
$options = [
- 'remote' => $remote,
- 'token' => $token,
- 'password' => $password,
- 'mountpoint' => $mountPoint,
- 'owner' => $owner
+ 'remote' => $remote,
+ 'token' => $token,
+ 'password' => $password,
+ 'mountpoint' => $mountPoint,
+ 'owner' => $owner
];
return $this->mountShare($options);
}
diff --git a/apps/files_sharing/lib/External/Storage.php b/apps/files_sharing/lib/External/Storage.php
index 5c183b2eae3..2cb69de8ee1 100644
--- a/apps/files_sharing/lib/External/Storage.php
+++ b/apps/files_sharing/lib/External/Storage.php
@@ -287,7 +287,7 @@ class Storage extends DAV implements ISharedStorage, IDisableEncryptionStorage {
$returnValue = false;
}
- $cache->set($url, $returnValue, 60*60*24);
+ $cache->set($url, $returnValue, 60 * 60 * 24);
return $returnValue;
}
diff --git a/apps/files_sharing/lib/Notification/Notifier.php b/apps/files_sharing/lib/Notification/Notifier.php
index 9b636c8d30d..2499896653b 100644
--- a/apps/files_sharing/lib/Notification/Notifier.php
+++ b/apps/files_sharing/lib/Notification/Notifier.php
@@ -178,7 +178,7 @@ class Notifier implements INotifier {
'id' => $notification->getObjectId(),
'name' => $share->getTarget(),
],
- 'user' => [
+ 'user' => [
'type' => 'user',
'id' => $sharer->getUID(),
'name' => $sharer->getDisplayName(),
@@ -219,7 +219,7 @@ class Notifier implements INotifier {
'id' => $group->getGID(),
'name' => $group->getDisplayName(),
],
- 'user' => [
+ 'user' => [
'type' => 'user',
'id' => $sharer->getUID(),
'name' => $sharer->getDisplayName(),
diff --git a/apps/files_sharing/lib/Updater.php b/apps/files_sharing/lib/Updater.php
index 9b5173b489c..2c9ccd10294 100644
--- a/apps/files_sharing/lib/Updater.php
+++ b/apps/files_sharing/lib/Updater.php
@@ -94,8 +94,8 @@ class Updater {
* @param string $newPath new path relative to data/user/files
*/
private static function renameChildren($oldPath, $newPath) {
- $absNewPath = \OC\Files\Filesystem::normalizePath('/' . \OCP\User::getUser() . '/files/' . $newPath);
- $absOldPath = \OC\Files\Filesystem::normalizePath('/' . \OCP\User::getUser() . '/files/' . $oldPath);
+ $absNewPath = \OC\Files\Filesystem::normalizePath('/' . \OCP\User::getUser() . '/files/' . $newPath);
+ $absOldPath = \OC\Files\Filesystem::normalizePath('/' . \OCP\User::getUser() . '/files/' . $oldPath);
$mountManager = \OC\Files\Filesystem::getMountManager();
$mountedShares = $mountManager->findIn('/' . \OCP\User::getUser() . '/files/' . $oldPath);
diff --git a/apps/files_sharing/tests/ApiTest.php b/apps/files_sharing/tests/ApiTest.php
index 24351b9e86a..254915e7859 100644
--- a/apps/files_sharing/tests/ApiTest.php
+++ b/apps/files_sharing/tests/ApiTest.php
@@ -74,7 +74,7 @@ class ApiTest extends TestCase {
\OC::$server->getConfig()->setAppValue('core', 'shareapi_expire_after_n_days', '7');
$this->folder = self::TEST_FOLDER_NAME;
- $this->subfolder = '/subfolder_share_api_test';
+ $this->subfolder = '/subfolder_share_api_test';
$this->subsubfolder = '/subsubfolder_share_api_test';
$this->filename = '/share-api-test.txt';
@@ -650,7 +650,7 @@ class ApiTest extends TestCase {
$share3->setStatus(IShare::STATUS_ACCEPTED);
$this->shareManager->updateShare($share3);
- $testValues=[
+ $testValues = [
['query' => $this->folder,
'expectedResult' => $this->folder . $this->filename],
['query' => $this->folder . $this->subfolder,
diff --git a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php
index 94939fcff2a..badfae2b63d 100644
--- a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php
+++ b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php
@@ -490,8 +490,8 @@ class ShareAPIControllerTest extends TestCase {
*/
public function createShare($id, $shareType, $sharedWith, $sharedBy, $shareOwner, $path, $permissions,
- $shareTime, $expiration, $parent, $target, $mail_send, $note = '', $token=null,
- $password=null, $label = '') {
+ $shareTime, $expiration, $parent, $target, $mail_send, $note = '', $token = null,
+ $password = null, $label = '') {
$share = $this->getMockBuilder(IShare::class)->getMock();
$share->method('getId')->willReturn($id);
$share->method('getShareType')->willReturn($shareType);
@@ -511,7 +511,7 @@ class ShareAPIControllerTest extends TestCase {
$share->method('getToken')->willReturn($token);
$share->method('getPassword')->willReturn($password);
- if ($shareType === IShare::TYPE_USER ||
+ if ($shareType === IShare::TYPE_USER ||
$shareType === IShare::TYPE_GROUP ||
$shareType === IShare::TYPE_LINK) {
$share->method('getFullId')->willReturn('ocinternal:'.$id);
diff --git a/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php b/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php
index 42bb0a90426..85267726068 100644
--- a/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php
+++ b/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php
@@ -276,7 +276,7 @@ class ShareesAPIControllerTest extends TestCase {
$this->collaboratorSearch->expects($this->once())
->method('search')
- ->with($search, $expectedShareTypes, $this->anything(), $perPage, $perPage * ($page -1))
+ ->with($search, $expectedShareTypes, $this->anything(), $perPage, $perPage * ($page - 1))
->willReturn([[], false]);
$sharees->expects($this->any())
diff --git a/apps/files_sharing/tests/ShareTest.php b/apps/files_sharing/tests/ShareTest.php
index 3b695493c23..35ca0a60de3 100644
--- a/apps/files_sharing/tests/ShareTest.php
+++ b/apps/files_sharing/tests/ShareTest.php
@@ -44,7 +44,7 @@ class ShareTest extends TestCase {
parent::setUp();
$this->folder = self::TEST_FOLDER_NAME;
- $this->subfolder = '/subfolder_share_api_test';
+ $this->subfolder = '/subfolder_share_api_test';
$this->subsubfolder = '/subsubfolder_share_api_test';
$this->filename = '/share-api-test.txt';
diff --git a/apps/files_sharing/tests/SharedStorageTest.php b/apps/files_sharing/tests/SharedStorageTest.php
index e3e57cc73a4..74975e7cf31 100644
--- a/apps/files_sharing/tests/SharedStorageTest.php
+++ b/apps/files_sharing/tests/SharedStorageTest.php
@@ -107,7 +107,7 @@ class SharedStorageTest extends TestCase {
// delete the local folder
/** @var \OC\Files\Storage\Storage $storage */
- list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/localfolder');
+ list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/localfolder');
$storage->rmdir($internalPath);
//enforce reload of the mount points
diff --git a/apps/files_sharing/tests/SizePropagationTest.php b/apps/files_sharing/tests/SizePropagationTest.php
index 8496341e653..b7a23dca561 100644
--- a/apps/files_sharing/tests/SizePropagationTest.php
+++ b/apps/files_sharing/tests/SizePropagationTest.php
@@ -113,7 +113,7 @@ class SizePropagationTest extends TestCase {
// but the size including mountpoints increases
$newRecipientRootInfo = $recipientView->getFileInfo('', true);
- $this->assertEquals($oldRecipientSize +3, $newRecipientRootInfo->getSize());
+ $this->assertEquals($oldRecipientSize + 3, $newRecipientRootInfo->getSize());
// size of owner's root increases
$this->loginAsUser(self::TEST_FILES_SHARING_API_USER2);
diff --git a/apps/files_trashbin/lib/Expiration.php b/apps/files_trashbin/lib/Expiration.php
index c861960074f..554f083e853 100644
--- a/apps/files_trashbin/lib/Expiration.php
+++ b/apps/files_trashbin/lib/Expiration.php
@@ -92,7 +92,7 @@ class Expiration {
$time = $this->timeFactory->getTime();
// Never expire dates in future e.g. misconfiguration or negative time
// adjustment
- if ($time<$timestamp) {
+ if ($time < $timestamp) {
return false;
}
diff --git a/apps/files_trashbin/lib/Helper.php b/apps/files_trashbin/lib/Helper.php
index 31ebdfa265e..e8fc38c2a35 100644
--- a/apps/files_trashbin/lib/Helper.php
+++ b/apps/files_trashbin/lib/Helper.php
@@ -76,7 +76,7 @@ class Helper {
$timestamp = substr(pathinfo($parts[0], PATHINFO_EXTENSION), 1);
}
$originalPath = '';
- $originalName = substr($entryName, 0, -strlen($timestamp)-2);
+ $originalName = substr($entryName, 0, -strlen($timestamp) - 2);
if (isset($originalLocations[$originalName][$timestamp])) {
$originalPath = $originalLocations[$originalName][$timestamp];
if (substr($originalPath, -1) === '/') {
diff --git a/apps/files_trashbin/tests/Command/CleanUpTest.php b/apps/files_trashbin/tests/Command/CleanUpTest.php
index 2984645777b..d7a654e519d 100644
--- a/apps/files_trashbin/tests/Command/CleanUpTest.php
+++ b/apps/files_trashbin/tests/Command/CleanUpTest.php
@@ -86,7 +86,7 @@ class CleanUpTest extends TestCase {
'id' => $query->expr()->literal('file'.$i),
'timestamp' => $query->expr()->literal($i),
'location' => $query->expr()->literal('.'),
- 'user' => $query->expr()->literal('user'.$i%2)
+ 'user' => $query->expr()->literal('user'.$i % 2)
])->execute();
}
$getAllQuery = $this->dbConnection->getQueryBuilder();
diff --git a/apps/files_trashbin/tests/ExpirationTest.php b/apps/files_trashbin/tests/ExpirationTest.php
index d3055c73aee..9c9ef72e46f 100644
--- a/apps/files_trashbin/tests/ExpirationTest.php
+++ b/apps/files_trashbin/tests/ExpirationTest.php
@@ -34,14 +34,14 @@ class ExpirationTest extends \Test\TestCase {
public const FAKE_TIME_NOW = 1000000;
public function expirationData() {
- $today = 100*self::SECONDS_PER_DAY;
- $back10Days = (100-10)*self::SECONDS_PER_DAY;
- $back20Days = (100-20)*self::SECONDS_PER_DAY;
- $back30Days = (100-30)*self::SECONDS_PER_DAY;
- $back35Days = (100-35)*self::SECONDS_PER_DAY;
+ $today = 100 * self::SECONDS_PER_DAY;
+ $back10Days = (100 - 10) * self::SECONDS_PER_DAY;
+ $back20Days = (100 - 20) * self::SECONDS_PER_DAY;
+ $back30Days = (100 - 30) * self::SECONDS_PER_DAY;
+ $back35Days = (100 - 35) * self::SECONDS_PER_DAY;
// it should never happen, but who knows :/
- $ahead100Days = (100+100)*self::SECONDS_PER_DAY;
+ $ahead100Days = (100 + 100) * self::SECONDS_PER_DAY;
return [
// Expiration is disabled - always should return false
@@ -158,10 +158,10 @@ class ExpirationTest extends \Test\TestCase {
[ 'auto', false ],
[ 'auto,auto', false ],
[ 'auto, auto', false ],
- [ 'auto, 3', self::FAKE_TIME_NOW - (3*self::SECONDS_PER_DAY) ],
+ [ 'auto, 3', self::FAKE_TIME_NOW - (3 * self::SECONDS_PER_DAY) ],
[ '5, auto', false ],
- [ '3, 5', self::FAKE_TIME_NOW - (5*self::SECONDS_PER_DAY) ],
- [ '10, 3', self::FAKE_TIME_NOW - (10*self::SECONDS_PER_DAY) ],
+ [ '3, 5', self::FAKE_TIME_NOW - (5 * self::SECONDS_PER_DAY) ],
+ [ '10, 3', self::FAKE_TIME_NOW - (10 * self::SECONDS_PER_DAY) ],
];
}
diff --git a/apps/files_versions/lib/Expiration.php b/apps/files_versions/lib/Expiration.php
index 8e05e0e2a3d..12f34b07304 100644
--- a/apps/files_versions/lib/Expiration.php
+++ b/apps/files_versions/lib/Expiration.php
@@ -93,7 +93,7 @@ class Expiration {
$time = $this->timeFactory->getTime();
// Never expire dates in future e.g. misconfiguration or negative time
// adjustment
- if ($time<$timestamp) {
+ if ($time < $timestamp) {
return false;
}
@@ -153,7 +153,7 @@ class Expiration {
$isValid = false;
\OC::$server->getLogger()->warning(
$minValue . ' is not a valid value for minimal versions retention obligation. Check versions_retention_obligation in your config.php. Falling back to auto.',
- ['app'=>'files_versions']
+ ['app' => 'files_versions']
);
}
@@ -161,7 +161,7 @@ class Expiration {
$isValid = false;
\OC::$server->getLogger()->warning(
$maxValue . ' is not a valid value for maximal versions retention obligation. Check versions_retention_obligation in your config.php. Falling back to auto.',
- ['app'=>'files_versions']
+ ['app' => 'files_versions']
);
}
diff --git a/apps/files_versions/lib/Storage.php b/apps/files_versions/lib/Storage.php
index a83ec348827..3f4ccf7f0a2 100644
--- a/apps/files_versions/lib/Storage.php
+++ b/apps/files_versions/lib/Storage.php
@@ -58,8 +58,8 @@ use OCP\Lock\ILockingProvider;
use OCP\User;
class Storage {
- public const DEFAULTENABLED=true;
- public const DEFAULTMAXSIZE=50; // unit: percentage; 50% of available disk space/quota
+ public const DEFAULTENABLED = true;
+ public const DEFAULTMAXSIZE = 50; // unit: percentage; 50% of available disk space/quota
public const VERSIONS_ROOT = 'files_versions/';
public const DELETE_TRIGGER_MASTER_REMOVED = 0;
@@ -351,7 +351,7 @@ class Storage {
$versionCreated = true;
}
- $fileToRestore = 'files_versions' . $filename . '.v' . $revision;
+ $fileToRestore = 'files_versions' . $filename . '.v' . $revision;
// Restore encrypted version of the old file for the newly restored file
// This has to happen manually here since the file is manually copied below
@@ -502,7 +502,7 @@ class Storage {
$toDelete = [];
foreach (array_reverse($versions['all']) as $key => $version) {
- if ((int)$version['version'] <$threshold) {
+ if ((int)$version['version'] < $threshold) {
$toDelete[$key] = $version;
} else {
//Versions are sorted by time - nothing mo to iterate.
@@ -799,7 +799,7 @@ class Storage {
// Check if enough space is available after versions are rearranged.
// If not we delete the oldest versions until we meet the size limit for versions,
// but always keep the two latest versions
- $numOfVersions = count($allVersions) -2 ;
+ $numOfVersions = count($allVersions) - 2 ;
$i = 0;
// sort oldest first and make sure that we start at the first element
ksort($allVersions);
diff --git a/apps/files_versions/tests/ExpirationTest.php b/apps/files_versions/tests/ExpirationTest.php
index b549f05a4c3..6ed1fd74591 100644
--- a/apps/files_versions/tests/ExpirationTest.php
+++ b/apps/files_versions/tests/ExpirationTest.php
@@ -35,14 +35,14 @@ class ExpirationTest extends \Test\TestCase {
public const SECONDS_PER_DAY = 86400; //60*60*24
public function expirationData() {
- $today = 100*self::SECONDS_PER_DAY;
- $back10Days = (100-10)*self::SECONDS_PER_DAY;
- $back20Days = (100-20)*self::SECONDS_PER_DAY;
- $back30Days = (100-30)*self::SECONDS_PER_DAY;
- $back35Days = (100-35)*self::SECONDS_PER_DAY;
+ $today = 100 * self::SECONDS_PER_DAY;
+ $back10Days = (100 - 10) * self::SECONDS_PER_DAY;
+ $back20Days = (100 - 20) * self::SECONDS_PER_DAY;
+ $back30Days = (100 - 30) * self::SECONDS_PER_DAY;
+ $back35Days = (100 - 35) * self::SECONDS_PER_DAY;
// it should never happen, but who knows :/
- $ahead100Days = (100+100)*self::SECONDS_PER_DAY;
+ $ahead100Days = (100 + 100) * self::SECONDS_PER_DAY;
return [
// Expiration is disabled - always should return false
diff --git a/apps/files_versions/tests/VersioningTest.php b/apps/files_versions/tests/VersioningTest.php
index 683fc078a29..1f81caeefce 100644
--- a/apps/files_versions/tests/VersioningTest.php
+++ b/apps/files_versions/tests/VersioningTest.php
@@ -944,7 +944,7 @@ class VersioningTest extends \Test\TestCase {
*/
public static function loginHelper($user, $create = false) {
if ($create) {
- $backend = new \Test\Util\User\Dummy();
+ $backend = new \Test\Util\User\Dummy();
$backend->createUser($user, $user);
\OC::$server->getUserManager()->registerBackend($backend);
}
diff --git a/apps/provisioning_api/lib/Controller/GroupsController.php b/apps/provisioning_api/lib/Controller/GroupsController.php
index 243ef8ea6be..0f37b63caa1 100644
--- a/apps/provisioning_api/lib/Controller/GroupsController.php
+++ b/apps/provisioning_api/lib/Controller/GroupsController.php
@@ -154,7 +154,7 @@ class GroupsController extends AUserData {
// Check the group exists
$group = $this->groupManager->get($groupId);
if ($group !== null) {
- $isSubadminOfGroup =$this->groupManager->getSubAdmin()->isSubAdminOfGroup($user, $group);
+ $isSubadminOfGroup = $this->groupManager->getSubAdmin()->isSubAdminOfGroup($user, $group);
} else {
throw new OCSNotFoundException('The requested group could not be found');
}
@@ -163,7 +163,7 @@ class GroupsController extends AUserData {
if ($this->groupManager->isAdmin($user->getUID())
|| $isSubadminOfGroup) {
$users = $this->groupManager->get($groupId)->getUsers();
- $users = array_map(function ($user) {
+ $users = array_map(function ($user) {
/** @var IUser $user */
return $user->getUID();
}, $users);
diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php
index 14e835ce338..931843c6498 100644
--- a/apps/provisioning_api/lib/Controller/UsersController.php
+++ b/apps/provisioning_api/lib/Controller/UsersController.php
@@ -409,7 +409,7 @@ class UsersController extends AUserData {
public function getCurrentUser(): DataResponse {
$user = $this->userSession->getUser();
if ($user) {
- $data = $this->getUserData($user->getUID());
+ $data = $this->getUserData($user->getUID());
// rename "displayname" to "display-name" only for this call to keep
// the API stable.
$data['display-name'] = $data['displayname'];
diff --git a/apps/provisioning_api/tests/Controller/AppsControllerTest.php b/apps/provisioning_api/tests/Controller/AppsControllerTest.php
index 28867f0b80b..88125a93488 100644
--- a/apps/provisioning_api/tests/Controller/AppsControllerTest.php
+++ b/apps/provisioning_api/tests/Controller/AppsControllerTest.php
@@ -101,7 +101,7 @@ class AppsControllerTest extends \OCA\Provisioning_API\Tests\TestCase {
$result = $this->api->getApps('disabled');
$data = $result->getData();
$apps = (new \OC_App)->listAllApps();
- $list = [];
+ $list = [];
foreach ($apps as $app) {
$list[] = $app['id'];
}
diff --git a/apps/settings/lib/AppInfo/Application.php b/apps/settings/lib/AppInfo/Application.php
index ce96daa372c..2471400cb07 100644
--- a/apps/settings/lib/AppInfo/Application.php
+++ b/apps/settings/lib/AppInfo/Application.php
@@ -71,7 +71,7 @@ class Application extends App implements IBootstrap {
/**
* @param array $urlParams
*/
- public function __construct(array $urlParams=[]) {
+ public function __construct(array $urlParams = []) {
parent::__construct(self::APP_ID, $urlParams);
}
diff --git a/apps/settings/lib/Controller/CommonSettingsTrait.php b/apps/settings/lib/Controller/CommonSettingsTrait.php
index f5c8bb465fd..20e0ef4a24f 100644
--- a/apps/settings/lib/Controller/CommonSettingsTrait.php
+++ b/apps/settings/lib/Controller/CommonSettingsTrait.php
@@ -105,10 +105,10 @@ trait CommonSettingsTrait {
&& $type === $currentType;
$templateParameters[] = [
- 'anchor' => $section->getID(),
+ 'anchor' => $section->getID(),
'section-name' => $section->getName(),
- 'active' => $active,
- 'icon' => $icon,
+ 'active' => $active,
+ 'icon' => $icon,
];
}
}
diff --git a/apps/settings/lib/Controller/MailSettingsController.php b/apps/settings/lib/Controller/MailSettingsController.php
index 94f9d72cafd..7b17c1442d1 100644
--- a/apps/settings/lib/Controller/MailSettingsController.php
+++ b/apps/settings/lib/Controller/MailSettingsController.php
@@ -125,8 +125,8 @@ class MailSettingsController extends Controller {
}
$this->config->setSystemValues([
- 'mail_smtpname' => $mail_smtpname,
- 'mail_smtppassword' => $mail_smtppassword,
+ 'mail_smtpname' => $mail_smtpname,
+ 'mail_smtppassword' => $mail_smtppassword,
]);
return new DataResponse();
diff --git a/apps/settings/lib/Controller/UsersController.php b/apps/settings/lib/Controller/UsersController.php
index 82e5bc903e4..3c905992f47 100644
--- a/apps/settings/lib/Controller/UsersController.php
+++ b/apps/settings/lib/Controller/UsersController.php
@@ -312,14 +312,14 @@ class UsersController extends Controller {
protected function canAdminChangeUserPasswords() {
$isEncryptionEnabled = $this->encryptionManager->isEnabled();
try {
- $noUserSpecificEncryptionKeys =!$this->encryptionManager->getEncryptionModule()->needDetailedAccessList();
+ $noUserSpecificEncryptionKeys = !$this->encryptionManager->getEncryptionModule()->needDetailedAccessList();
$isEncryptionModuleLoaded = true;
} catch (ModuleDoesNotExistsException $e) {
$noUserSpecificEncryptionKeys = true;
$isEncryptionModuleLoaded = false;
}
- $canChangePassword = ($isEncryptionEnabled && $isEncryptionModuleLoaded && $noUserSpecificEncryptionKeys)
+ $canChangePassword = ($isEncryptionEnabled && $isEncryptionModuleLoaded && $noUserSpecificEncryptionKeys)
|| (!$isEncryptionEnabled && !$isEncryptionModuleLoaded)
|| (!$isEncryptionEnabled && $isEncryptionModuleLoaded && $noUserSpecificEncryptionKeys);
diff --git a/apps/settings/lib/Settings/Admin/Mail.php b/apps/settings/lib/Settings/Admin/Mail.php
index 2e2146a9a9e..efed3242c08 100644
--- a/apps/settings/lib/Settings/Admin/Mail.php
+++ b/apps/settings/lib/Settings/Admin/Mail.php
@@ -50,17 +50,17 @@ class Mail implements ISettings {
$parameters = [
// Mail
'sendmail_is_available' => (bool) \OC_Helper::findBinaryPath('sendmail'),
- 'mail_domain' => $this->config->getSystemValue('mail_domain', ''),
- 'mail_from_address' => $this->config->getSystemValue('mail_from_address', ''),
- 'mail_smtpmode' => $this->config->getSystemValue('mail_smtpmode', ''),
- 'mail_smtpsecure' => $this->config->getSystemValue('mail_smtpsecure', ''),
- 'mail_smtphost' => $this->config->getSystemValue('mail_smtphost', ''),
- 'mail_smtpport' => $this->config->getSystemValue('mail_smtpport', ''),
- 'mail_smtpauthtype' => $this->config->getSystemValue('mail_smtpauthtype', ''),
- 'mail_smtpauth' => $this->config->getSystemValue('mail_smtpauth', false),
- 'mail_smtpname' => $this->config->getSystemValue('mail_smtpname', ''),
- 'mail_smtppassword' => $this->config->getSystemValue('mail_smtppassword', ''),
- 'mail_sendmailmode' => $this->config->getSystemValue('mail_sendmailmode', 'smtp'),
+ 'mail_domain' => $this->config->getSystemValue('mail_domain', ''),
+ 'mail_from_address' => $this->config->getSystemValue('mail_from_address', ''),
+ 'mail_smtpmode' => $this->config->getSystemValue('mail_smtpmode', ''),
+ 'mail_smtpsecure' => $this->config->getSystemValue('mail_smtpsecure', ''),
+ 'mail_smtphost' => $this->config->getSystemValue('mail_smtphost', ''),
+ 'mail_smtpport' => $this->config->getSystemValue('mail_smtpport', ''),
+ 'mail_smtpauthtype' => $this->config->getSystemValue('mail_smtpauthtype', ''),
+ 'mail_smtpauth' => $this->config->getSystemValue('mail_smtpauth', false),
+ 'mail_smtpname' => $this->config->getSystemValue('mail_smtpname', ''),
+ 'mail_smtppassword' => $this->config->getSystemValue('mail_smtppassword', ''),
+ 'mail_sendmailmode' => $this->config->getSystemValue('mail_sendmailmode', 'smtp'),
];
if ($parameters['mail_smtppassword'] !== '') {
diff --git a/apps/settings/lib/Settings/Admin/Overview.php b/apps/settings/lib/Settings/Admin/Overview.php
index 81232fcd87d..8f7e423e200 100644
--- a/apps/settings/lib/Settings/Admin/Overview.php
+++ b/apps/settings/lib/Settings/Admin/Overview.php
@@ -42,7 +42,7 @@ class Overview implements ISettings {
*/
public function getForm() {
$parameters = [
- 'checkForWorkingWellKnownSetup' => $this->config->getSystemValue('check_for_working_wellknown_setup', true),
+ 'checkForWorkingWellKnownSetup' => $this->config->getSystemValue('check_for_working_wellknown_setup', true),
];
return new TemplateResponse('settings', 'settings/admin/overview', $parameters, '');
diff --git a/apps/settings/lib/Settings/Admin/Security.php b/apps/settings/lib/Settings/Admin/Security.php
index e5e00928faa..a7ff58be68f 100644
--- a/apps/settings/lib/Settings/Admin/Security.php
+++ b/apps/settings/lib/Settings/Admin/Security.php
@@ -81,11 +81,11 @@ class Security implements ISettings {
$parameters = [
// Encryption API
- 'encryptionEnabled' => $this->manager->isEnabled(),
- 'encryptionReady' => $this->manager->isReady(),
+ 'encryptionEnabled' => $this->manager->isEnabled(),
+ 'encryptionReady' => $this->manager->isReady(),
'externalBackendsEnabled' => count($this->userManager->getBackends()) > 1,
// Modules
- 'encryptionModules' => $encryptionModuleList,
+ 'encryptionModules' => $encryptionModuleList,
];
return new TemplateResponse('settings', 'settings/admin/security', $parameters, '');
diff --git a/apps/settings/lib/Settings/Admin/Server.php b/apps/settings/lib/Settings/Admin/Server.php
index 95658b3ce1d..9a81e41c1ac 100644
--- a/apps/settings/lib/Settings/Admin/Server.php
+++ b/apps/settings/lib/Settings/Admin/Server.php
@@ -55,9 +55,9 @@ class Server implements ISettings {
$parameters = [
// Background jobs
'backgroundjobs_mode' => $this->config->getAppValue('core', 'backgroundjobs_mode', 'ajax'),
- 'lastcron' => $this->config->getAppValue('core', 'lastcron', false),
- 'cronMaxAge' => $this->cronMaxAge(),
- 'cronErrors' => $this->config->getAppValue('core', 'cronErrors'),
+ 'lastcron' => $this->config->getAppValue('core', 'lastcron', false),
+ 'cronMaxAge' => $this->cronMaxAge(),
+ 'cronErrors' => $this->config->getAppValue('core', 'cronErrors'),
'cli_based_cron_possible' => function_exists('posix_getpwuid'),
'cli_based_cron_user' => function_exists('posix_getpwuid') ? posix_getpwuid(fileowner(\OC::$configDir . 'config.php'))['name'] : '',
];
diff --git a/apps/settings/lib/Settings/Admin/Sharing.php b/apps/settings/lib/Settings/Admin/Sharing.php
index 98977a9cd43..3991822da71 100644
--- a/apps/settings/lib/Settings/Admin/Sharing.php
+++ b/apps/settings/lib/Settings/Admin/Sharing.php
@@ -67,27 +67,27 @@ class Sharing implements ISettings {
$parameters = [
// Built-In Sharing
- 'allowGroupSharing' => $this->config->getAppValue('core', 'shareapi_allow_group_sharing', 'yes'),
- 'allowLinks' => $this->config->getAppValue('core', 'shareapi_allow_links', 'yes'),
- 'allowPublicUpload' => $this->config->getAppValue('core', 'shareapi_allow_public_upload', 'yes'),
- 'allowResharing' => $this->config->getAppValue('core', 'shareapi_allow_resharing', 'yes'),
- 'allowShareDialogUserEnumeration' => $this->config->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes'),
- 'restrictUserEnumerationToGroup' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_to_group', 'no'),
- 'enforceLinkPassword' => Util::isPublicLinkPasswordRequired(),
- 'onlyShareWithGroupMembers' => $this->shareManager->shareWithGroupMembersOnly(),
- 'shareAPIEnabled' => $this->config->getAppValue('core', 'shareapi_enabled', 'yes'),
- 'shareDefaultExpireDateSet' => $this->config->getAppValue('core', 'shareapi_default_expire_date', 'no'),
- 'shareExpireAfterNDays' => $this->config->getAppValue('core', 'shareapi_expire_after_n_days', '7'),
- 'shareEnforceExpireDate' => $this->config->getAppValue('core', 'shareapi_enforce_expire_date', 'no'),
- 'shareExcludeGroups' => $this->config->getAppValue('core', 'shareapi_exclude_groups', 'no') === 'yes',
- 'shareExcludedGroupsList' => $excludeGroupsList,
- 'publicShareDisclaimerText' => $this->config->getAppValue('core', 'shareapi_public_link_disclaimertext', null),
- 'enableLinkPasswordByDefault' => $this->config->getAppValue('core', 'shareapi_enable_link_password_by_default', 'no'),
- 'shareApiDefaultPermissions' => $this->config->getAppValue('core', 'shareapi_default_permissions', Constants::PERMISSION_ALL),
+ 'allowGroupSharing' => $this->config->getAppValue('core', 'shareapi_allow_group_sharing', 'yes'),
+ 'allowLinks' => $this->config->getAppValue('core', 'shareapi_allow_links', 'yes'),
+ 'allowPublicUpload' => $this->config->getAppValue('core', 'shareapi_allow_public_upload', 'yes'),
+ 'allowResharing' => $this->config->getAppValue('core', 'shareapi_allow_resharing', 'yes'),
+ 'allowShareDialogUserEnumeration' => $this->config->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes'),
+ 'restrictUserEnumerationToGroup' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_to_group', 'no'),
+ 'enforceLinkPassword' => Util::isPublicLinkPasswordRequired(),
+ 'onlyShareWithGroupMembers' => $this->shareManager->shareWithGroupMembersOnly(),
+ 'shareAPIEnabled' => $this->config->getAppValue('core', 'shareapi_enabled', 'yes'),
+ 'shareDefaultExpireDateSet' => $this->config->getAppValue('core', 'shareapi_default_expire_date', 'no'),
+ 'shareExpireAfterNDays' => $this->config->getAppValue('core', 'shareapi_expire_after_n_days', '7'),
+ 'shareEnforceExpireDate' => $this->config->getAppValue('core', 'shareapi_enforce_expire_date', 'no'),
+ 'shareExcludeGroups' => $this->config->getAppValue('core', 'shareapi_exclude_groups', 'no') === 'yes',
+ 'shareExcludedGroupsList' => $excludeGroupsList,
+ 'publicShareDisclaimerText' => $this->config->getAppValue('core', 'shareapi_public_link_disclaimertext', null),
+ 'enableLinkPasswordByDefault' => $this->config->getAppValue('core', 'shareapi_enable_link_password_by_default', 'no'),
+ 'shareApiDefaultPermissions' => $this->config->getAppValue('core', 'shareapi_default_permissions', Constants::PERMISSION_ALL),
'shareApiDefaultPermissionsCheckboxes' => $this->getSharePermissionList(),
- 'shareDefaultInternalExpireDateSet' => $this->config->getAppValue('core', 'shareapi_default_internal_expire_date', 'no'),
- 'shareInternalExpireAfterNDays' => $this->config->getAppValue('core', 'shareapi_internal_expire_after_n_days', '7'),
- 'shareInternalEnforceExpireDate' => $this->config->getAppValue('core', 'shareapi_enforce_internal_expire_date', 'no'),
+ 'shareDefaultInternalExpireDateSet' => $this->config->getAppValue('core', 'shareapi_default_internal_expire_date', 'no'),
+ 'shareInternalExpireAfterNDays' => $this->config->getAppValue('core', 'shareapi_internal_expire_after_n_days', '7'),
+ 'shareInternalEnforceExpireDate' => $this->config->getAppValue('core', 'shareapi_enforce_internal_expire_date', 'no'),
];
return new TemplateResponse('settings', 'settings/admin/sharing', $parameters, '');
diff --git a/apps/settings/lib/Settings/Personal/PersonalInfo.php b/apps/settings/lib/Settings/Personal/PersonalInfo.php
index c4b505c4248..7c5a20dc35e 100644
--- a/apps/settings/lib/Settings/Personal/PersonalInfo.php
+++ b/apps/settings/lib/Settings/Personal/PersonalInfo.php
@@ -134,8 +134,8 @@ class PersonalInfo implements ISettings {
'phoneScope' => $userData[AccountManager::PROPERTY_PHONE]['scope'],
'address' => $userData[AccountManager::PROPERTY_ADDRESS]['value'],
'addressScope' => $userData[AccountManager::PROPERTY_ADDRESS]['scope'],
- 'website' => $userData[AccountManager::PROPERTY_WEBSITE]['value'],
- 'websiteScope' => $userData[AccountManager::PROPERTY_WEBSITE]['scope'],
+ 'website' => $userData[AccountManager::PROPERTY_WEBSITE]['value'],
+ 'websiteScope' => $userData[AccountManager::PROPERTY_WEBSITE]['scope'],
'websiteVerification' => $userData[AccountManager::PROPERTY_WEBSITE]['verified'],
'twitter' => $userData[AccountManager::PROPERTY_TWITTER]['value'],
'twitterScope' => $userData[AccountManager::PROPERTY_TWITTER]['scope'],
diff --git a/apps/settings/templates/settings/admin/additional-mail.php b/apps/settings/templates/settings/admin/additional-mail.php
index 06a45332855..e8362da4581 100644
--- a/apps/settings/templates/settings/admin/additional-mail.php
+++ b/apps/settings/templates/settings/admin/additional-mail.php
@@ -25,16 +25,16 @@
/** @var array $_ */
$mail_smtpauthtype = [
- '' => $l->t('None'),
- 'LOGIN' => $l->t('Login'),
- 'PLAIN' => $l->t('Plain'),
- 'NTLM' => $l->t('NT LAN Manager'),
+ '' => $l->t('None'),
+ 'LOGIN' => $l->t('Login'),
+ 'PLAIN' => $l->t('Plain'),
+ 'NTLM' => $l->t('NT LAN Manager'),
];
$mail_smtpsecure = [
- '' => $l->t('None'),
- 'ssl' => $l->t('SSL/TLS'),
- 'tls' => $l->t('STARTTLS'),
+ '' => $l->t('None'),
+ 'ssl' => $l->t('SSL/TLS'),
+ 'tls' => $l->t('STARTTLS'),
];
$mail_smtpmode = [
diff --git a/apps/settings/templates/settings/admin/server.php b/apps/settings/templates/settings/admin/server.php
index 45203e48901..635e1477fe3 100644
--- a/apps/settings/templates/settings/admin/server.php
+++ b/apps/settings/templates/settings/admin/server.php
@@ -41,7 +41,7 @@
<span class="crondate" title="<?php p($absolute_time);?>">
<?php p($l->t("Last job execution ran %s. Something seems wrong.", [$relative_time]));?>
</span>
- <?php } elseif (time() - $_['cronMaxAge'] > 12*3600) {
+ <?php } elseif (time() - $_['cronMaxAge'] > 12 * 3600) {
if ($_['backgroundjobs_mode'] === 'cron') { ?>
<span class="status warning"></span>
<span class="crondate" title="<?php p($maxAgeAbsoluteTime);?>">
diff --git a/apps/settings/templates/settings/personal/personal.info.php b/apps/settings/templates/settings/personal/personal.info.php
index ac95b9eddbf..381ab9a57a0 100644
--- a/apps/settings/templates/settings/personal/personal.info.php
+++ b/apps/settings/templates/settings/personal/personal.info.php
@@ -138,7 +138,7 @@ script('settings', [
</span>
</div>
</h3>
- <div class="verify <?php if ($_['email'] === '' || $_['emailScope'] !== 'public') {
+ <div class="verify <?php if ($_['email'] === '' || $_['emailScope'] !== 'public') {
p('hidden');
} ?>">
<img id="verify-email" title="<?php p($_['emailMessage']); ?>" data-status="<?php p($_['emailVerification']) ?>" src="
@@ -238,7 +238,7 @@ script('settings', [
</div>
</h3>
<?php if ($_['lookupServerUploadEnabled']) { ?>
- <div class="verify <?php if ($_['website'] === '' || $_['websiteScope'] !== 'public') {
+ <div class="verify <?php if ($_['website'] === '' || $_['websiteScope'] !== 'public') {
p('hidden');
} ?>">
<img id="verify-website" title="<?php p($_['websiteMessage']); ?>" data-status="<?php p($_['websiteVerification']) ?>" src="
@@ -293,7 +293,7 @@ script('settings', [
</div>
</h3>
<?php if ($_['lookupServerUploadEnabled']) { ?>
- <div class="verify <?php if ($_['twitter'] === '' || $_['twitterScope'] !== 'public') {
+ <div class="verify <?php if ($_['twitter'] === '' || $_['twitterScope'] !== 'public') {
p('hidden');
} ?>">
<img id="verify-twitter" title="<?php p($_['twitterMessage']); ?>" data-status="<?php p($_['twitterVerification']) ?>" src="
diff --git a/apps/settings/tests/Controller/CheckSetupControllerTest.php b/apps/settings/tests/Controller/CheckSetupControllerTest.php
index 819c8edcca9..c3071de2f8e 100644
--- a/apps/settings/tests/Controller/CheckSetupControllerTest.php
+++ b/apps/settings/tests/Controller/CheckSetupControllerTest.php
@@ -979,7 +979,7 @@ class CheckSetupControllerTest extends TestCase {
$this->checker
->expects($this->once())
->method('getResults')
- ->willReturn([ 'core' => [ 'EXTRA_FILE' => ['/testfile' => []], 'INVALID_HASH' => [ '/.idea/workspace.xml' => [ 'expected' => 'f1c5e2630d784bc9cb02d5a28f55d6f24d06dae2a0fee685f3c2521b050955d9d452769f61454c9ddfa9c308146ade10546cfa829794448eaffbc9a04a29d216', 'current' => 'ce08bf30bcbb879a18b49239a9bec6b8702f52452f88a9d32142cad8d2494d5735e6bfa0d8642b2762c62ca5be49f9bf4ec231d4a230559d4f3e2c471d3ea094', ], '/lib/private/integritycheck/checker.php' => [ 'expected' => 'c5a03bacae8dedf8b239997901ba1fffd2fe51271d13a00cc4b34b09cca5176397a89fc27381cbb1f72855fa18b69b6f87d7d5685c3b45aee373b09be54742ea', 'current' => '88a3a92c11db91dec1ac3be0e1c87f862c95ba6ffaaaa3f2c3b8f682187c66f07af3a3b557a868342ef4a271218fe1c1e300c478e6c156c5955ed53c40d06585', ], '/settings/controller/checksetupcontroller.php' => [ 'expected' => '3e1de26ce93c7bfe0ede7c19cb6c93cadc010340225b375607a7178812e9de163179b0dc33809f451e01f491d93f6f5aaca7929685d21594cccf8bda732327c4', 'current' => '09563164f9904a837f9ca0b5f626db56c838e5098e0ccc1d8b935f68fa03a25c5ec6f6b2d9e44a868e8b85764dafd1605522b4af8db0ae269d73432e9a01e63a', ], ], ], 'bookmarks' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'dav' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'encryption' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'external' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'federation' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_antivirus' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_drop' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_external' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_pdfviewer' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_sharing' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_trashbin' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_versions' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_videoviewer' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'firstrunwizard' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'gitsmart' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'logreader' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature could not get verified.', ], ], 'password_policy' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'provisioning_api' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'sketch' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'threatblock' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'two_factor_auth' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'user_ldap' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'user_shibboleth' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], ]);
+ ->willReturn([ 'core' => [ 'EXTRA_FILE' => ['/testfile' => []], 'INVALID_HASH' => [ '/.idea/workspace.xml' => [ 'expected' => 'f1c5e2630d784bc9cb02d5a28f55d6f24d06dae2a0fee685f3c2521b050955d9d452769f61454c9ddfa9c308146ade10546cfa829794448eaffbc9a04a29d216', 'current' => 'ce08bf30bcbb879a18b49239a9bec6b8702f52452f88a9d32142cad8d2494d5735e6bfa0d8642b2762c62ca5be49f9bf4ec231d4a230559d4f3e2c471d3ea094', ], '/lib/private/integritycheck/checker.php' => [ 'expected' => 'c5a03bacae8dedf8b239997901ba1fffd2fe51271d13a00cc4b34b09cca5176397a89fc27381cbb1f72855fa18b69b6f87d7d5685c3b45aee373b09be54742ea', 'current' => '88a3a92c11db91dec1ac3be0e1c87f862c95ba6ffaaaa3f2c3b8f682187c66f07af3a3b557a868342ef4a271218fe1c1e300c478e6c156c5955ed53c40d06585', ], '/settings/controller/checksetupcontroller.php' => [ 'expected' => '3e1de26ce93c7bfe0ede7c19cb6c93cadc010340225b375607a7178812e9de163179b0dc33809f451e01f491d93f6f5aaca7929685d21594cccf8bda732327c4', 'current' => '09563164f9904a837f9ca0b5f626db56c838e5098e0ccc1d8b935f68fa03a25c5ec6f6b2d9e44a868e8b85764dafd1605522b4af8db0ae269d73432e9a01e63a', ], ], ], 'bookmarks' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'dav' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'encryption' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'external' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'federation' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_antivirus' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_drop' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_external' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_pdfviewer' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_sharing' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_trashbin' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_versions' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_videoviewer' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'firstrunwizard' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'gitsmart' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'logreader' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature could not get verified.', ], ], 'password_policy' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'provisioning_api' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'sketch' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'threatblock' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'two_factor_auth' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'user_ldap' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'user_shibboleth' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], ]);
$expected = new DataDisplayResponse(
'Technical information
diff --git a/apps/settings/tests/Settings/Admin/MailTest.php b/apps/settings/tests/Settings/Admin/MailTest.php
index adb7e2fdbd6..60a8f39cfa8 100644
--- a/apps/settings/tests/Settings/Admin/MailTest.php
+++ b/apps/settings/tests/Settings/Admin/MailTest.php
@@ -111,17 +111,17 @@ class MailTest extends TestCase {
'settings/admin/additional-mail',
[
'sendmail_is_available' => (bool) \OC_Helper::findBinaryPath('sendmail'),
- 'mail_domain' => 'mx.nextcloud.com',
- 'mail_from_address' => 'no-reply@nextcloud.com',
- 'mail_smtpmode' => 'smtp',
- 'mail_smtpsecure' => true,
- 'mail_smtphost' => 'smtp.nextcloud.com',
- 'mail_smtpport' => 25,
- 'mail_smtpauthtype' => 'login',
- 'mail_smtpauth' => true,
- 'mail_smtpname' => 'smtp.sender.com',
- 'mail_smtppassword' => '********',
- 'mail_sendmailmode' => 'smtp',
+ 'mail_domain' => 'mx.nextcloud.com',
+ 'mail_from_address' => 'no-reply@nextcloud.com',
+ 'mail_smtpmode' => 'smtp',
+ 'mail_smtpsecure' => true,
+ 'mail_smtphost' => 'smtp.nextcloud.com',
+ 'mail_smtpport' => 25,
+ 'mail_smtpauthtype' => 'login',
+ 'mail_smtpauth' => true,
+ 'mail_smtpname' => 'smtp.sender.com',
+ 'mail_smtppassword' => '********',
+ 'mail_sendmailmode' => 'smtp',
],
''
);
diff --git a/apps/settings/tests/Settings/Admin/ServerTest.php b/apps/settings/tests/Settings/Admin/ServerTest.php
index d066f5c2f49..f37cb01a40d 100644
--- a/apps/settings/tests/Settings/Admin/ServerTest.php
+++ b/apps/settings/tests/Settings/Admin/ServerTest.php
@@ -93,9 +93,9 @@ class ServerTest extends TestCase {
'settings/admin/server',
[
'backgroundjobs_mode' => 'ajax',
- 'lastcron' => false,
- 'cronErrors' => '',
- 'cronMaxAge' => 1337,
+ 'lastcron' => false,
+ 'cronErrors' => '',
+ 'cronMaxAge' => 1337,
'cli_based_cron_possible' => true,
'cli_based_cron_user' => function_exists('posix_getpwuid') ? posix_getpwuid(fileowner(\OC::$configDir . 'config.php'))['name'] : '', // to not explode here because of posix extension not being disabled - which is already checked in the line above
],
diff --git a/apps/settings/tests/Settings/Admin/SharingTest.php b/apps/settings/tests/Settings/Admin/SharingTest.php
index b1b3527f335..52e83f8ba7f 100644
--- a/apps/settings/tests/Settings/Admin/SharingTest.php
+++ b/apps/settings/tests/Settings/Admin/SharingTest.php
@@ -158,23 +158,23 @@ class SharingTest extends TestCase {
'settings',
'settings/admin/sharing',
[
- 'allowGroupSharing' => 'yes',
- 'allowLinks' => 'yes',
- 'allowPublicUpload' => 'yes',
- 'allowResharing' => 'yes',
+ 'allowGroupSharing' => 'yes',
+ 'allowLinks' => 'yes',
+ 'allowPublicUpload' => 'yes',
+ 'allowResharing' => 'yes',
'allowShareDialogUserEnumeration' => 'yes',
- 'restrictUserEnumerationToGroup' => 'no',
- 'enforceLinkPassword' => false,
- 'onlyShareWithGroupMembers' => false,
- 'shareAPIEnabled' => 'yes',
- 'shareDefaultExpireDateSet' => 'no',
- 'shareExpireAfterNDays' => '7',
- 'shareEnforceExpireDate' => 'no',
- 'shareExcludeGroups' => false,
- 'shareExcludedGroupsList' => '',
- 'publicShareDisclaimerText' => 'Lorem ipsum',
- 'enableLinkPasswordByDefault' => 'yes',
- 'shareApiDefaultPermissions' => Constants::PERMISSION_ALL,
+ 'restrictUserEnumerationToGroup' => 'no',
+ 'enforceLinkPassword' => false,
+ 'onlyShareWithGroupMembers' => false,
+ 'shareAPIEnabled' => 'yes',
+ 'shareDefaultExpireDateSet' => 'no',
+ 'shareExpireAfterNDays' => '7',
+ 'shareEnforceExpireDate' => 'no',
+ 'shareExcludeGroups' => false,
+ 'shareExcludedGroupsList' => '',
+ 'publicShareDisclaimerText' => 'Lorem ipsum',
+ 'enableLinkPasswordByDefault' => 'yes',
+ 'shareApiDefaultPermissions' => Constants::PERMISSION_ALL,
'shareApiDefaultPermissionsCheckboxes' => $this->invokePrivate($this->admin, 'getSharePermissionList', []),
'shareDefaultInternalExpireDateSet' => 'no',
'shareInternalExpireAfterNDays' => '7',
@@ -283,23 +283,23 @@ class SharingTest extends TestCase {
'settings',
'settings/admin/sharing',
[
- 'allowGroupSharing' => 'yes',
- 'allowLinks' => 'yes',
- 'allowPublicUpload' => 'yes',
- 'allowResharing' => 'yes',
+ 'allowGroupSharing' => 'yes',
+ 'allowLinks' => 'yes',
+ 'allowPublicUpload' => 'yes',
+ 'allowResharing' => 'yes',
'allowShareDialogUserEnumeration' => 'yes',
- 'restrictUserEnumerationToGroup' => 'no',
- 'enforceLinkPassword' => false,
- 'onlyShareWithGroupMembers' => false,
- 'shareAPIEnabled' => 'yes',
- 'shareDefaultExpireDateSet' => 'no',
- 'shareExpireAfterNDays' => '7',
- 'shareEnforceExpireDate' => 'no',
- 'shareExcludeGroups' => true,
- 'shareExcludedGroupsList' => 'NoSharers|OtherNoSharers',
- 'publicShareDisclaimerText' => 'Lorem ipsum',
- 'enableLinkPasswordByDefault' => 'yes',
- 'shareApiDefaultPermissions' => Constants::PERMISSION_ALL,
+ 'restrictUserEnumerationToGroup' => 'no',
+ 'enforceLinkPassword' => false,
+ 'onlyShareWithGroupMembers' => false,
+ 'shareAPIEnabled' => 'yes',
+ 'shareDefaultExpireDateSet' => 'no',
+ 'shareExpireAfterNDays' => '7',
+ 'shareEnforceExpireDate' => 'no',
+ 'shareExcludeGroups' => true,
+ 'shareExcludedGroupsList' => 'NoSharers|OtherNoSharers',
+ 'publicShareDisclaimerText' => 'Lorem ipsum',
+ 'enableLinkPasswordByDefault' => 'yes',
+ 'shareApiDefaultPermissions' => Constants::PERMISSION_ALL,
'shareApiDefaultPermissionsCheckboxes' => $this->invokePrivate($this->admin, 'getSharePermissionList', []),
'shareDefaultInternalExpireDateSet' => 'no',
'shareInternalExpireAfterNDays' => '7',
diff --git a/apps/sharebymail/tests/ShareByMailProviderTest.php b/apps/sharebymail/tests/ShareByMailProviderTest.php
index 991d5dc021d..2cc39ff9628 100644
--- a/apps/sharebymail/tests/ShareByMailProviderTest.php
+++ b/apps/sharebymail/tests/ShareByMailProviderTest.php
@@ -723,7 +723,7 @@ class ShareByMailProviderTest extends TestCase {
$id = $this->createDummyShare($itemType, $itemSource, $shareWith, $sharedBy, $uidOwner, $permissions, $token);
- $instance->getShareById($id+1);
+ $instance->getShareById($id + 1);
}
public function testGetShareByPath() {
@@ -921,10 +921,10 @@ class ShareByMailProviderTest extends TestCase {
$id = $this->createDummyShare($itemType, $itemSource, $shareWith, $sharedBy, $uidOwner, $permissions, $token);
- $this->invokePrivate($instance, 'getRawShare', [$id+1]);
+ $this->invokePrivate($instance, 'getRawShare', [$id + 1]);
}
- private function createDummyShare($itemType, $itemSource, $shareWith, $sharedBy, $uidOwner, $permissions, $token, $note='', $shareType = IShare::TYPE_EMAIL) {
+ private function createDummyShare($itemType, $itemSource, $shareWith, $sharedBy, $uidOwner, $permissions, $token, $note = '', $shareType = IShare::TYPE_EMAIL) {
$qb = $this->connection->getQueryBuilder();
$qb->insert('share')
->setValue('share_type', $qb->createNamedParameter($shareType))
diff --git a/apps/systemtags/lib/Activity/Listener.php b/apps/systemtags/lib/Activity/Listener.php
index 6baafb68473..e76d956007c 100644
--- a/apps/systemtags/lib/Activity/Listener.php
+++ b/apps/systemtags/lib/Activity/Listener.php
@@ -152,7 +152,7 @@ class Listener {
*/
public function mapperEvent(MapperEvent $event) {
$tagIds = $event->getTags();
- if ($event->getObjectType() !== 'files' ||empty($tagIds)
+ if ($event->getObjectType() !== 'files' || empty($tagIds)
|| !in_array($event->getEvent(), [MapperEvent::EVENT_ASSIGN, MapperEvent::EVENT_UNASSIGN])
|| !$this->appManager->isInstalled('activity')) {
// System tags not for files, no tags, not (un-)assigning or no activity-app enabled (save the energy)
diff --git a/apps/testing/appinfo/routes.php b/apps/testing/appinfo/routes.php
index 83a865d24bf..0898cb55bcb 100644
--- a/apps/testing/appinfo/routes.php
+++ b/apps/testing/appinfo/routes.php
@@ -39,42 +39,42 @@ return [
'ocs' => [
[
'name' => 'Config#setAppValue',
- 'url' => '/api/v1/app/{appid}/{configkey}',
+ 'url' => '/api/v1/app/{appid}/{configkey}',
'verb' => 'POST',
],
[
'name' => 'Config#deleteAppValue',
- 'url' => '/api/v1/app/{appid}/{configkey}',
+ 'url' => '/api/v1/app/{appid}/{configkey}',
'verb' => 'DELETE',
],
[
'name' => 'Locking#isLockingEnabled',
- 'url' => '/api/v1/lockprovisioning',
+ 'url' => '/api/v1/lockprovisioning',
'verb' => 'GET',
],
[
'name' => 'Locking#isLocked',
- 'url' => '/api/v1/lockprovisioning/{type}/{user}',
+ 'url' => '/api/v1/lockprovisioning/{type}/{user}',
'verb' => 'GET',
],
[
'name' => 'Locking#acquireLock',
- 'url' => '/api/v1/lockprovisioning/{type}/{user}',
+ 'url' => '/api/v1/lockprovisioning/{type}/{user}',
'verb' => 'POST',
],
[
'name' => 'Locking#changeLock',
- 'url' => '/api/v1/lockprovisioning/{type}/{user}',
+ 'url' => '/api/v1/lockprovisioning/{type}/{user}',
'verb' => 'PUT',
],
[
'name' => 'Locking#releaseLock',
- 'url' => '/api/v1/lockprovisioning/{type}/{user}',
+ 'url' => '/api/v1/lockprovisioning/{type}/{user}',
'verb' => 'DELETE',
],
[
'name' => 'Locking#releaseAll',
- 'url' => '/api/v1/lockprovisioning/{type}',
+ 'url' => '/api/v1/lockprovisioning/{type}',
'verb' => 'DELETE',
'defaults' => [
'type' => null
diff --git a/apps/theming/appinfo/routes.php b/apps/theming/appinfo/routes.php
index 527397be985..41b3f02bbf8 100644
--- a/apps/theming/appinfo/routes.php
+++ b/apps/theming/appinfo/routes.php
@@ -61,19 +61,19 @@ return ['routes' => [
'defaults' => ['app' => 'core']
],
[
- 'name' => 'Icon#getFavicon',
+ 'name' => 'Icon#getFavicon',
'url' => '/favicon/{app}',
'verb' => 'GET',
'defaults' => ['app' => 'core'],
],
[
- 'name' => 'Icon#getTouchIcon',
+ 'name' => 'Icon#getTouchIcon',
'url' => '/icon/{app}',
'verb' => 'GET',
'defaults' => ['app' => 'core'],
],
[
- 'name' => 'Icon#getThemedIcon',
+ 'name' => 'Icon#getThemedIcon',
'url' => '/img/{app}/{image}',
'verb' => 'GET',
'requirements' => ['image' => '.+']
diff --git a/apps/theming/lib/Controller/ThemingController.php b/apps/theming/lib/Controller/ThemingController.php
index 56570794247..8957d305883 100644
--- a/apps/theming/lib/Controller/ThemingController.php
+++ b/apps/theming/lib/Controller/ThemingController.php
@@ -382,8 +382,8 @@ class ThemingController extends Controller {
[
'src' => $this->urlGenerator->linkToRoute('theming.Icon.getTouchIcon',
['app' => $app]) . '?v=' . $cacheBusterValue,
- 'type'=> 'image/png',
- 'sizes'=> '128x128'
+ 'type' => 'image/png',
+ 'sizes' => '128x128'
],
[
'src' => $this->urlGenerator->linkToRoute('theming.Icon.getFavicon',
diff --git a/apps/theming/lib/IconBuilder.php b/apps/theming/lib/IconBuilder.php
index 2818f379152..68d1ff311fe 100644
--- a/apps/theming/lib/IconBuilder.php
+++ b/apps/theming/lib/IconBuilder.php
@@ -164,7 +164,7 @@ class IconBuilder {
$res = $tmp->getImageResolution();
$tmp->destroy();
- if ($x>$y) {
+ if ($x > $y) {
$max = $x;
} else {
$max = $y;
diff --git a/apps/theming/lib/Settings/Admin.php b/apps/theming/lib/Settings/Admin.php
index 518aace2c35..f68a25a3fae 100644
--- a/apps/theming/lib/Settings/Admin.php
+++ b/apps/theming/lib/Settings/Admin.php
@@ -73,18 +73,18 @@ class Admin implements ISettings {
}
$parameters = [
- 'themable' => $themable,
- 'errorMessage' => $errorMessage,
- 'name' => $this->themingDefaults->getEntity(),
- 'url' => $this->themingDefaults->getBaseUrl(),
- 'slogan' => $this->themingDefaults->getSlogan(),
- 'color' => $this->themingDefaults->getColorPrimary(),
+ 'themable' => $themable,
+ 'errorMessage' => $errorMessage,
+ 'name' => $this->themingDefaults->getEntity(),
+ 'url' => $this->themingDefaults->getBaseUrl(),
+ 'slogan' => $this->themingDefaults->getSlogan(),
+ 'color' => $this->themingDefaults->getColorPrimary(),
'uploadLogoRoute' => $this->urlGenerator->linkToRoute('theming.Theming.uploadImage'),
- 'canThemeIcons' => $this->imageManager->shouldReplaceIcons(),
- 'iconDocs' => $this->urlGenerator->linkToDocs('admin-theming-icons'),
- 'images' => $this->imageManager->getCustomImages(),
- 'imprintUrl' => $this->themingDefaults->getImprintUrl(),
- 'privacyUrl' => $this->themingDefaults->getPrivacyUrl(),
+ 'canThemeIcons' => $this->imageManager->shouldReplaceIcons(),
+ 'iconDocs' => $this->urlGenerator->linkToDocs('admin-theming-icons'),
+ 'images' => $this->imageManager->getCustomImages(),
+ 'imprintUrl' => $this->themingDefaults->getImprintUrl(),
+ 'privacyUrl' => $this->themingDefaults->getPrivacyUrl(),
];
return new TemplateResponse('theming', 'settings-admin', $parameters, '');
diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php
index 3fdbc1a61ae..3f0a94e244a 100644
--- a/apps/theming/lib/ThemingDefaults.php
+++ b/apps/theming/lib/ThemingDefaults.php
@@ -372,7 +372,7 @@ class ThemingDefaults extends \OC_Defaults {
*/
private function increaseCacheBuster() {
$cacheBusterKey = $this->config->getAppValue('theming', 'cachebuster', '0');
- $this->config->setAppValue('theming', 'cachebuster', (int)$cacheBusterKey+1);
+ $this->config->setAppValue('theming', 'cachebuster', (int)$cacheBusterKey + 1);
$this->cacheFactory->createDistributed('theming-')->clear();
$this->cacheFactory->createDistributed('imagePath')->clear();
}
diff --git a/apps/theming/lib/Util.php b/apps/theming/lib/Util.php
index 5df132f382c..3addda91422 100644
--- a/apps/theming/lib/Util.php
+++ b/apps/theming/lib/Util.php
@@ -66,7 +66,7 @@ class Util {
*/
public function invertTextColor($color) {
$l = $this->calculateLuma($color);
- if ($l>0.6) {
+ if ($l > 0.6) {
return true;
} else {
return false;
@@ -104,7 +104,7 @@ class Util {
list($red, $green, $blue) = $this->hexToRGB($color);
$compiler = new Compiler();
$hsl = $compiler->toHSL($red, $green, $blue);
- return $hsl[3]/100;
+ return $hsl[3] / 100;
}
/**
@@ -113,7 +113,7 @@ class Util {
*/
public function calculateLuma($color) {
list($red, $green, $blue) = $this->hexToRGB($color);
- return (0.2126 * $red + 0.7152 * $green + 0.0722 * $blue) / 255;
+ return (0.2126 * $red + 0.7152 * $green + 0.0722 * $blue) / 255;
}
/**
diff --git a/apps/theming/tests/Controller/ThemingControllerTest.php b/apps/theming/tests/Controller/ThemingControllerTest.php
index 5c6763cdd17..18d2d0d4984 100644
--- a/apps/theming/tests/Controller/ThemingControllerTest.php
+++ b/apps/theming/tests/Controller/ThemingControllerTest.php
@@ -356,7 +356,7 @@ class ThemingControllerTest extends TestCase {
}
/** @dataProvider dataUpdateImages */
- public function testUpdateLogoNormalLogoUpload($mimeType, $folderExists=true) {
+ public function testUpdateLogoNormalLogoUpload($mimeType, $folderExists = true) {
$tmpLogo = \OC::$server->getTempManager()->getTemporaryFolder() . '/logo.svg';
$destination = \OC::$server->getTempManager()->getTemporaryFolder();
@@ -816,8 +816,8 @@ class ThemingControllerTest extends TestCase {
[
[
'src' => 'touchicon?v=0',
- 'type'=> 'image/png',
- 'sizes'=> '128x128'
+ 'type' => 'image/png',
+ 'sizes' => '128x128'
],
[
'src' => 'favicon?v=0',
diff --git a/apps/theming/tests/ImageManagerTest.php b/apps/theming/tests/ImageManagerTest.php
index 81f4a8b98db..08a8fe821f0 100644
--- a/apps/theming/tests/ImageManagerTest.php
+++ b/apps/theming/tests/ImageManagerTest.php
@@ -312,7 +312,7 @@ class ImageManagerTest extends TestCase {
$this->createMock(ISimpleFolder::class),
$this->createMock(ISimpleFolder::class)
];
- foreach ($folders as $index=>$folder) {
+ foreach ($folders as $index => $folder) {
$folder->expects($this->any())
->method('getName')
->willReturn($index);
diff --git a/apps/theming/tests/ThemingDefaultsTest.php b/apps/theming/tests/ThemingDefaultsTest.php
index fecde372622..066b8b8ff8d 100644
--- a/apps/theming/tests/ThemingDefaultsTest.php
+++ b/apps/theming/tests/ThemingDefaultsTest.php
@@ -644,8 +644,8 @@ class ThemingDefaultsTest extends TestCase {
->method('createDistributed')
->with('theming-')
->willReturn($this->cache);
- $this->cache->expects($this->once())->method('get')->with('getScssVariables')->willReturn(['foo'=>'bar']);
- $this->assertEquals(['foo'=>'bar'], $this->template->getScssVariables());
+ $this->cache->expects($this->once())->method('get')->with('getScssVariables')->willReturn(['foo' => 'bar']);
+ $this->assertEquals(['foo' => 'bar'], $this->template->getScssVariables());
}
public function testGetScssVariables() {
diff --git a/apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php b/apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php
index 352e3411a79..ec45420299b 100644
--- a/apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php
+++ b/apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php
@@ -60,7 +60,7 @@ class RememberBackupCodesJob extends TimedJob {
$this->notificationManager = $notificationManager;
$this->jobList = $jobList;
- $this->setInterval(60*60*24*14);
+ $this->setInterval(60 * 60 * 24 * 14);
}
protected function run($argument) {
diff --git a/apps/updatenotification/lib/UpdateChecker.php b/apps/updatenotification/lib/UpdateChecker.php
index b83eff8818b..5b7f15e838a 100644
--- a/apps/updatenotification/lib/UpdateChecker.php
+++ b/apps/updatenotification/lib/UpdateChecker.php
@@ -82,7 +82,7 @@ class UpdateChecker {
* @param array $data
*/
public function populateJavaScriptVariables(array $data) {
- $data['array']['oc_updateState'] = json_encode([
+ $data['array']['oc_updateState'] = json_encode([
'updateAvailable' => true,
'updateVersion' => $this->getUpdateState()['updateVersionString'],
'updateLink' => $this->getUpdateState()['updateLink'] ?? '',
diff --git a/apps/updatenotification/tests/UpdateCheckerTest.php b/apps/updatenotification/tests/UpdateCheckerTest.php
index 77257decf9c..9b717fdbba4 100644
--- a/apps/updatenotification/tests/UpdateCheckerTest.php
+++ b/apps/updatenotification/tests/UpdateCheckerTest.php
@@ -57,11 +57,11 @@ class UpdateCheckerTest extends TestCase {
->willReturn([
'version' => '1.2.3',
'versionstring' => 'Nextcloud 1.2.3',
- 'web'=> 'javascript:alert(1)',
- 'url'=> 'javascript:alert(2)',
+ 'web' => 'javascript:alert(1)',
+ 'url' => 'javascript:alert(2)',
'changes' => 'javascript:alert(3)',
- 'autoupdater'=> '0',
- 'eol'=> '1',
+ 'autoupdater' => '0',
+ 'eol' => '1',
]);
$expected = [
@@ -98,11 +98,11 @@ class UpdateCheckerTest extends TestCase {
->willReturn([
'version' => '1.2.3',
'versionstring' => 'Nextcloud 1.2.3',
- 'web'=> 'https://docs.nextcloud.com/myUrl',
- 'url'=> 'https://downloads.nextcloud.org/server',
+ 'web' => 'https://docs.nextcloud.com/myUrl',
+ 'url' => 'https://downloads.nextcloud.org/server',
'changes' => 'https://updates.nextcloud.com/changelog_server/?version=123.0.0',
- 'autoupdater'=> '1',
- 'eol'=> '0',
+ 'autoupdater' => '1',
+ 'eol' => '0',
]);
$this->changesChecker->expects($this->once())
diff --git a/apps/user_ldap/ajax/getNewServerConfigPrefix.php b/apps/user_ldap/ajax/getNewServerConfigPrefix.php
index 6118ac18566..4e95d6e02b5 100644
--- a/apps/user_ldap/ajax/getNewServerConfigPrefix.php
+++ b/apps/user_ldap/ajax/getNewServerConfigPrefix.php
@@ -34,7 +34,7 @@ $serverConnections = $helper->getServerConfigurationPrefixes();
sort($serverConnections);
$lk = array_pop($serverConnections);
$ln = (int)str_replace('s', '', $lk);
-$nk = 's'.str_pad($ln+1, 2, '0', STR_PAD_LEFT);
+$nk = 's'.str_pad($ln + 1, 2, '0', STR_PAD_LEFT);
$resultData = ['configPrefix' => $nk];
diff --git a/apps/user_ldap/lib/Command/Search.php b/apps/user_ldap/lib/Command/Search.php
index 9592241924c..5086f3a0c1a 100644
--- a/apps/user_ldap/lib/Command/Search.php
+++ b/apps/user_ldap/lib/Command/Search.php
@@ -96,7 +96,7 @@ class Search extends Command {
if ($limit < 0) {
throw new \InvalidArgumentException('limit must be 0 or greater');
}
- if ($offset < 0) {
+ if ($offset < 0) {
throw new \InvalidArgumentException('offset must be 0 or greater');
}
if ($limit === 0 && $offset !== 0) {
diff --git a/apps/user_ldap/lib/Configuration.php b/apps/user_ldap/lib/Configuration.php
index 5a7c732ab7b..efa9d34b83f 100644
--- a/apps/user_ldap/lib/Configuration.php
+++ b/apps/user_ldap/lib/Configuration.php
@@ -433,60 +433,60 @@ class Configuration {
*/
public function getDefaults() {
return [
- 'ldap_host' => '',
- 'ldap_port' => '',
- 'ldap_backup_host' => '',
- 'ldap_backup_port' => '',
- 'ldap_override_main_server' => '',
- 'ldap_dn' => '',
- 'ldap_agent_password' => '',
- 'ldap_base' => '',
- 'ldap_base_users' => '',
- 'ldap_base_groups' => '',
- 'ldap_userlist_filter' => '',
- 'ldap_user_filter_mode' => 0,
- 'ldap_userfilter_objectclass' => '',
- 'ldap_userfilter_groups' => '',
- 'ldap_login_filter' => '',
- 'ldap_login_filter_mode' => 0,
- 'ldap_loginfilter_email' => 0,
- 'ldap_loginfilter_username' => 1,
- 'ldap_loginfilter_attributes' => '',
- 'ldap_group_filter' => '',
- 'ldap_group_filter_mode' => 0,
- 'ldap_groupfilter_objectclass' => '',
- 'ldap_groupfilter_groups' => '',
- 'ldap_gid_number' => 'gidNumber',
- 'ldap_display_name' => 'displayName',
- 'ldap_user_display_name_2' => '',
- 'ldap_group_display_name' => 'cn',
- 'ldap_tls' => 0,
- 'ldap_quota_def' => '',
- 'ldap_quota_attr' => '',
- 'ldap_email_attr' => '',
+ 'ldap_host' => '',
+ 'ldap_port' => '',
+ 'ldap_backup_host' => '',
+ 'ldap_backup_port' => '',
+ 'ldap_override_main_server' => '',
+ 'ldap_dn' => '',
+ 'ldap_agent_password' => '',
+ 'ldap_base' => '',
+ 'ldap_base_users' => '',
+ 'ldap_base_groups' => '',
+ 'ldap_userlist_filter' => '',
+ 'ldap_user_filter_mode' => 0,
+ 'ldap_userfilter_objectclass' => '',
+ 'ldap_userfilter_groups' => '',
+ 'ldap_login_filter' => '',
+ 'ldap_login_filter_mode' => 0,
+ 'ldap_loginfilter_email' => 0,
+ 'ldap_loginfilter_username' => 1,
+ 'ldap_loginfilter_attributes' => '',
+ 'ldap_group_filter' => '',
+ 'ldap_group_filter_mode' => 0,
+ 'ldap_groupfilter_objectclass' => '',
+ 'ldap_groupfilter_groups' => '',
+ 'ldap_gid_number' => 'gidNumber',
+ 'ldap_display_name' => 'displayName',
+ 'ldap_user_display_name_2' => '',
+ 'ldap_group_display_name' => 'cn',
+ 'ldap_tls' => 0,
+ 'ldap_quota_def' => '',
+ 'ldap_quota_attr' => '',
+ 'ldap_email_attr' => '',
'ldap_group_member_assoc_attribute' => '',
- 'ldap_cache_ttl' => 600,
- 'ldap_uuid_user_attribute' => 'auto',
- 'ldap_uuid_group_attribute' => 'auto',
- 'home_folder_naming_rule' => '',
- 'ldap_turn_off_cert_check' => 0,
- 'ldap_configuration_active' => 0,
- 'ldap_attributes_for_user_search' => '',
- 'ldap_attributes_for_group_search' => '',
- 'ldap_expert_username_attr' => '',
- 'ldap_expert_uuid_user_attr' => '',
- 'ldap_expert_uuid_group_attr' => '',
- 'has_memberof_filter_support' => 0,
+ 'ldap_cache_ttl' => 600,
+ 'ldap_uuid_user_attribute' => 'auto',
+ 'ldap_uuid_group_attribute' => 'auto',
+ 'home_folder_naming_rule' => '',
+ 'ldap_turn_off_cert_check' => 0,
+ 'ldap_configuration_active' => 0,
+ 'ldap_attributes_for_user_search' => '',
+ 'ldap_attributes_for_group_search' => '',
+ 'ldap_expert_username_attr' => '',
+ 'ldap_expert_uuid_user_attr' => '',
+ 'ldap_expert_uuid_group_attr' => '',
+ 'has_memberof_filter_support' => 0,
'use_memberof_to_detect_membership' => 1,
- 'last_jpegPhoto_lookup' => 0,
- 'ldap_nested_groups' => 0,
- 'ldap_paging_size' => 500,
- 'ldap_turn_on_pwd_change' => 0,
- 'ldap_experienced_admin' => 0,
- 'ldap_dynamic_group_member_url' => '',
- 'ldap_default_ppolicy_dn' => '',
- 'ldap_user_avatar_rule' => 'default',
- 'ldap_ext_storage_home_attribute' => '',
+ 'last_jpegPhoto_lookup' => 0,
+ 'ldap_nested_groups' => 0,
+ 'ldap_paging_size' => 500,
+ 'ldap_turn_on_pwd_change' => 0,
+ 'ldap_experienced_admin' => 0,
+ 'ldap_dynamic_group_member_url' => '',
+ 'ldap_default_ppolicy_dn' => '',
+ 'ldap_user_avatar_rule' => 'default',
+ 'ldap_ext_storage_home_attribute' => '',
'ldap_matching_rule_in_chain_state' => self::LDAP_SERVER_FEATURE_UNKNOWN,
];
}
@@ -497,60 +497,60 @@ class Configuration {
public function getConfigTranslationArray() {
//TODO: merge them into one representation
static $array = [
- 'ldap_host' => 'ldapHost',
- 'ldap_port' => 'ldapPort',
- 'ldap_backup_host' => 'ldapBackupHost',
- 'ldap_backup_port' => 'ldapBackupPort',
- 'ldap_override_main_server' => 'ldapOverrideMainServer',
- 'ldap_dn' => 'ldapAgentName',
- 'ldap_agent_password' => 'ldapAgentPassword',
- 'ldap_base' => 'ldapBase',
- 'ldap_base_users' => 'ldapBaseUsers',
- 'ldap_base_groups' => 'ldapBaseGroups',
- 'ldap_userfilter_objectclass' => 'ldapUserFilterObjectclass',
- 'ldap_userfilter_groups' => 'ldapUserFilterGroups',
- 'ldap_userlist_filter' => 'ldapUserFilter',
- 'ldap_user_filter_mode' => 'ldapUserFilterMode',
- 'ldap_user_avatar_rule' => 'ldapUserAvatarRule',
- 'ldap_login_filter' => 'ldapLoginFilter',
- 'ldap_login_filter_mode' => 'ldapLoginFilterMode',
- 'ldap_loginfilter_email' => 'ldapLoginFilterEmail',
- 'ldap_loginfilter_username' => 'ldapLoginFilterUsername',
- 'ldap_loginfilter_attributes' => 'ldapLoginFilterAttributes',
- 'ldap_group_filter' => 'ldapGroupFilter',
- 'ldap_group_filter_mode' => 'ldapGroupFilterMode',
- 'ldap_groupfilter_objectclass' => 'ldapGroupFilterObjectclass',
- 'ldap_groupfilter_groups' => 'ldapGroupFilterGroups',
- 'ldap_gid_number' => 'ldapGidNumber',
- 'ldap_display_name' => 'ldapUserDisplayName',
- 'ldap_user_display_name_2' => 'ldapUserDisplayName2',
- 'ldap_group_display_name' => 'ldapGroupDisplayName',
- 'ldap_tls' => 'ldapTLS',
- 'ldap_quota_def' => 'ldapQuotaDefault',
- 'ldap_quota_attr' => 'ldapQuotaAttribute',
- 'ldap_email_attr' => 'ldapEmailAttribute',
+ 'ldap_host' => 'ldapHost',
+ 'ldap_port' => 'ldapPort',
+ 'ldap_backup_host' => 'ldapBackupHost',
+ 'ldap_backup_port' => 'ldapBackupPort',
+ 'ldap_override_main_server' => 'ldapOverrideMainServer',
+ 'ldap_dn' => 'ldapAgentName',
+ 'ldap_agent_password' => 'ldapAgentPassword',
+ 'ldap_base' => 'ldapBase',
+ 'ldap_base_users' => 'ldapBaseUsers',
+ 'ldap_base_groups' => 'ldapBaseGroups',
+ 'ldap_userfilter_objectclass' => 'ldapUserFilterObjectclass',
+ 'ldap_userfilter_groups' => 'ldapUserFilterGroups',
+ 'ldap_userlist_filter' => 'ldapUserFilter',
+ 'ldap_user_filter_mode' => 'ldapUserFilterMode',
+ 'ldap_user_avatar_rule' => 'ldapUserAvatarRule',
+ 'ldap_login_filter' => 'ldapLoginFilter',
+ 'ldap_login_filter_mode' => 'ldapLoginFilterMode',
+ 'ldap_loginfilter_email' => 'ldapLoginFilterEmail',
+ 'ldap_loginfilter_username' => 'ldapLoginFilterUsername',
+ 'ldap_loginfilter_attributes' => 'ldapLoginFilterAttributes',
+ 'ldap_group_filter' => 'ldapGroupFilter',
+ 'ldap_group_filter_mode' => 'ldapGroupFilterMode',
+ 'ldap_groupfilter_objectclass' => 'ldapGroupFilterObjectclass',
+ 'ldap_groupfilter_groups' => 'ldapGroupFilterGroups',
+ 'ldap_gid_number' => 'ldapGidNumber',
+ 'ldap_display_name' => 'ldapUserDisplayName',
+ 'ldap_user_display_name_2' => 'ldapUserDisplayName2',
+ 'ldap_group_display_name' => 'ldapGroupDisplayName',
+ 'ldap_tls' => 'ldapTLS',
+ 'ldap_quota_def' => 'ldapQuotaDefault',
+ 'ldap_quota_attr' => 'ldapQuotaAttribute',
+ 'ldap_email_attr' => 'ldapEmailAttribute',
'ldap_group_member_assoc_attribute' => 'ldapGroupMemberAssocAttr',
- 'ldap_cache_ttl' => 'ldapCacheTTL',
- 'home_folder_naming_rule' => 'homeFolderNamingRule',
- 'ldap_turn_off_cert_check' => 'turnOffCertCheck',
- 'ldap_configuration_active' => 'ldapConfigurationActive',
- 'ldap_attributes_for_user_search' => 'ldapAttributesForUserSearch',
- 'ldap_attributes_for_group_search' => 'ldapAttributesForGroupSearch',
- 'ldap_expert_username_attr' => 'ldapExpertUsernameAttr',
- 'ldap_expert_uuid_user_attr' => 'ldapExpertUUIDUserAttr',
- 'ldap_expert_uuid_group_attr' => 'ldapExpertUUIDGroupAttr',
- 'has_memberof_filter_support' => 'hasMemberOfFilterSupport',
+ 'ldap_cache_ttl' => 'ldapCacheTTL',
+ 'home_folder_naming_rule' => 'homeFolderNamingRule',
+ 'ldap_turn_off_cert_check' => 'turnOffCertCheck',
+ 'ldap_configuration_active' => 'ldapConfigurationActive',
+ 'ldap_attributes_for_user_search' => 'ldapAttributesForUserSearch',
+ 'ldap_attributes_for_group_search' => 'ldapAttributesForGroupSearch',
+ 'ldap_expert_username_attr' => 'ldapExpertUsernameAttr',
+ 'ldap_expert_uuid_user_attr' => 'ldapExpertUUIDUserAttr',
+ 'ldap_expert_uuid_group_attr' => 'ldapExpertUUIDGroupAttr',
+ 'has_memberof_filter_support' => 'hasMemberOfFilterSupport',
'use_memberof_to_detect_membership' => 'useMemberOfToDetectMembership',
- 'last_jpegPhoto_lookup' => 'lastJpegPhotoLookup',
- 'ldap_nested_groups' => 'ldapNestedGroups',
- 'ldap_paging_size' => 'ldapPagingSize',
- 'ldap_turn_on_pwd_change' => 'turnOnPasswordChange',
- 'ldap_experienced_admin' => 'ldapExperiencedAdmin',
- 'ldap_dynamic_group_member_url' => 'ldapDynamicGroupMemberURL',
- 'ldap_default_ppolicy_dn' => 'ldapDefaultPPolicyDN',
- 'ldap_ext_storage_home_attribute' => 'ldapExtStorageHomeAttribute',
+ 'last_jpegPhoto_lookup' => 'lastJpegPhotoLookup',
+ 'ldap_nested_groups' => 'ldapNestedGroups',
+ 'ldap_paging_size' => 'ldapPagingSize',
+ 'ldap_turn_on_pwd_change' => 'turnOnPasswordChange',
+ 'ldap_experienced_admin' => 'ldapExperiencedAdmin',
+ 'ldap_dynamic_group_member_url' => 'ldapDynamicGroupMemberURL',
+ 'ldap_default_ppolicy_dn' => 'ldapDefaultPPolicyDN',
+ 'ldap_ext_storage_home_attribute' => 'ldapExtStorageHomeAttribute',
'ldap_matching_rule_in_chain_state' => 'ldapMatchingRuleInChainState',
- 'ldapIgnoreNamingRules' => 'ldapIgnoreNamingRules', // sysconfig
+ 'ldapIgnoreNamingRules' => 'ldapIgnoreNamingRules', // sysconfig
];
return $array;
}
diff --git a/apps/user_ldap/lib/Connection.php b/apps/user_ldap/lib/Connection.php
index b7556bf236e..af10aadc6bb 100644
--- a/apps/user_ldap/lib/Connection.php
+++ b/apps/user_ldap/lib/Connection.php
@@ -273,7 +273,7 @@ class Connection extends LDAPUtility {
|| !$this->configuration->ldapConfigurationActive) {
return null;
}
- $key = $this->getCacheKey($key);
+ $key = $this->getCacheKey($key);
$value = base64_encode(json_encode($value));
$this->cache->set($key, $value, $this->configuration->ldapCacheTTL);
}
@@ -371,7 +371,7 @@ class Connection extends LDAPUtility {
}
}
- foreach (['ldapExpertUUIDUserAttr' => 'ldapUuidUserAttribute',
+ foreach (['ldapExpertUUIDUserAttr' => 'ldapUuidUserAttribute',
'ldapExpertUUIDGroupAttr' => 'ldapUuidGroupAttribute']
as $expertSetting => $effectiveSetting) {
$uuidOverride = $this->configuration->$expertSetting;
@@ -466,7 +466,7 @@ class Connection extends LDAPUtility {
$agent = $this->configuration->ldapAgentName;
$pwd = $this->configuration->ldapAgentPassword;
if (
- ($agent === '' && $pwd !== '')
+ ($agent === '' && $pwd !== '')
|| ($agent !== '' && $pwd === '')
) {
\OCP\Util::writeLog(
diff --git a/apps/user_ldap/lib/Jobs/CleanUp.php b/apps/user_ldap/lib/Jobs/CleanUp.php
index b516e08b9e1..8f729ae4372 100644
--- a/apps/user_ldap/lib/Jobs/CleanUp.php
+++ b/apps/user_ldap/lib/Jobs/CleanUp.php
@@ -100,7 +100,7 @@ class CleanUp extends TimedJob {
if (isset($arguments['userBackend'])) {
$this->userBackend = $arguments['userBackend'];
} else {
- $this->userBackend = new User_Proxy(
+ $this->userBackend = new User_Proxy(
$this->ldapHelper->getServerConfigurationPrefixes(true),
new LDAP(),
$this->ocConfig,
diff --git a/apps/user_ldap/lib/Jobs/UpdateGroups.php b/apps/user_ldap/lib/Jobs/UpdateGroups.php
index 8cbac261e9f..33587f8bdb2 100644
--- a/apps/user_ldap/lib/Jobs/UpdateGroups.php
+++ b/apps/user_ldap/lib/Jobs/UpdateGroups.php
@@ -207,7 +207,7 @@ class UpdateGroups extends \OC\BackgroundJob\TimedJob {
$connector = new Connection($ldapWrapper, $configPrefixes[0]);
$ldapAccess = new Access($connector, $ldapWrapper, $userManager, $helper, \OC::$server->getConfig(), \OC::$server->getUserManager());
$groupMapper = new GroupMapping($dbc);
- $userMapper = new UserMapping($dbc);
+ $userMapper = new UserMapping($dbc);
$ldapAccess->setGroupMapper($groupMapper);
$ldapAccess->setUserMapper($userMapper);
self::$groupBE = new \OCA\User_LDAP\Group_LDAP($ldapAccess, \OC::$server->query(GroupPluginManager::class));
diff --git a/apps/user_ldap/lib/LDAP.php b/apps/user_ldap/lib/LDAP.php
index 63b2b9adcb9..c55e08618e8 100644
--- a/apps/user_ldap/lib/LDAP.php
+++ b/apps/user_ldap/lib/LDAP.php
@@ -369,7 +369,7 @@ class LDAP implements ILDAPWrapper {
if ($errorCode === 0) {
return;
}
- $errorMsg = ldap_error($resource);
+ $errorMsg = ldap_error($resource);
if ($this->curFunc === 'ldap_get_entries'
&& $errorCode === -4) {
diff --git a/apps/user_ldap/lib/User/Manager.php b/apps/user_ldap/lib/User/Manager.php
index 898a0ae0f86..a3d7fd9c2b4 100644
--- a/apps/user_ldap/lib/User/Manager.php
+++ b/apps/user_ldap/lib/User/Manager.php
@@ -98,16 +98,16 @@ class Manager {
IAvatarManager $avatarManager, Image $image,
IDBConnection $db, IUserManager $userManager,
INotificationManager $notificationManager) {
- $this->ocConfig = $ocConfig;
- $this->ocFilesystem = $ocFilesystem;
- $this->ocLog = $ocLog;
- $this->avatarManager = $avatarManager;
- $this->image = $image;
- $this->db = $db;
- $this->userManager = $userManager;
+ $this->ocConfig = $ocConfig;
+ $this->ocFilesystem = $ocFilesystem;
+ $this->ocLog = $ocLog;
+ $this->avatarManager = $avatarManager;
+ $this->image = $image;
+ $this->db = $db;
+ $this->userManager = $userManager;
$this->notificationManager = $notificationManager;
- $this->usersByDN = new CappedMemoryCache();
- $this->usersByUid = new CappedMemoryCache();
+ $this->usersByDN = new CappedMemoryCache();
+ $this->usersByUid = new CappedMemoryCache();
}
/**
@@ -132,7 +132,7 @@ class Manager {
$this->ocFilesystem, clone $this->image, $this->ocLog,
$this->avatarManager, $this->userManager,
$this->notificationManager);
- $this->usersByDN[$dn] = $user;
+ $this->usersByDN[$dn] = $user;
$this->usersByUid[$uid] = $user;
return $user;
}
diff --git a/apps/user_ldap/lib/User/OfflineUser.php b/apps/user_ldap/lib/User/OfflineUser.php
index 72d29dd5441..1abef861852 100644
--- a/apps/user_ldap/lib/User/OfflineUser.php
+++ b/apps/user_ldap/lib/User/OfflineUser.php
@@ -196,12 +196,12 @@ class OfflineUser {
*/
protected function fetchDetails() {
$properties = [
- 'displayName' => 'user_ldap',
- 'uid' => 'user_ldap',
- 'homePath' => 'user_ldap',
+ 'displayName' => 'user_ldap',
+ 'uid' => 'user_ldap',
+ 'homePath' => 'user_ldap',
'foundDeleted' => 'user_ldap',
- 'email' => 'settings',
- 'lastLogin' => 'login',
+ 'email' => 'settings',
+ 'lastLogin' => 'login',
];
foreach ($properties as $property => $app) {
$this->$property = $this->config->getUserValue($this->ocName, $app, $property, '');
diff --git a/apps/user_ldap/lib/User/User.php b/apps/user_ldap/lib/User/User.php
index 6117f34a0c6..91ad8c81be6 100644
--- a/apps/user_ldap/lib/User/User.php
+++ b/apps/user_ldap/lib/User/User.php
@@ -107,7 +107,7 @@ class User {
/**
* DB config keys for user preferences
*/
- public const USER_PREFKEY_FIRSTLOGIN = 'firstLoginAccomplished';
+ public const USER_PREFKEY_FIRSTLOGIN = 'firstLoginAccomplished';
/**
* @brief constructor, make sure the subclasses call this one!
@@ -134,16 +134,16 @@ class User {
throw new \InvalidArgumentException('uid must not be an empty string!');
}
- $this->access = $access;
- $this->connection = $access->getConnection();
- $this->config = $config;
- $this->fs = $fs;
- $this->dn = $dn;
- $this->uid = $username;
- $this->image = $image;
- $this->log = $log;
- $this->avatarManager = $avatarManager;
- $this->userManager = $userManager;
+ $this->access = $access;
+ $this->connection = $access->getConnection();
+ $this->config = $config;
+ $this->fs = $fs;
+ $this->dn = $dn;
+ $this->uid = $username;
+ $this->image = $image;
+ $this->log = $log;
+ $this->avatarManager = $avatarManager;
+ $this->userManager = $userManager;
$this->notificationManager = $notificationManager;
\OCP\Util::connectHook('OC_User', 'post_login', $this, 'handlePasswordExpiry');
diff --git a/apps/user_ldap/lib/Wizard.php b/apps/user_ldap/lib/Wizard.php
index 78337ff32b1..0d614f5b1fb 100644
--- a/apps/user_ldap/lib/Wizard.php
+++ b/apps/user_ldap/lib/Wizard.php
@@ -55,8 +55,8 @@ class Wizard extends LDAPUtility {
public const LRESULT_PROCESSED_INVALID = 3;
public const LRESULT_PROCESSED_SKIP = 4;
- public const LFILTER_LOGIN = 2;
- public const LFILTER_USER_LIST = 3;
+ public const LFILTER_LOGIN = 2;
+ public const LFILTER_USER_LIST = 3;
public const LFILTER_GROUP_LIST = 4;
public const LFILTER_MODE_ASSISTED = 2;
@@ -106,7 +106,7 @@ class Wizard extends LDAPUtility {
$attr = ['dn']; // default
$limit = 1001;
if ($type === 'groups') {
- $result = $this->access->countGroups($filter, $attr, $limit);
+ $result = $this->access->countGroups($filter, $attr, $limit);
} elseif ($type === 'users') {
$result = $this->access->countUsers($filter, $attr, $limit);
} elseif ($type === 'objects') {
@@ -847,7 +847,7 @@ class Wizard extends LDAPUtility {
//get a result set > 0 on a proper base
$rr = $this->ldap->search($cr, $base, 'objectClass=*', ['dn'], 0, 1);
if (!$this->ldap->isResource($rr)) {
- $errorNo = $this->ldap->errno($cr);
+ $errorNo = $this->ldap->errno($cr);
$errorMsg = $this->ldap->error($cr);
\OCP\Util::writeLog('user_ldap', 'Wiz: Could not search base '.$base.
' Error '.$errorNo.': '.$errorMsg, ILogger::INFO);
@@ -872,7 +872,7 @@ class Wizard extends LDAPUtility {
throw new \Exception('Could not connect to LDAP');
}
$result = $this->access->countUsers('memberOf=*', ['memberOf'], 1);
- if (is_int($result) && $result > 0) {
+ if (is_int($result) && $result > 0) {
return true;
}
return false;
@@ -1102,7 +1102,7 @@ class Wizard extends LDAPUtility {
return
($agent !== '' && $pwd !== '')
- || ($agent === '' && $pwd === '')
+ || ($agent === '' && $pwd === '')
;
}
@@ -1146,8 +1146,8 @@ class Wizard extends LDAPUtility {
return false;
}
$lastFilter = null;
- if (isset($filters[count($filters)-1])) {
- $lastFilter = $filters[count($filters)-1];
+ if (isset($filters[count($filters) - 1])) {
+ $lastFilter = $filters[count($filters) - 1];
}
foreach ($filters as $filter) {
if ($lastFilter === $filter && count($foundItems) > 0) {
@@ -1320,11 +1320,11 @@ class Wizard extends LDAPUtility {
private function getDefaultLdapPortSettings() {
static $settings = [
['port' => 7636, 'tls' => false],
- ['port' => 636, 'tls' => false],
+ ['port' => 636, 'tls' => false],
['port' => 7389, 'tls' => true],
- ['port' => 389, 'tls' => true],
+ ['port' => 389, 'tls' => true],
['port' => 7389, 'tls' => false],
- ['port' => 389, 'tls' => false],
+ ['port' => 389, 'tls' => false],
];
return $settings;
}
@@ -1348,7 +1348,7 @@ class Wizard extends LDAPUtility {
&& stripos($hostInfo['scheme'], 'ldaps') !== false)) {
$portSettings[] = ['port' => $port, 'tls' => true];
}
- $portSettings[] =['port' => $port, 'tls' => false];
+ $portSettings[] = ['port' => $port, 'tls' => false];
}
//default ports
diff --git a/apps/user_ldap/tests/AccessTest.php b/apps/user_ldap/tests/AccessTest.php
index 549f6600b4d..d01cd80b3a0 100644
--- a/apps/user_ldap/tests/AccessTest.php
+++ b/apps/user_ldap/tests/AccessTest.php
@@ -84,7 +84,7 @@ class AccessTest extends TestCase {
$this->ldap = $this->createMock(LDAP::class);
$this->userManager = $this->createMock(Manager::class);
$this->helper = $this->createMock(Helper::class);
- $this->config = $this->createMock(IConfig::class);
+ $this->config = $this->createMock(IConfig::class);
$this->userMapper = $this->createMock(UserMapping::class);
$this->ncUserManager = $this->createMock(IUserManager::class);
@@ -100,7 +100,7 @@ class AccessTest extends TestCase {
}
private function getConnectorAndLdapMock() {
- $lw = $this->createMock(ILDAPWrapper::class);
+ $lw = $this->createMock(ILDAPWrapper::class);
$connector = $this->getMockBuilder(Connection::class)
->setConstructorArgs([$lw, null, null])
->getMock();
diff --git a/apps/user_ldap/tests/ConfigurationTest.php b/apps/user_ldap/tests/ConfigurationTest.php
index db119eb3bfe..6239bab68b0 100644
--- a/apps/user_ldap/tests/ConfigurationTest.php
+++ b/apps/user_ldap/tests/ConfigurationTest.php
@@ -74,23 +74,23 @@ class ConfigurationTest extends \Test\TestCase {
return [
'set general base' => ['ldapBase', $inputWithDN, $expectWithDN],
- 'set user base' => ['ldapBaseUsers', $inputWithDN, $expectWithDN],
- 'set group base' => ['ldapBaseGroups', $inputWithDN, $expectWithDN],
+ 'set user base' => ['ldapBaseUsers', $inputWithDN, $expectWithDN],
+ 'set group base' => ['ldapBaseGroups', $inputWithDN, $expectWithDN],
- 'set search attributes users' => ['ldapAttributesForUserSearch', $inputNames, $expectedNames],
+ 'set search attributes users' => ['ldapAttributesForUserSearch', $inputNames, $expectedNames],
'set search attributes groups' => ['ldapAttributesForGroupSearch', $inputNames, $expectedNames],
- 'set user filter objectclasses' => ['ldapUserFilterObjectclass', $inputNames, $expectedNames],
- 'set user filter groups' => ['ldapUserFilterGroups', $inputNames, $expectedNames],
+ 'set user filter objectclasses' => ['ldapUserFilterObjectclass', $inputNames, $expectedNames],
+ 'set user filter groups' => ['ldapUserFilterGroups', $inputNames, $expectedNames],
'set group filter objectclasses' => ['ldapGroupFilterObjectclass', $inputNames, $expectedNames],
- 'set group filter groups' => ['ldapGroupFilterGroups', $inputNames, $expectedNames],
- 'set login filter attributes' => ['ldapLoginFilterAttributes', $inputNames, $expectedNames],
+ 'set group filter groups' => ['ldapGroupFilterGroups', $inputNames, $expectedNames],
+ 'set login filter attributes' => ['ldapLoginFilterAttributes', $inputNames, $expectedNames],
'set agent password' => ['ldapAgentPassword', $password, $password],
'set home folder, variant 1' => ['homeFolderNamingRule', $inputHomeFolder[0], $expectedHomeFolder[0]],
'set home folder, variant 2' => ['homeFolderNamingRule', $inputHomeFolder[1], $expectedHomeFolder[1]],
- 'set home folder, empty' => ['homeFolderNamingRule', $inputHomeFolder[2], $expectedHomeFolder[2]],
+ 'set home folder, empty' => ['homeFolderNamingRule', $inputHomeFolder[2], $expectedHomeFolder[2]],
// default behaviour, one case is enough, special needs must be tested
// individually
diff --git a/apps/user_ldap/tests/ConnectionTest.php b/apps/user_ldap/tests/ConnectionTest.php
index a4fcf030083..1269a5d7e43 100644
--- a/apps/user_ldap/tests/ConnectionTest.php
+++ b/apps/user_ldap/tests/ConnectionTest.php
@@ -50,7 +50,7 @@ class ConnectionTest extends \Test\TestCase {
protected function setUp(): void {
parent::setUp();
- $this->ldap = $this->createMock(ILDAPWrapper::class);
+ $this->ldap = $this->createMock(ILDAPWrapper::class);
// we use a mock here to replace the cache mechanism, due to missing DI in LDAP backend.
$this->connection = $this->getMockBuilder('OCA\User_LDAP\Connection')
->setMethods(['getFromCache', 'writeToCache'])
@@ -66,7 +66,7 @@ class ConnectionTest extends \Test\TestCase {
//background: upon login a bind is done with the user credentials
//which is valid for the whole LDAP resource. It needs to be reset
//to the agent's credentials
- $lw = $this->createMock(ILDAPWrapper::class);
+ $lw = $this->createMock(ILDAPWrapper::class);
$connection = new Connection($lw, '', null);
$agent = [
diff --git a/apps/user_ldap/tests/Integration/AbstractIntegrationTest.php b/apps/user_ldap/tests/Integration/AbstractIntegrationTest.php
index e40f73a7596..b94016e352d 100644
--- a/apps/user_ldap/tests/Integration/AbstractIntegrationTest.php
+++ b/apps/user_ldap/tests/Integration/AbstractIntegrationTest.php
@@ -65,8 +65,8 @@ abstract class AbstractIntegrationTest {
$this->server = [
'host' => $host,
'port' => $port,
- 'dn' => $bind,
- 'pwd' => $pwd
+ 'dn' => $bind,
+ 'pwd' => $pwd
];
}
diff --git a/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserAvatar.php b/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserAvatar.php
index 8c0bf6cde86..70ba46dba0c 100644
--- a/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserAvatar.php
+++ b/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserAvatar.php
@@ -54,7 +54,7 @@ class IntegrationTestUserAvatar extends AbstractIntegrationTest {
$this->mapping = new UserMapping(\OC::$server->getDatabaseConnection());
$this->mapping->clear();
$this->access->setUserMapper($this->mapping);
- $userBackend = new User_LDAP($this->access, \OC::$server->getConfig(), \OC::$server->getNotificationManager(), \OC::$server->getUserSession(), \OC::$server->query(UserPluginManager::class));
+ $userBackend = new User_LDAP($this->access, \OC::$server->getConfig(), \OC::$server->getNotificationManager(), \OC::$server->getUserSession(), \OC::$server->query(UserPluginManager::class));
\OC_User::useBackend($userBackend);
}
diff --git a/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserCleanUp.php b/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserCleanUp.php
index c48f51368bc..cefebe9f94e 100644
--- a/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserCleanUp.php
+++ b/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserCleanUp.php
@@ -47,7 +47,7 @@ class IntegrationTestUserCleanUp extends AbstractIntegrationTest {
$this->mapping->clear();
$this->access->setUserMapper($this->mapping);
- $userBackend = new User_LDAP($this->access, \OC::$server->getConfig(), \OC::$server->getNotificationManager(), \OC::$server->getUserSession(), \OC::$server->query(UserPluginManager::class));
+ $userBackend = new User_LDAP($this->access, \OC::$server->getConfig(), \OC::$server->getNotificationManager(), \OC::$server->getUserSession(), \OC::$server->query(UserPluginManager::class));
\OC_User::useBackend($userBackend);
}
diff --git a/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserDisplayName.php b/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserDisplayName.php
index a5712b164d1..a6acdfb3ec6 100644
--- a/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserDisplayName.php
+++ b/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserDisplayName.php
@@ -45,7 +45,7 @@ class IntegrationTestUserDisplayName extends AbstractIntegrationTest {
$this->mapping = new UserMapping(\OC::$server->getDatabaseConnection());
$this->mapping->clear();
$this->access->setUserMapper($this->mapping);
- $userBackend = new User_LDAP($this->access, \OC::$server->getConfig(), \OC::$server->getNotificationManager(), \OC::$server->getUserSession(), \OC::$server->query(UserPluginManager::class));
+ $userBackend = new User_LDAP($this->access, \OC::$server->getConfig(), \OC::$server->getNotificationManager(), \OC::$server->getUserSession(), \OC::$server->query(UserPluginManager::class));
\OC_User::useBackend($userBackend);
}
diff --git a/apps/user_ldap/tests/Jobs/CleanUpTest.php b/apps/user_ldap/tests/Jobs/CleanUpTest.php
index 73d246ac4e2..1e88694f7bf 100644
--- a/apps/user_ldap/tests/Jobs/CleanUpTest.php
+++ b/apps/user_ldap/tests/Jobs/CleanUpTest.php
@@ -41,9 +41,9 @@ class CleanUpTest extends \Test\TestCase {
$this->getMockBuilder('\OCA\User_LDAP\User\DeletedUsersIndex')
->disableOriginalConstructor()
->getMock();
- $mocks['ocConfig'] = $this->createMock(IConfig::class);
- $mocks['db'] = $this->createMock(IDBConnection::class);
- $mocks['helper'] = $this->createMock(Helper::class);
+ $mocks['ocConfig'] = $this->createMock(IConfig::class);
+ $mocks['db'] = $this->createMock(IDBConnection::class);
+ $mocks['helper'] = $this->createMock(Helper::class);
return $mocks;
}
diff --git a/apps/user_ldap/tests/Jobs/SyncTest.php b/apps/user_ldap/tests/Jobs/SyncTest.php
index 71868dcc617..a6a70493739 100644
--- a/apps/user_ldap/tests/Jobs/SyncTest.php
+++ b/apps/user_ldap/tests/Jobs/SyncTest.php
@@ -258,7 +258,7 @@ class SyncTest extends TestCase {
$this->config->expects($this->exactly(2))
->method('getAppValue')
- ->willReturnOnConsecutiveCalls(time() - 60*40, time() - 60*20);
+ ->willReturnOnConsecutiveCalls(time() - 60 * 40, time() - 60 * 20);
$this->sync->setArgument($this->arguments);
$this->assertTrue($this->sync->qualifiesToRun($cycleData));
@@ -317,7 +317,7 @@ class SyncTest extends TestCase {
}
// for qualifiesToRun()
if ($key === $runData['scheduledCycle']['prefix'] . '_lastChange') {
- return time() - 60*40;
+ return time() - 60 * 40;
}
// for getMinPagingSize
if ($key === $runData['scheduledCycle']['prefix'] . 'ldap_paging_size') {
diff --git a/apps/user_ldap/tests/LDAPProviderTest.php b/apps/user_ldap/tests/LDAPProviderTest.php
index a8910c4a272..3e9d0515892 100644
--- a/apps/user_ldap/tests/LDAPProviderTest.php
+++ b/apps/user_ldap/tests/LDAPProviderTest.php
@@ -600,7 +600,7 @@ class LDAPProviderTest extends \Test\TestCase {
->willReturn(true);
$userBackend->expects($this->at(3))
->method('getConfiguration')
- ->willReturn(['ldap_display_name'=>'displayName']);
+ ->willReturn(['ldap_display_name' => 'displayName']);
$userBackend->expects($this->any())
->method($this->anything())
->willReturnSelf();
@@ -638,7 +638,7 @@ class LDAPProviderTest extends \Test\TestCase {
->willReturn(true);
$userBackend->expects($this->at(3))
->method('getConfiguration')
- ->willReturn(['ldap_email_attr'=>'mail']);
+ ->willReturn(['ldap_email_attr' => 'mail']);
$userBackend->expects($this->any())
->method($this->anything())
->willReturnSelf();
@@ -686,7 +686,7 @@ class LDAPProviderTest extends \Test\TestCase {
->willReturn(true);
$groupBackend->expects($this->any())
->method('getConfiguration')
- ->willReturn(['ldap_group_member_assoc_attribute'=>'assoc_type']);
+ ->willReturn(['ldap_group_member_assoc_attribute' => 'assoc_type']);
$groupBackend->expects($this->any())
->method($this->anything())
->willReturnSelf();
diff --git a/apps/user_ldap/tests/User/UserTest.php b/apps/user_ldap/tests/User/UserTest.php
index 25a896aee04..3186a74ea89 100644
--- a/apps/user_ldap/tests/User/UserTest.php
+++ b/apps/user_ldap/tests/User/UserTest.php
@@ -72,7 +72,7 @@ class UserTest extends \Test\TestCase {
/** @var string */
protected $uid = 'alice';
/** @var string */
- protected $dn = 'uid=alice,dc=foo,dc=bar';
+ protected $dn = 'uid=alice,dc=foo,dc=bar';
/** @var User */
protected $user;
diff --git a/apps/user_ldap/tests/User_LDAPTest.php b/apps/user_ldap/tests/User_LDAPTest.php
index 1c10e9955b3..ca9ff841ec0 100644
--- a/apps/user_ldap/tests/User_LDAPTest.php
+++ b/apps/user_ldap/tests/User_LDAPTest.php
@@ -1039,8 +1039,8 @@ class User_LDAPTest extends TestCase {
public function testLoginName2UserNameSuccess() {
$loginName = 'Alice';
- $username = 'alice';
- $dn = 'uid=alice,dc=what,dc=ever';
+ $username = 'alice';
+ $dn = 'uid=alice,dc=what,dc=ever';
$this->access->expects($this->once())
->method('fetchUsersByLoginName')
@@ -1118,7 +1118,7 @@ class User_LDAPTest extends TestCase {
public function testLoginName2UserNameOfflineUser() {
$loginName = 'Alice';
- $dn = 'uid=alice,dc=what,dc=ever';
+ $dn = 'uid=alice,dc=what,dc=ever';
$offlineUser = $this->getMockBuilder(OfflineUser::class)
->disableOriginalConstructor()
@@ -1311,7 +1311,7 @@ class User_LDAPTest extends TestCase {
/** @dataProvider avatarDataProvider */
public function testCanChangeAvatar($imageData, $expected) {
- $isValidImage = strpos((string)$imageData, 'valid') === 0;
+ $isValidImage = strpos((string)$imageData, 'valid') === 0;
$user = $this->createMock(User::class);
$user->expects($this->once())
diff --git a/apps/user_ldap/tests/WizardTest.php b/apps/user_ldap/tests/WizardTest.php
index da3239cb8f8..378d549bc27 100644
--- a/apps/user_ldap/tests/WizardTest.php
+++ b/apps/user_ldap/tests/WizardTest.php
@@ -65,10 +65,10 @@ class WizardTest extends TestCase {
if (is_null($confMethods)) {
$confMethods = get_class_methods('\OCA\User_LDAP\Configuration');
$connMethods = get_class_methods('\OCA\User_LDAP\Connection');
- $accMethods = get_class_methods('\OCA\User_LDAP\Access');
+ $accMethods = get_class_methods('\OCA\User_LDAP\Access');
}
/** @var ILDAPWrapper|\PHPUnit\Framework\MockObject\MockObject $lw */
- $lw = $this->createMock(ILDAPWrapper::class);
+ $lw = $this->createMock(ILDAPWrapper::class);
/** @var Configuration|\PHPUnit\Framework\MockObject\MockObject $conf */
$conf = $this->getMockBuilder(Configuration::class)
diff --git a/apps/user_status/lib/Controller/StatusesController.php b/apps/user_status/lib/Controller/StatusesController.php
index 4295fb76949..71ee75e5b74 100644
--- a/apps/user_status/lib/Controller/StatusesController.php
+++ b/apps/user_status/lib/Controller/StatusesController.php
@@ -60,7 +60,7 @@ class StatusesController extends OCSController {
* @param int|null $offset
* @return DataResponse
*/
- public function findAll(?int $limit=null, ?int $offset=null): DataResponse {
+ public function findAll(?int $limit = null, ?int $offset = null): DataResponse {
$allStatuses = $this->service->findAll($limit, $offset);
return new DataResponse(array_map(function ($userStatus) {
diff --git a/apps/user_status/tests/Unit/Dashboard/UserStatusWidgetTest.php b/apps/user_status/tests/Unit/Dashboard/UserStatusWidgetTest.php
index 44a3c55d7a1..b6f3b410186 100644
--- a/apps/user_status/tests/Unit/Dashboard/UserStatusWidgetTest.php
+++ b/apps/user_status/tests/Unit/Dashboard/UserStatusWidgetTest.php
@@ -62,7 +62,7 @@ class UserStatusWidgetTest extends TestCase {
$this->initialState = $this->createMock(IInitialStateService::class);
$this->userManager = $this->createMock(IUserManager::class);
$this->userSession = $this->createMock(IUserSession::class);
- $this->service = $this->createMock(StatusService::class);
+ $this->service = $this->createMock(StatusService::class);
$this->widget = new UserStatusWidget($this->l10n, $this->initialState, $this->userManager, $this->userSession, $this->service);
}
diff --git a/apps/workflowengine/lib/BackgroundJobs/Rotate.php b/apps/workflowengine/lib/BackgroundJobs/Rotate.php
index aee817e3cc8..b1b747b3725 100644
--- a/apps/workflowengine/lib/BackgroundJobs/Rotate.php
+++ b/apps/workflowengine/lib/BackgroundJobs/Rotate.php
@@ -31,7 +31,7 @@ class Rotate extends TimedJob {
use RotationTrait;
public function __construct() {
- $this->setInterval(60*60*3);
+ $this->setInterval(60 * 60 * 3);
}
protected function run($argument) {
diff --git a/apps/workflowengine/lib/Manager.php b/apps/workflowengine/lib/Manager.php
index fefeb9230e6..e93ad24b3ab 100644
--- a/apps/workflowengine/lib/Manager.php
+++ b/apps/workflowengine/lib/Manager.php
@@ -158,7 +158,7 @@ class Manager implements IManager {
$eventNames = \json_decode($row['events']);
$operation = $row['class'];
- $entity = $row['entity'];
+ $entity = $row['entity'];
$operations[$operation] = $operations[$row['class']] ?? [];
$operations[$operation][$entity] = $operations[$operation][$entity] ?? [];