Passed
Push — master ( 348454...c8160a )
by Joas
15:07 queued 14s
created
lib/public/AppFramework/Utility/ITimeFactory.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -31,18 +31,18 @@
 block discarded – undo
31 31
  */
32 32
 interface ITimeFactory {
33 33
 
34
-	/**
35
-	 * @return int the result of a call to time()
36
-	 * @since 8.0.0
37
-	 */
38
-	public function getTime(): int;
34
+    /**
35
+     * @return int the result of a call to time()
36
+     * @since 8.0.0
37
+     */
38
+    public function getTime(): int;
39 39
 
40
-	/**
41
-	 * @param string $time
42
-	 * @param \DateTimeZone $timezone
43
-	 * @return \DateTime
44
-	 * @since 15.0.0
45
-	 */
46
-	public function getDateTime(string $time = 'now', \DateTimeZone $timezone = null): \DateTime;
40
+    /**
41
+     * @param string $time
42
+     * @param \DateTimeZone $timezone
43
+     * @return \DateTime
44
+     * @since 15.0.0
45
+     */
46
+    public function getDateTime(string $time = 'now', \DateTimeZone $timezone = null): \DateTime;
47 47
 
48 48
 }
Please login to merge, or discard this patch.
core/Command/TwoFactorAuth/Enforce.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,10 +98,10 @@
 block discarded – undo
98 98
 		if (empty($state->getEnforcedGroups())) {
99 99
 			$message = 'Two-factor authentication is enforced for all users';
100 100
 		} else {
101
-			$message = 'Two-factor authentication is enforced for members of the group(s) ' . implode(', ', $state->getEnforcedGroups());
101
+			$message = 'Two-factor authentication is enforced for members of the group(s) '.implode(', ', $state->getEnforcedGroups());
102 102
 		}
103 103
 		if (!empty($state->getExcludedGroups())) {
104
-			$message .= ', except members of ' . implode(', ', $state->getExcludedGroups());
104
+			$message .= ', except members of '.implode(', ', $state->getExcludedGroups());
105 105
 		}
106 106
 		$output->writeln($message);
107 107
 	}
Please login to merge, or discard this patch.
Indentation   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -35,74 +35,74 @@
 block discarded – undo
35 35
 use Symfony\Component\Console\Output\OutputInterface;
36 36
 
37 37
 class Enforce extends Command {
38
-	private MandatoryTwoFactor $mandatoryTwoFactor;
38
+    private MandatoryTwoFactor $mandatoryTwoFactor;
39 39
 
40
-	public function __construct(MandatoryTwoFactor $mandatoryTwoFactor) {
41
-		parent::__construct();
40
+    public function __construct(MandatoryTwoFactor $mandatoryTwoFactor) {
41
+        parent::__construct();
42 42
 
43
-		$this->mandatoryTwoFactor = $mandatoryTwoFactor;
44
-	}
43
+        $this->mandatoryTwoFactor = $mandatoryTwoFactor;
44
+    }
45 45
 
46
-	protected function configure() {
47
-		$this->setName('twofactorauth:enforce');
48
-		$this->setDescription('Enabled/disable enforced two-factor authentication');
49
-		$this->addOption(
50
-			'on',
51
-			null,
52
-			InputOption::VALUE_NONE,
53
-			'enforce two-factor authentication'
54
-		);
55
-		$this->addOption(
56
-			'off',
57
-			null,
58
-			InputOption::VALUE_NONE,
59
-			'don\'t enforce two-factor authenticaton'
60
-		);
61
-		$this->addOption(
62
-			'group',
63
-			null,
64
-			InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
65
-			'enforce only for the given group(s)'
66
-		);
67
-		$this->addOption(
68
-			'exclude',
69
-			null,
70
-			InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
71
-			'exclude mandatory two-factor auth for the given group(s)'
72
-		);
73
-	}
46
+    protected function configure() {
47
+        $this->setName('twofactorauth:enforce');
48
+        $this->setDescription('Enabled/disable enforced two-factor authentication');
49
+        $this->addOption(
50
+            'on',
51
+            null,
52
+            InputOption::VALUE_NONE,
53
+            'enforce two-factor authentication'
54
+        );
55
+        $this->addOption(
56
+            'off',
57
+            null,
58
+            InputOption::VALUE_NONE,
59
+            'don\'t enforce two-factor authenticaton'
60
+        );
61
+        $this->addOption(
62
+            'group',
63
+            null,
64
+            InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
65
+            'enforce only for the given group(s)'
66
+        );
67
+        $this->addOption(
68
+            'exclude',
69
+            null,
70
+            InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
71
+            'exclude mandatory two-factor auth for the given group(s)'
72
+        );
73
+    }
74 74
 
75
-	protected function execute(InputInterface $input, OutputInterface $output): int {
76
-		if ($input->getOption('on')) {
77
-			$enforcedGroups = $input->getOption('group');
78
-			$excludedGroups = $input->getOption('exclude');
79
-			$this->mandatoryTwoFactor->setState(new EnforcementState(true, $enforcedGroups, $excludedGroups));
80
-		} elseif ($input->getOption('off')) {
81
-			$this->mandatoryTwoFactor->setState(new EnforcementState(false));
82
-		}
75
+    protected function execute(InputInterface $input, OutputInterface $output): int {
76
+        if ($input->getOption('on')) {
77
+            $enforcedGroups = $input->getOption('group');
78
+            $excludedGroups = $input->getOption('exclude');
79
+            $this->mandatoryTwoFactor->setState(new EnforcementState(true, $enforcedGroups, $excludedGroups));
80
+        } elseif ($input->getOption('off')) {
81
+            $this->mandatoryTwoFactor->setState(new EnforcementState(false));
82
+        }
83 83
 
84
-		$state = $this->mandatoryTwoFactor->getState();
85
-		if ($state->isEnforced()) {
86
-			$this->writeEnforced($output, $state);
87
-		} else {
88
-			$this->writeNotEnforced($output);
89
-		}
90
-		return 0;
91
-	}
84
+        $state = $this->mandatoryTwoFactor->getState();
85
+        if ($state->isEnforced()) {
86
+            $this->writeEnforced($output, $state);
87
+        } else {
88
+            $this->writeNotEnforced($output);
89
+        }
90
+        return 0;
91
+    }
92 92
 
93
-	protected function writeEnforced(OutputInterface $output, EnforcementState $state) {
94
-		if (empty($state->getEnforcedGroups())) {
95
-			$message = 'Two-factor authentication is enforced for all users';
96
-		} else {
97
-			$message = 'Two-factor authentication is enforced for members of the group(s) ' . implode(', ', $state->getEnforcedGroups());
98
-		}
99
-		if (!empty($state->getExcludedGroups())) {
100
-			$message .= ', except members of ' . implode(', ', $state->getExcludedGroups());
101
-		}
102
-		$output->writeln($message);
103
-	}
93
+    protected function writeEnforced(OutputInterface $output, EnforcementState $state) {
94
+        if (empty($state->getEnforcedGroups())) {
95
+            $message = 'Two-factor authentication is enforced for all users';
96
+        } else {
97
+            $message = 'Two-factor authentication is enforced for members of the group(s) ' . implode(', ', $state->getEnforcedGroups());
98
+        }
99
+        if (!empty($state->getExcludedGroups())) {
100
+            $message .= ', except members of ' . implode(', ', $state->getExcludedGroups());
101
+        }
102
+        $output->writeln($message);
103
+    }
104 104
 
105
-	protected function writeNotEnforced(OutputInterface $output) {
106
-		$output->writeln('Two-factor authentication is not enforced');
107
-	}
105
+    protected function writeNotEnforced(OutputInterface $output) {
106
+        $output->writeln('Two-factor authentication is not enforced');
107
+    }
108 108
 }
Please login to merge, or discard this patch.
lib/private/Dashboard/DashboardManager.php 1 patch
Indentation   +97 added lines, -97 removed lines patch added patch discarded remove patch
@@ -46,103 +46,103 @@
 block discarded – undo
46 46
 class DashboardManager implements IDashboardManager {
47 47
 
48 48
 
49
-	/** @var IWidgetsService */
50
-	private $widgetsService;
51
-
52
-	/** @var IEventsService */
53
-	private $eventsService;
54
-
55
-
56
-	/**
57
-	 * @param IEventsService $eventsService
58
-	 */
59
-	public function registerEventsService(IEventsService $eventsService) {
60
-		$this->eventsService = $eventsService;
61
-	}
62
-
63
-
64
-	/**
65
-	 * @param IWidgetsService $widgetsService
66
-	 */
67
-	public function registerWidgetsService(IWidgetsService $widgetsService) {
68
-		$this->widgetsService = $widgetsService;
69
-	}
70
-
71
-
72
-	/**
73
-	 * @param string $widgetId
74
-	 * @param string $userId
75
-	 *
76
-	 * @return IWidgetConfig
77
-	 * @throws DashboardAppNotAvailableException
78
-	 */
79
-	public function getWidgetConfig(string $widgetId, string $userId): IWidgetConfig {
80
-		return $this->getWidgetsService()->getWidgetConfig($widgetId, $userId);
81
-	}
82
-
83
-
84
-	/**
85
-	 * @param string $widgetId
86
-	 * @param array $users
87
-	 * @param array $payload
88
-	 * @param string $uniqueId
89
-	 *
90
-	 * @throws DashboardAppNotAvailableException
91
-	 */
92
-	public function createUsersEvent(string $widgetId, array $users, array $payload, string $uniqueId = '') {
93
-		$this->getEventsService()->createUsersEvent($widgetId, $users, $payload, $uniqueId);
94
-	}
95
-
96
-
97
-	/**
98
-	 * @param string $widgetId
99
-	 * @param array $groups
100
-	 * @param array $payload
101
-	 * @param string $uniqueId
102
-	 *
103
-	 * @throws DashboardAppNotAvailableException
104
-	 */
105
-	public function createGroupsEvent(string $widgetId, array $groups, array $payload, string $uniqueId = '') {
106
-		$this->getEventsService()->createGroupsEvent($widgetId, $groups, $payload, $uniqueId);
107
-	}
108
-
109
-
110
-	/**
111
-	 * @param string $widgetId
112
-	 * @param array $payload
113
-	 * @param string $uniqueId
114
-	 *
115
-	 * @throws DashboardAppNotAvailableException
116
-	 */
117
-	public function createGlobalEvent(string $widgetId, array $payload, string $uniqueId = '') {
118
-		$this->getEventsService()->createGlobalEvent($widgetId, $payload, $uniqueId);
119
-	}
120
-
121
-
122
-	/**
123
-	 * @return IWidgetsService
124
-	 * @throws DashboardAppNotAvailableException
125
-	 */
126
-	private function getWidgetsService() {
127
-		if ($this->widgetsService === null) {
128
-			throw new DashboardAppNotAvailableException('No IWidgetsService registered');
129
-		}
130
-
131
-		return $this->widgetsService;
132
-	}
133
-
134
-
135
-	/**
136
-	 * @return IEventsService
137
-	 * @throws DashboardAppNotAvailableException
138
-	 */
139
-	private function getEventsService() {
140
-		if ($this->eventsService === null) {
141
-			throw new DashboardAppNotAvailableException('No IEventsService registered');
142
-		}
143
-
144
-		return $this->eventsService;
145
-	}
49
+    /** @var IWidgetsService */
50
+    private $widgetsService;
51
+
52
+    /** @var IEventsService */
53
+    private $eventsService;
54
+
55
+
56
+    /**
57
+     * @param IEventsService $eventsService
58
+     */
59
+    public function registerEventsService(IEventsService $eventsService) {
60
+        $this->eventsService = $eventsService;
61
+    }
62
+
63
+
64
+    /**
65
+     * @param IWidgetsService $widgetsService
66
+     */
67
+    public function registerWidgetsService(IWidgetsService $widgetsService) {
68
+        $this->widgetsService = $widgetsService;
69
+    }
70
+
71
+
72
+    /**
73
+     * @param string $widgetId
74
+     * @param string $userId
75
+     *
76
+     * @return IWidgetConfig
77
+     * @throws DashboardAppNotAvailableException
78
+     */
79
+    public function getWidgetConfig(string $widgetId, string $userId): IWidgetConfig {
80
+        return $this->getWidgetsService()->getWidgetConfig($widgetId, $userId);
81
+    }
82
+
83
+
84
+    /**
85
+     * @param string $widgetId
86
+     * @param array $users
87
+     * @param array $payload
88
+     * @param string $uniqueId
89
+     *
90
+     * @throws DashboardAppNotAvailableException
91
+     */
92
+    public function createUsersEvent(string $widgetId, array $users, array $payload, string $uniqueId = '') {
93
+        $this->getEventsService()->createUsersEvent($widgetId, $users, $payload, $uniqueId);
94
+    }
95
+
96
+
97
+    /**
98
+     * @param string $widgetId
99
+     * @param array $groups
100
+     * @param array $payload
101
+     * @param string $uniqueId
102
+     *
103
+     * @throws DashboardAppNotAvailableException
104
+     */
105
+    public function createGroupsEvent(string $widgetId, array $groups, array $payload, string $uniqueId = '') {
106
+        $this->getEventsService()->createGroupsEvent($widgetId, $groups, $payload, $uniqueId);
107
+    }
108
+
109
+
110
+    /**
111
+     * @param string $widgetId
112
+     * @param array $payload
113
+     * @param string $uniqueId
114
+     *
115
+     * @throws DashboardAppNotAvailableException
116
+     */
117
+    public function createGlobalEvent(string $widgetId, array $payload, string $uniqueId = '') {
118
+        $this->getEventsService()->createGlobalEvent($widgetId, $payload, $uniqueId);
119
+    }
120
+
121
+
122
+    /**
123
+     * @return IWidgetsService
124
+     * @throws DashboardAppNotAvailableException
125
+     */
126
+    private function getWidgetsService() {
127
+        if ($this->widgetsService === null) {
128
+            throw new DashboardAppNotAvailableException('No IWidgetsService registered');
129
+        }
130
+
131
+        return $this->widgetsService;
132
+    }
133
+
134
+
135
+    /**
136
+     * @return IEventsService
137
+     * @throws DashboardAppNotAvailableException
138
+     */
139
+    private function getEventsService() {
140
+        if ($this->eventsService === null) {
141
+            throw new DashboardAppNotAvailableException('No IEventsService registered');
142
+        }
143
+
144
+        return $this->eventsService;
145
+    }
146 146
 
147 147
 }
148 148
 
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/Outbox.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -74,12 +74,12 @@  discard block
 block discarded – undo
74 74
 			],
75 75
 			[
76 76
 				'privilege' => '{DAV:}read',
77
-				'principal' => $this->getOwner() . '/calendar-proxy-read',
77
+				'principal' => $this->getOwner().'/calendar-proxy-read',
78 78
 				'protected' => true,
79 79
 			],
80 80
 			[
81 81
 				'privilege' => '{DAV:}read',
82
-				'principal' => $this->getOwner() . '/calendar-proxy-write',
82
+				'principal' => $this->getOwner().'/calendar-proxy-write',
83 83
 				'protected' => true,
84 84
 			],
85 85
 		];
@@ -94,23 +94,23 @@  discard block
 block discarded – undo
94 94
 		if ($this->disableFreeBusy) {
95 95
 			return array_merge($commonAcl, [
96 96
 				[
97
-					'privilege' => '{' . CalDAVPlugin::NS_CALDAV . '}schedule-send-invite',
97
+					'privilege' => '{'.CalDAVPlugin::NS_CALDAV.'}schedule-send-invite',
98 98
 					'principal' => $this->getOwner(),
99 99
 					'protected' => true,
100 100
 				],
101 101
 				[
102
-					'privilege' => '{' . CalDAVPlugin::NS_CALDAV . '}schedule-send-invite',
103
-					'principal' => $this->getOwner() . '/calendar-proxy-write',
102
+					'privilege' => '{'.CalDAVPlugin::NS_CALDAV.'}schedule-send-invite',
103
+					'principal' => $this->getOwner().'/calendar-proxy-write',
104 104
 					'protected' => true,
105 105
 				],
106 106
 				[
107
-					'privilege' => '{' . CalDAVPlugin::NS_CALDAV . '}schedule-send-reply',
107
+					'privilege' => '{'.CalDAVPlugin::NS_CALDAV.'}schedule-send-reply',
108 108
 					'principal' => $this->getOwner(),
109 109
 					'protected' => true,
110 110
 				],
111 111
 				[
112
-					'privilege' => '{' . CalDAVPlugin::NS_CALDAV . '}schedule-send-reply',
113
-					'principal' => $this->getOwner() . '/calendar-proxy-write',
112
+					'privilege' => '{'.CalDAVPlugin::NS_CALDAV.'}schedule-send-reply',
113
+					'principal' => $this->getOwner().'/calendar-proxy-write',
114 114
 					'protected' => true,
115 115
 				],
116 116
 			]);
@@ -118,13 +118,13 @@  discard block
 block discarded – undo
118 118
 
119 119
 		return array_merge($commonAcl, [
120 120
 			[
121
-				'privilege' => '{' . CalDAVPlugin::NS_CALDAV . '}schedule-send',
121
+				'privilege' => '{'.CalDAVPlugin::NS_CALDAV.'}schedule-send',
122 122
 				'principal' => $this->getOwner(),
123 123
 				'protected' => true,
124 124
 			],
125 125
 			[
126
-				'privilege' => '{' . CalDAVPlugin::NS_CALDAV . '}schedule-send',
127
-				'principal' => $this->getOwner() . '/calendar-proxy-write',
126
+				'privilege' => '{'.CalDAVPlugin::NS_CALDAV.'}schedule-send',
127
+				'principal' => $this->getOwner().'/calendar-proxy-write',
128 128
 				'protected' => true,
129 129
 			],
130 130
 		]);
Please login to merge, or discard this patch.
Indentation   +91 added lines, -91 removed lines patch added patch discarded remove patch
@@ -34,102 +34,102 @@
 block discarded – undo
34 34
  */
35 35
 class Outbox extends \Sabre\CalDAV\Schedule\Outbox {
36 36
 
37
-	/** @var IConfig */
38
-	private $config;
37
+    /** @var IConfig */
38
+    private $config;
39 39
 
40
-	/** @var null|bool */
41
-	private $disableFreeBusy = null;
40
+    /** @var null|bool */
41
+    private $disableFreeBusy = null;
42 42
 
43
-	/**
44
-	 * Outbox constructor.
45
-	 *
46
-	 * @param IConfig $config
47
-	 * @param string $principalUri
48
-	 */
49
-	public function __construct(IConfig $config, string $principalUri) {
50
-		parent::__construct($principalUri);
51
-		$this->config = $config;
52
-	}
43
+    /**
44
+     * Outbox constructor.
45
+     *
46
+     * @param IConfig $config
47
+     * @param string $principalUri
48
+     */
49
+    public function __construct(IConfig $config, string $principalUri) {
50
+        parent::__construct($principalUri);
51
+        $this->config = $config;
52
+    }
53 53
 
54
-	/**
55
-	 * Returns a list of ACE's for this node.
56
-	 *
57
-	 * Each ACE has the following properties:
58
-	 *   * 'privilege', a string such as {DAV:}read or {DAV:}write. These are
59
-	 *     currently the only supported privileges
60
-	 *   * 'principal', a url to the principal who owns the node
61
-	 *   * 'protected' (optional), indicating that this ACE is not allowed to
62
-	 *      be updated.
63
-	 *
64
-	 * @return array
65
-	 */
66
-	public function getACL() {
67
-		// getACL is called so frequently that we cache the config result
68
-		if ($this->disableFreeBusy === null) {
69
-			$this->disableFreeBusy = ($this->config->getAppValue('dav', 'disableFreeBusy', 'no') === 'yes');
70
-		}
54
+    /**
55
+     * Returns a list of ACE's for this node.
56
+     *
57
+     * Each ACE has the following properties:
58
+     *   * 'privilege', a string such as {DAV:}read or {DAV:}write. These are
59
+     *     currently the only supported privileges
60
+     *   * 'principal', a url to the principal who owns the node
61
+     *   * 'protected' (optional), indicating that this ACE is not allowed to
62
+     *      be updated.
63
+     *
64
+     * @return array
65
+     */
66
+    public function getACL() {
67
+        // getACL is called so frequently that we cache the config result
68
+        if ($this->disableFreeBusy === null) {
69
+            $this->disableFreeBusy = ($this->config->getAppValue('dav', 'disableFreeBusy', 'no') === 'yes');
70
+        }
71 71
 
72
-		$commonAcl = [
73
-			[
74
-				'privilege' => '{DAV:}read',
75
-				'principal' => $this->getOwner(),
76
-				'protected' => true,
77
-			],
78
-			[
79
-				'privilege' => '{DAV:}read',
80
-				'principal' => $this->getOwner() . '/calendar-proxy-read',
81
-				'protected' => true,
82
-			],
83
-			[
84
-				'privilege' => '{DAV:}read',
85
-				'principal' => $this->getOwner() . '/calendar-proxy-write',
86
-				'protected' => true,
87
-			],
88
-		];
72
+        $commonAcl = [
73
+            [
74
+                'privilege' => '{DAV:}read',
75
+                'principal' => $this->getOwner(),
76
+                'protected' => true,
77
+            ],
78
+            [
79
+                'privilege' => '{DAV:}read',
80
+                'principal' => $this->getOwner() . '/calendar-proxy-read',
81
+                'protected' => true,
82
+            ],
83
+            [
84
+                'privilege' => '{DAV:}read',
85
+                'principal' => $this->getOwner() . '/calendar-proxy-write',
86
+                'protected' => true,
87
+            ],
88
+        ];
89 89
 
90
-		// schedule-send is an aggregate privilege for:
91
-		// - schedule-send-invite
92
-		// - schedule-send-reply
93
-		// - schedule-send-freebusy
94
-		//
95
-		// If FreeBusy is disabled, we have to remove the latter privilege
90
+        // schedule-send is an aggregate privilege for:
91
+        // - schedule-send-invite
92
+        // - schedule-send-reply
93
+        // - schedule-send-freebusy
94
+        //
95
+        // If FreeBusy is disabled, we have to remove the latter privilege
96 96
 
97
-		if ($this->disableFreeBusy) {
98
-			return array_merge($commonAcl, [
99
-				[
100
-					'privilege' => '{' . CalDAVPlugin::NS_CALDAV . '}schedule-send-invite',
101
-					'principal' => $this->getOwner(),
102
-					'protected' => true,
103
-				],
104
-				[
105
-					'privilege' => '{' . CalDAVPlugin::NS_CALDAV . '}schedule-send-invite',
106
-					'principal' => $this->getOwner() . '/calendar-proxy-write',
107
-					'protected' => true,
108
-				],
109
-				[
110
-					'privilege' => '{' . CalDAVPlugin::NS_CALDAV . '}schedule-send-reply',
111
-					'principal' => $this->getOwner(),
112
-					'protected' => true,
113
-				],
114
-				[
115
-					'privilege' => '{' . CalDAVPlugin::NS_CALDAV . '}schedule-send-reply',
116
-					'principal' => $this->getOwner() . '/calendar-proxy-write',
117
-					'protected' => true,
118
-				],
119
-			]);
120
-		}
97
+        if ($this->disableFreeBusy) {
98
+            return array_merge($commonAcl, [
99
+                [
100
+                    'privilege' => '{' . CalDAVPlugin::NS_CALDAV . '}schedule-send-invite',
101
+                    'principal' => $this->getOwner(),
102
+                    'protected' => true,
103
+                ],
104
+                [
105
+                    'privilege' => '{' . CalDAVPlugin::NS_CALDAV . '}schedule-send-invite',
106
+                    'principal' => $this->getOwner() . '/calendar-proxy-write',
107
+                    'protected' => true,
108
+                ],
109
+                [
110
+                    'privilege' => '{' . CalDAVPlugin::NS_CALDAV . '}schedule-send-reply',
111
+                    'principal' => $this->getOwner(),
112
+                    'protected' => true,
113
+                ],
114
+                [
115
+                    'privilege' => '{' . CalDAVPlugin::NS_CALDAV . '}schedule-send-reply',
116
+                    'principal' => $this->getOwner() . '/calendar-proxy-write',
117
+                    'protected' => true,
118
+                ],
119
+            ]);
120
+        }
121 121
 
122
-		return array_merge($commonAcl, [
123
-			[
124
-				'privilege' => '{' . CalDAVPlugin::NS_CALDAV . '}schedule-send',
125
-				'principal' => $this->getOwner(),
126
-				'protected' => true,
127
-			],
128
-			[
129
-				'privilege' => '{' . CalDAVPlugin::NS_CALDAV . '}schedule-send',
130
-				'principal' => $this->getOwner() . '/calendar-proxy-write',
131
-				'protected' => true,
132
-			],
133
-		]);
134
-	}
122
+        return array_merge($commonAcl, [
123
+            [
124
+                'privilege' => '{' . CalDAVPlugin::NS_CALDAV . '}schedule-send',
125
+                'principal' => $this->getOwner(),
126
+                'protected' => true,
127
+            ],
128
+            [
129
+                'privilege' => '{' . CalDAVPlugin::NS_CALDAV . '}schedule-send',
130
+                'principal' => $this->getOwner() . '/calendar-proxy-write',
131
+                'protected' => true,
132
+            ],
133
+        ]);
134
+    }
135 135
 }
Please login to merge, or discard this patch.
apps/files_trashbin/lib/Trash/ITrashManager.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -24,33 +24,33 @@
 block discarded – undo
24 24
 use OCP\IUser;
25 25
 
26 26
 interface ITrashManager extends ITrashBackend {
27
-	/**
28
-	 * Add a backend for the trashbin
29
-	 *
30
-	 * @param string $storageType
31
-	 * @param ITrashBackend $backend
32
-	 * @since 15.0.0
33
-	 */
34
-	public function registerBackend(string $storageType, ITrashBackend $backend);
27
+    /**
28
+     * Add a backend for the trashbin
29
+     *
30
+     * @param string $storageType
31
+     * @param ITrashBackend $backend
32
+     * @since 15.0.0
33
+     */
34
+    public function registerBackend(string $storageType, ITrashBackend $backend);
35 35
 
36
-	/**
37
-	 * List all trash items in the root of the trashbin
38
-	 *
39
-	 * @param IUser $user
40
-	 * @return ITrashItem[]
41
-	 * @since 15.0.0
42
-	 */
43
-	public function listTrashRoot(IUser $user): array;
36
+    /**
37
+     * List all trash items in the root of the trashbin
38
+     *
39
+     * @param IUser $user
40
+     * @return ITrashItem[]
41
+     * @since 15.0.0
42
+     */
43
+    public function listTrashRoot(IUser $user): array;
44 44
 
45
-	/**
46
-	 * Temporally prevent files from being moved to the trash
47
-	 *
48
-	 * @since 15.0.0
49
-	 */
50
-	public function pauseTrash();
45
+    /**
46
+     * Temporally prevent files from being moved to the trash
47
+     *
48
+     * @since 15.0.0
49
+     */
50
+    public function pauseTrash();
51 51
 
52
-	/**
53
-	 * @since 15.0.0
54
-	 */
55
-	public function resumeTrash();
52
+    /**
53
+     * @since 15.0.0
54
+     */
55
+    public function resumeTrash();
56 56
 }
Please login to merge, or discard this patch.
apps/files_trashbin/lib/Trash/ITrashBackend.php 1 patch
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -31,54 +31,54 @@
 block discarded – undo
31 31
  * @since 15.0.0
32 32
  */
33 33
 interface ITrashBackend {
34
-	/**
35
-	 * List all trash items in the root of the trashbin
36
-	 *
37
-	 * @param IUser $user
38
-	 * @return ITrashItem[]
39
-	 * @since 15.0.0
40
-	 */
41
-	public function listTrashRoot(IUser $user): array;
34
+    /**
35
+     * List all trash items in the root of the trashbin
36
+     *
37
+     * @param IUser $user
38
+     * @return ITrashItem[]
39
+     * @since 15.0.0
40
+     */
41
+    public function listTrashRoot(IUser $user): array;
42 42
 
43
-	/**
44
-	 * List all trash items in a subfolder in the trashbin
45
-	 *
46
-	 * @param ITrashItem $folder
47
-	 * @return ITrashItem[]
48
-	 * @since 15.0.0
49
-	 */
50
-	public function listTrashFolder(ITrashItem $folder): array;
43
+    /**
44
+     * List all trash items in a subfolder in the trashbin
45
+     *
46
+     * @param ITrashItem $folder
47
+     * @return ITrashItem[]
48
+     * @since 15.0.0
49
+     */
50
+    public function listTrashFolder(ITrashItem $folder): array;
51 51
 
52
-	/**
53
-	 * Restore a trashbin item
54
-	 *
55
-	 * @param ITrashItem $item
56
-	 * @since 15.0.0
57
-	 */
58
-	public function restoreItem(ITrashItem $item);
52
+    /**
53
+     * Restore a trashbin item
54
+     *
55
+     * @param ITrashItem $item
56
+     * @since 15.0.0
57
+     */
58
+    public function restoreItem(ITrashItem $item);
59 59
 
60
-	/**
61
-	 * Permanently remove an item from trash
62
-	 *
63
-	 * @param ITrashItem $item
64
-	 * @since 15.0.0
65
-	 */
66
-	public function removeItem(ITrashItem $item);
60
+    /**
61
+     * Permanently remove an item from trash
62
+     *
63
+     * @param ITrashItem $item
64
+     * @since 15.0.0
65
+     */
66
+    public function removeItem(ITrashItem $item);
67 67
 
68
-	/**
69
-	 * Move a file or folder to trash
70
-	 *
71
-	 * @param IStorage $storage
72
-	 * @param string $internalPath
73
-	 * @return boolean whether or not the file was moved to trash, if false then the file should be deleted normally
74
-	 * @since 15.0.0
75
-	 */
76
-	public function moveToTrash(IStorage $storage, string $internalPath): bool;
68
+    /**
69
+     * Move a file or folder to trash
70
+     *
71
+     * @param IStorage $storage
72
+     * @param string $internalPath
73
+     * @return boolean whether or not the file was moved to trash, if false then the file should be deleted normally
74
+     * @since 15.0.0
75
+     */
76
+    public function moveToTrash(IStorage $storage, string $internalPath): bool;
77 77
 
78
-	/**
79
-	 * @param IUser $user
80
-	 * @param int $fileId
81
-	 * @return Node|null
82
-	 */
83
-	public function getTrashNodeById(IUser $user, int $fileId);
78
+    /**
79
+     * @param IUser $user
80
+     * @param int $fileId
81
+     * @return Node|null
82
+     */
83
+    public function getTrashNodeById(IUser $user, int $fileId);
84 84
 }
Please login to merge, or discard this patch.
apps/files_trashbin/lib/Sabre/TrashFolder.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,6 +26,6 @@
 block discarded – undo
26 26
 
27 27
 class TrashFolder extends AbstractTrashFolder {
28 28
 	public function getName(): string {
29
-		return $this->data->getName() . '.d' . $this->getLastModified();
29
+		return $this->data->getName().'.d'.$this->getLastModified();
30 30
 	}
31 31
 }
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 namespace OCA\Files_Trashbin\Sabre;
29 29
 
30 30
 class TrashFolder extends AbstractTrashFolder {
31
-	public function getName(): string {
32
-		return $this->data->getName() . '.d' . $this->getLastModified();
33
-	}
31
+    public function getName(): string {
32
+        return $this->data->getName() . '.d' . $this->getLastModified();
33
+    }
34 34
 }
Please login to merge, or discard this patch.
apps/files_trashbin/lib/Sabre/TrashRoot.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
 	public function getChildren(): array {
68 68
 		$entries = $this->trashManager->listTrashRoot($this->user);
69 69
 
70
-		$children = array_map(function (ITrashItem $entry) {
70
+		$children = array_map(function(ITrashItem $entry) {
71 71
 			if ($entry->getType() === FileInfo::TYPE_FOLDER) {
72 72
 				return new TrashFolder($this->trashManager, $entry);
73 73
 			}
Please login to merge, or discard this patch.
Indentation   +71 added lines, -71 removed lines patch added patch discarded remove patch
@@ -37,75 +37,75 @@
 block discarded – undo
37 37
 
38 38
 class TrashRoot implements ICollection {
39 39
 
40
-	/** @var IUser */
41
-	private $user;
42
-
43
-	/** @var ITrashManager  */
44
-	private $trashManager;
45
-
46
-	public function __construct(IUser $user, ITrashManager $trashManager) {
47
-		$this->user = $user;
48
-		$this->trashManager = $trashManager;
49
-	}
50
-
51
-	public function delete() {
52
-		\OCA\Files_Trashbin\Trashbin::deleteAll();
53
-		foreach ($this->trashManager->listTrashRoot($this->user) as $trashItem) {
54
-			$this->trashManager->removeItem($trashItem);
55
-		}
56
-	}
57
-
58
-	public function getName(): string {
59
-		return 'trash';
60
-	}
61
-
62
-	public function setName($name) {
63
-		throw new Forbidden('Permission denied to rename this trashbin');
64
-	}
65
-
66
-	public function createFile($name, $data = null) {
67
-		throw new Forbidden('Not allowed to create files in the trashbin');
68
-	}
69
-
70
-	public function createDirectory($name) {
71
-		throw new Forbidden('Not allowed to create folders in the trashbin');
72
-	}
73
-
74
-	public function getChildren(): array {
75
-		$entries = $this->trashManager->listTrashRoot($this->user);
76
-
77
-		$children = array_map(function (ITrashItem $entry) {
78
-			if ($entry->getType() === FileInfo::TYPE_FOLDER) {
79
-				return new TrashFolder($this->trashManager, $entry);
80
-			}
81
-			return new TrashFile($this->trashManager, $entry);
82
-		}, $entries);
83
-
84
-		return $children;
85
-	}
86
-
87
-	public function getChild($name): ITrash {
88
-		$entries = $this->getChildren();
89
-
90
-		foreach ($entries as $entry) {
91
-			if ($entry->getName() === $name) {
92
-				return $entry;
93
-			}
94
-		}
95
-
96
-		throw new NotFound();
97
-	}
98
-
99
-	public function childExists($name): bool {
100
-		try {
101
-			$this->getChild($name);
102
-			return true;
103
-		} catch (NotFound $e) {
104
-			return false;
105
-		}
106
-	}
107
-
108
-	public function getLastModified(): int {
109
-		return 0;
110
-	}
40
+    /** @var IUser */
41
+    private $user;
42
+
43
+    /** @var ITrashManager  */
44
+    private $trashManager;
45
+
46
+    public function __construct(IUser $user, ITrashManager $trashManager) {
47
+        $this->user = $user;
48
+        $this->trashManager = $trashManager;
49
+    }
50
+
51
+    public function delete() {
52
+        \OCA\Files_Trashbin\Trashbin::deleteAll();
53
+        foreach ($this->trashManager->listTrashRoot($this->user) as $trashItem) {
54
+            $this->trashManager->removeItem($trashItem);
55
+        }
56
+    }
57
+
58
+    public function getName(): string {
59
+        return 'trash';
60
+    }
61
+
62
+    public function setName($name) {
63
+        throw new Forbidden('Permission denied to rename this trashbin');
64
+    }
65
+
66
+    public function createFile($name, $data = null) {
67
+        throw new Forbidden('Not allowed to create files in the trashbin');
68
+    }
69
+
70
+    public function createDirectory($name) {
71
+        throw new Forbidden('Not allowed to create folders in the trashbin');
72
+    }
73
+
74
+    public function getChildren(): array {
75
+        $entries = $this->trashManager->listTrashRoot($this->user);
76
+
77
+        $children = array_map(function (ITrashItem $entry) {
78
+            if ($entry->getType() === FileInfo::TYPE_FOLDER) {
79
+                return new TrashFolder($this->trashManager, $entry);
80
+            }
81
+            return new TrashFile($this->trashManager, $entry);
82
+        }, $entries);
83
+
84
+        return $children;
85
+    }
86
+
87
+    public function getChild($name): ITrash {
88
+        $entries = $this->getChildren();
89
+
90
+        foreach ($entries as $entry) {
91
+            if ($entry->getName() === $name) {
92
+                return $entry;
93
+            }
94
+        }
95
+
96
+        throw new NotFound();
97
+    }
98
+
99
+    public function childExists($name): bool {
100
+        try {
101
+            $this->getChild($name);
102
+            return true;
103
+        } catch (NotFound $e) {
104
+            return false;
105
+        }
106
+    }
107
+
108
+    public function getLastModified(): int {
109
+        return 0;
110
+    }
111 111
 }
Please login to merge, or discard this patch.
apps/files_trashbin/lib/Sabre/AbstractTrashFolder.php 2 patches
Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -29,49 +29,49 @@
 block discarded – undo
29 29
 use Sabre\DAV\ICollection;
30 30
 
31 31
 abstract class AbstractTrashFolder extends AbstractTrash implements ICollection, ITrash {
32
-	public function getChildren(): array {
33
-		$entries = $this->trashManager->listTrashFolder($this->data);
32
+    public function getChildren(): array {
33
+        $entries = $this->trashManager->listTrashFolder($this->data);
34 34
 
35
-		$children = array_map(function (ITrashItem $entry) {
36
-			if ($entry->getType() === FileInfo::TYPE_FOLDER) {
37
-				return new TrashFolderFolder($this->trashManager, $entry);
38
-			}
39
-			return new TrashFolderFile($this->trashManager, $entry);
40
-		}, $entries);
35
+        $children = array_map(function (ITrashItem $entry) {
36
+            if ($entry->getType() === FileInfo::TYPE_FOLDER) {
37
+                return new TrashFolderFolder($this->trashManager, $entry);
38
+            }
39
+            return new TrashFolderFile($this->trashManager, $entry);
40
+        }, $entries);
41 41
 
42
-		return $children;
43
-	}
42
+        return $children;
43
+    }
44 44
 
45
-	public function getChild($name): ITrash {
46
-		$entries = $this->getChildren();
45
+    public function getChild($name): ITrash {
46
+        $entries = $this->getChildren();
47 47
 
48
-		foreach ($entries as $entry) {
49
-			if ($entry->getName() === $name) {
50
-				return $entry;
51
-			}
52
-		}
48
+        foreach ($entries as $entry) {
49
+            if ($entry->getName() === $name) {
50
+                return $entry;
51
+            }
52
+        }
53 53
 
54
-		throw new NotFound();
55
-	}
54
+        throw new NotFound();
55
+    }
56 56
 
57
-	public function childExists($name): bool {
58
-		try {
59
-			$this->getChild($name);
60
-			return true;
61
-		} catch (NotFound $e) {
62
-			return false;
63
-		}
64
-	}
57
+    public function childExists($name): bool {
58
+        try {
59
+            $this->getChild($name);
60
+            return true;
61
+        } catch (NotFound $e) {
62
+            return false;
63
+        }
64
+    }
65 65
 
66
-	public function setName($name) {
67
-		throw new Forbidden();
68
-	}
66
+    public function setName($name) {
67
+        throw new Forbidden();
68
+    }
69 69
 
70
-	public function createFile($name, $data = null) {
71
-		throw new Forbidden();
72
-	}
70
+    public function createFile($name, $data = null) {
71
+        throw new Forbidden();
72
+    }
73 73
 
74
-	public function createDirectory($name) {
75
-		throw new Forbidden();
76
-	}
74
+    public function createDirectory($name) {
75
+        throw new Forbidden();
76
+    }
77 77
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 	public function getChildren(): array {
33 33
 		$entries = $this->trashManager->listTrashFolder($this->data);
34 34
 
35
-		$children = array_map(function (ITrashItem $entry) {
35
+		$children = array_map(function(ITrashItem $entry) {
36 36
 			if ($entry->getType() === FileInfo::TYPE_FOLDER) {
37 37
 				return new TrashFolderFolder($this->trashManager, $entry);
38 38
 			}
Please login to merge, or discard this patch.