@@ -53,11 +53,11 @@ discard block |
||
53 | 53 | /** |
54 | 54 | * listen to write event. |
55 | 55 | */ |
56 | - public static function write_hook( $params ) { |
|
56 | + public static function write_hook($params) { |
|
57 | 57 | |
58 | 58 | if (\OCP\App::isEnabled('files_versions')) { |
59 | 59 | $path = $params[\OC\Files\Filesystem::signal_param_path]; |
60 | - if($path<>'') { |
|
60 | + if ($path <> '') { |
|
61 | 61 | Storage::store($path); |
62 | 62 | } |
63 | 63 | } |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | |
76 | 76 | if (\OCP\App::isEnabled('files_versions')) { |
77 | 77 | $path = $params[\OC\Files\Filesystem::signal_param_path]; |
78 | - if($path<>'') { |
|
78 | + if ($path <> '') { |
|
79 | 79 | Storage::delete($path); |
80 | 80 | } |
81 | 81 | } |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | */ |
88 | 88 | public static function pre_remove_hook($params) { |
89 | 89 | $path = $params[\OC\Files\Filesystem::signal_param_path]; |
90 | - if($path<>'') { |
|
90 | + if ($path <> '') { |
|
91 | 91 | Storage::markDeletedFile($path); |
92 | 92 | } |
93 | 93 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | if (\OCP\App::isEnabled('files_versions')) { |
105 | 105 | $oldpath = $params['oldpath']; |
106 | 106 | $newpath = $params['newpath']; |
107 | - if($oldpath<>'' && $newpath<>'') { |
|
107 | + if ($oldpath <> '' && $newpath <> '') { |
|
108 | 108 | Storage::renameOrCopy($oldpath, $newpath, 'rename'); |
109 | 109 | } |
110 | 110 | } |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | if (\OCP\App::isEnabled('files_versions')) { |
123 | 123 | $oldpath = $params['oldpath']; |
124 | 124 | $newpath = $params['newpath']; |
125 | - if($oldpath<>'' && $newpath<>'') { |
|
125 | + if ($oldpath <> '' && $newpath <> '') { |
|
126 | 126 | Storage::renameOrCopy($oldpath, $newpath, 'copy'); |
127 | 127 | } |
128 | 128 | } |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | |
142 | 142 | // if we rename a movable mount point, then the versions don't have |
143 | 143 | // to be renamed |
144 | - $absOldPath = \OC\Files\Filesystem::normalizePath('/' . \OCP\User::getUser() . '/files' . $params['oldpath']); |
|
144 | + $absOldPath = \OC\Files\Filesystem::normalizePath('/'.\OCP\User::getUser().'/files'.$params['oldpath']); |
|
145 | 145 | $manager = \OC\Files\Filesystem::getMountManager(); |
146 | 146 | $mount = $manager->find($absOldPath); |
147 | 147 | $internalPath = $mount->getInternalPath($absOldPath); |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | return; |
150 | 150 | } |
151 | 151 | |
152 | - $view = new \OC\Files\View(\OCP\User::getUser() . '/files'); |
|
152 | + $view = new \OC\Files\View(\OCP\User::getUser().'/files'); |
|
153 | 153 | if ($view->file_exists($params['newpath'])) { |
154 | 154 | Storage::store($params['newpath']); |
155 | 155 | } else { |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | /** @var bool */ |
46 | 46 | private $canPurgeToSaveSpace; |
47 | 47 | |
48 | - public function __construct(IConfig $config,ITimeFactory $timeFactory){ |
|
48 | + public function __construct(IConfig $config, ITimeFactory $timeFactory) { |
|
49 | 49 | $this->timeFactory = $timeFactory; |
50 | 50 | $this->retentionObligation = $config->getSystemValue('versions_retention_obligation', 'auto'); |
51 | 51 | |
@@ -58,14 +58,14 @@ discard block |
||
58 | 58 | * Is versions expiration enabled |
59 | 59 | * @return bool |
60 | 60 | */ |
61 | - public function isEnabled(){ |
|
61 | + public function isEnabled() { |
|
62 | 62 | return $this->retentionObligation !== 'disabled'; |
63 | 63 | } |
64 | 64 | |
65 | 65 | /** |
66 | 66 | * Is default expiration active |
67 | 67 | */ |
68 | - public function shouldAutoExpire(){ |
|
68 | + public function shouldAutoExpire() { |
|
69 | 69 | return $this->minAge === self::NO_OBLIGATION |
70 | 70 | || $this->maxAge === self::NO_OBLIGATION; |
71 | 71 | } |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | * @param bool $quotaExceeded |
77 | 77 | * @return bool |
78 | 78 | */ |
79 | - public function isExpired($timestamp, $quotaExceeded = false){ |
|
79 | + public function isExpired($timestamp, $quotaExceeded = false) { |
|
80 | 80 | // No expiration if disabled |
81 | 81 | if (!$this->isEnabled()) { |
82 | 82 | return false; |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | $time = $this->timeFactory->getTime(); |
91 | 91 | // Never expire dates in future e.g. misconfiguration or negative time |
92 | 92 | // adjustment |
93 | - if ($time<$timestamp) { |
|
93 | + if ($time < $timestamp) { |
|
94 | 94 | return false; |
95 | 95 | } |
96 | 96 | |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | * Get maximal retention obligation as a timestamp |
118 | 118 | * @return int |
119 | 119 | */ |
120 | - public function getMaxAgeAsTimestamp(){ |
|
120 | + public function getMaxAgeAsTimestamp() { |
|
121 | 121 | $maxAge = false; |
122 | 122 | if ($this->isEnabled() && $this->maxAge !== self::NO_OBLIGATION) { |
123 | 123 | $time = $this->timeFactory->getTime(); |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | * Read versions_retention_obligation, validate it |
131 | 131 | * and set private members accordingly |
132 | 132 | */ |
133 | - private function parseRetentionObligation(){ |
|
133 | + private function parseRetentionObligation() { |
|
134 | 134 | $splitValues = explode(',', $this->retentionObligation); |
135 | 135 | if (!isset($splitValues[0])) { |
136 | 136 | $minValue = 'auto'; |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | if (!ctype_digit($minValue) && $minValue !== 'auto') { |
150 | 150 | $isValid = false; |
151 | 151 | \OC::$server->getLogger()->warning( |
152 | - $minValue . ' is not a valid value for minimal versions retention obligation. Check versions_retention_obligation in your config.php. Falling back to auto.', |
|
152 | + $minValue.' is not a valid value for minimal versions retention obligation. Check versions_retention_obligation in your config.php. Falling back to auto.', |
|
153 | 153 | ['app'=>'files_versions'] |
154 | 154 | ); |
155 | 155 | } |
@@ -157,12 +157,12 @@ discard block |
||
157 | 157 | if (!ctype_digit($maxValue) && $maxValue !== 'auto') { |
158 | 158 | $isValid = false; |
159 | 159 | \OC::$server->getLogger()->warning( |
160 | - $maxValue . ' is not a valid value for maximal versions retention obligation. Check versions_retention_obligation in your config.php. Falling back to auto.', |
|
160 | + $maxValue.' is not a valid value for maximal versions retention obligation. Check versions_retention_obligation in your config.php. Falling back to auto.', |
|
161 | 161 | ['app'=>'files_versions'] |
162 | 162 | ); |
163 | 163 | } |
164 | 164 | |
165 | - if (!$isValid){ |
|
165 | + if (!$isValid) { |
|
166 | 166 | $minValue = 'auto'; |
167 | 167 | $maxValue = 'auto'; |
168 | 168 | } |
@@ -29,11 +29,11 @@ |
||
29 | 29 | OCP\JSON::checkLoggedIn(); |
30 | 30 | |
31 | 31 | $file = $_GET['file']; |
32 | -$revision=(int)$_GET['revision']; |
|
32 | +$revision = (int) $_GET['revision']; |
|
33 | 33 | |
34 | 34 | try { |
35 | 35 | list($uid, $filename) = OCA\Files_Versions\Storage::getUidAndFilename($file); |
36 | -} catch(\OCP\Files\NotFoundException $e) { |
|
36 | +} catch (\OCP\Files\NotFoundException $e) { |
|
37 | 37 | header("HTTP/1.1 404 Not Found"); |
38 | 38 | $tmpl = new OCP\Template('', '404', 'guest'); |
39 | 39 | $tmpl->assign('file', ''); |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | * ubos-raspberry-pi.local and ubos-raspberry-pi-2.local |
68 | 68 | */ |
69 | 69 | 'trusted_domains' => |
70 | - array ( |
|
70 | + array( |
|
71 | 71 | 'demo.example.org', |
72 | 72 | 'otherdomain.example.org', |
73 | 73 | ), |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | * |
193 | 193 | * Defaults to ``60*60*24*15`` seconds (15 days) |
194 | 194 | */ |
195 | -'remember_login_cookie_lifetime' => 60*60*24*15, |
|
195 | +'remember_login_cookie_lifetime' => 60 * 60 * 24 * 15, |
|
196 | 196 | |
197 | 197 | /** |
198 | 198 | * The lifetime of a session after inactivity. |
@@ -1118,7 +1118,7 @@ discard block |
||
1118 | 1118 | * |
1119 | 1119 | * Defaults to ``60*60*24`` (1 day) |
1120 | 1120 | */ |
1121 | -'cache_chunk_gc_ttl' => 60*60*24, |
|
1121 | +'cache_chunk_gc_ttl' => 60 * 60 * 24, |
|
1122 | 1122 | |
1123 | 1123 | /** |
1124 | 1124 | * Using Object Store with Nextcloud |
@@ -1426,7 +1426,7 @@ discard block |
||
1426 | 1426 | * Defaults to ``60*60`` seconds (1 hour) or the php |
1427 | 1427 | * max_execution_time, whichever is higher. |
1428 | 1428 | */ |
1429 | -'filelocking.ttl' => 60*60, |
|
1429 | +'filelocking.ttl' => 60 * 60, |
|
1430 | 1430 | |
1431 | 1431 | /** |
1432 | 1432 | * Memory caching backend for file locking |
@@ -59,7 +59,7 @@ |
||
59 | 59 | * @return \Doctrine\DBAL\Driver\Statement The prepared statement. |
60 | 60 | * @since 6.0.0 |
61 | 61 | */ |
62 | - public function prepare($sql, $limit=null, $offset=null); |
|
62 | + public function prepare($sql, $limit = null, $offset = null); |
|
63 | 63 | |
64 | 64 | /** |
65 | 65 | * Executes an, optionally parameterized, SQL query. |
@@ -65,8 +65,8 @@ discard block |
||
65 | 65 | * @deprecated 8.1.0 use method search() of \OCP\IUserManager - \OC::$server->getUserManager() |
66 | 66 | * @since 5.0.0 |
67 | 67 | */ |
68 | - public static function getUsers( $search = '', $limit = null, $offset = null ) { |
|
69 | - return \OC_User::getUsers( $search, $limit, $offset ); |
|
68 | + public static function getUsers($search = '', $limit = null, $offset = null) { |
|
69 | + return \OC_User::getUsers($search, $limit, $offset); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | /** |
@@ -77,8 +77,8 @@ discard block |
||
77 | 77 | * get() of \OCP\IUserManager - \OC::$server->getUserManager() |
78 | 78 | * @since 5.0.0 |
79 | 79 | */ |
80 | - public static function getDisplayName( $user = null ) { |
|
81 | - return \OC_User::getDisplayName( $user ); |
|
80 | + public static function getDisplayName($user = null) { |
|
81 | + return \OC_User::getDisplayName($user); |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | /** |
@@ -90,8 +90,8 @@ discard block |
||
90 | 90 | * @deprecated 8.1.0 use method searchDisplayName() of \OCP\IUserManager - \OC::$server->getUserManager() |
91 | 91 | * @since 5.0.0 |
92 | 92 | */ |
93 | - public static function getDisplayNames( $search = '', $limit = null, $offset = null ) { |
|
94 | - return \OC_User::getDisplayNames( $search, $limit, $offset ); |
|
93 | + public static function getDisplayNames($search = '', $limit = null, $offset = null) { |
|
94 | + return \OC_User::getDisplayNames($search, $limit, $offset); |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | /** |
@@ -111,8 +111,8 @@ discard block |
||
111 | 111 | * @deprecated 8.1.0 use method userExists() of \OCP\IUserManager - \OC::$server->getUserManager() |
112 | 112 | * @since 5.0.0 |
113 | 113 | */ |
114 | - public static function userExists( $uid, $excludingBackend = null ) { |
|
115 | - return \OC_User::userExists( $uid, $excludingBackend ); |
|
114 | + public static function userExists($uid, $excludingBackend = null) { |
|
115 | + return \OC_User::userExists($uid, $excludingBackend); |
|
116 | 116 | } |
117 | 117 | /** |
118 | 118 | * Logs the user out including all the session data |
@@ -134,8 +134,8 @@ discard block |
||
134 | 134 | * @deprecated 8.0.0 Use \OC::$server->getUserManager()->checkPassword(); |
135 | 135 | * @since 5.0.0 |
136 | 136 | */ |
137 | - public static function checkPassword( $uid, $password ) { |
|
138 | - return \OC_User::checkPassword( $uid, $password ); |
|
137 | + public static function checkPassword($uid, $password) { |
|
138 | + return \OC_User::checkPassword($uid, $password); |
|
139 | 139 | } |
140 | 140 | |
141 | 141 | /** |
@@ -42,11 +42,11 @@ |
||
42 | 42 | const METHOD_STREAM = 'stream'; |
43 | 43 | const METHOD_MAIL = 'email'; |
44 | 44 | |
45 | - const PRIORITY_VERYLOW = 10; |
|
46 | - const PRIORITY_LOW = 20; |
|
47 | - const PRIORITY_MEDIUM = 30; |
|
48 | - const PRIORITY_HIGH = 40; |
|
49 | - const PRIORITY_VERYHIGH = 50; |
|
45 | + const PRIORITY_VERYLOW = 10; |
|
46 | + const PRIORITY_LOW = 20; |
|
47 | + const PRIORITY_MEDIUM = 30; |
|
48 | + const PRIORITY_HIGH = 40; |
|
49 | + const PRIORITY_VERYHIGH = 50; |
|
50 | 50 | |
51 | 51 | /** |
52 | 52 | * The extension can return an array of additional notification types. |
@@ -58,11 +58,11 @@ discard block |
||
58 | 58 | */ |
59 | 59 | class Util { |
60 | 60 | // consts for Logging |
61 | - const DEBUG=0; |
|
62 | - const INFO=1; |
|
63 | - const WARN=2; |
|
64 | - const ERROR=3; |
|
65 | - const FATAL=4; |
|
61 | + const DEBUG = 0; |
|
62 | + const INFO = 1; |
|
63 | + const WARN = 2; |
|
64 | + const ERROR = 3; |
|
65 | + const FATAL = 4; |
|
66 | 66 | |
67 | 67 | /** \OCP\Share\IManager */ |
68 | 68 | private static $shareManager; |
@@ -118,11 +118,11 @@ discard block |
||
118 | 118 | $message->setSubject($subject); |
119 | 119 | $message->setPlainBody($mailtext); |
120 | 120 | $message->setFrom([$fromaddress => $fromname]); |
121 | - if($html === 1) { |
|
121 | + if ($html === 1) { |
|
122 | 122 | $message->setHTMLBody($altbody); |
123 | 123 | } |
124 | 124 | |
125 | - if($altbody === '') { |
|
125 | + if ($altbody === '') { |
|
126 | 126 | $message->setHTMLBody($mailtext); |
127 | 127 | $message->setPlainBody(''); |
128 | 128 | } else { |
@@ -130,14 +130,14 @@ discard block |
||
130 | 130 | $message->setPlainBody($altbody); |
131 | 131 | } |
132 | 132 | |
133 | - if(!empty($ccaddress)) { |
|
134 | - if(!empty($ccname)) { |
|
133 | + if (!empty($ccaddress)) { |
|
134 | + if (!empty($ccname)) { |
|
135 | 135 | $message->setCc([$ccaddress => $ccname]); |
136 | 136 | } else { |
137 | 137 | $message->setCc([$ccaddress]); |
138 | 138 | } |
139 | 139 | } |
140 | - if(!empty($bcc)) { |
|
140 | + if (!empty($bcc)) { |
|
141 | 141 | $message->setBcc([$bcc]); |
142 | 142 | } |
143 | 143 | |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | * @param int $level |
152 | 152 | * @since 4.0.0 |
153 | 153 | */ |
154 | - public static function writeLog( $app, $message, $level ) { |
|
154 | + public static function writeLog($app, $message, $level) { |
|
155 | 155 | $context = ['app' => $app]; |
156 | 156 | \OC::$server->getLogger()->log($level, $message, $context); |
157 | 157 | } |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | * @since ....0.0 - parameter $level was added in 7.0.0 |
165 | 165 | * @deprecated 8.2.0 use logException of \OCP\ILogger |
166 | 166 | */ |
167 | - public static function logException( $app, \Exception $ex, $level = \OCP\Util::FATAL ) { |
|
167 | + public static function logException($app, \Exception $ex, $level = \OCP\Util::FATAL) { |
|
168 | 168 | \OC::$server->getLogger()->logException($ex, ['app' => $app]); |
169 | 169 | } |
170 | 170 | |
@@ -205,8 +205,8 @@ discard block |
||
205 | 205 | * @param string $file |
206 | 206 | * @since 4.0.0 |
207 | 207 | */ |
208 | - public static function addStyle( $application, $file = null ) { |
|
209 | - \OC_Util::addStyle( $application, $file ); |
|
208 | + public static function addStyle($application, $file = null) { |
|
209 | + \OC_Util::addStyle($application, $file); |
|
210 | 210 | } |
211 | 211 | |
212 | 212 | /** |
@@ -215,8 +215,8 @@ discard block |
||
215 | 215 | * @param string $file |
216 | 216 | * @since 4.0.0 |
217 | 217 | */ |
218 | - public static function addScript( $application, $file = null ) { |
|
219 | - \OC_Util::addScript( $application, $file ); |
|
218 | + public static function addScript($application, $file = null) { |
|
219 | + \OC_Util::addScript($application, $file); |
|
220 | 220 | } |
221 | 221 | |
222 | 222 | /** |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | * @param string $text the text content for the element |
239 | 239 | * @since 4.0.0 |
240 | 240 | */ |
241 | - public static function addHeader($tag, $attributes, $text=null) { |
|
241 | + public static function addHeader($tag, $attributes, $text = null) { |
|
242 | 242 | \OC_Util::addHeader($tag, $attributes, $text); |
243 | 243 | } |
244 | 244 | |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | * @deprecated 8.0.0 Use \OC::$server->query('DateTimeFormatter') instead |
253 | 253 | * @since 4.0.0 |
254 | 254 | */ |
255 | - public static function formatDate($timestamp, $dateOnly=false, $timeZone = null) { |
|
255 | + public static function formatDate($timestamp, $dateOnly = false, $timeZone = null) { |
|
256 | 256 | return(\OC_Util::formatDate($timestamp, $dateOnly, $timeZone)); |
257 | 257 | } |
258 | 258 | |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | * @return string the url |
277 | 277 | * @since 4.0.0 - parameter $args was added in 4.5.0 |
278 | 278 | */ |
279 | - public static function linkToAbsolute( $app, $file, $args = array() ) { |
|
279 | + public static function linkToAbsolute($app, $file, $args = array()) { |
|
280 | 280 | $urlGenerator = \OC::$server->getURLGenerator(); |
281 | 281 | return $urlGenerator->getAbsoluteURL( |
282 | 282 | $urlGenerator->linkTo($app, $file, $args) |
@@ -289,11 +289,11 @@ discard block |
||
289 | 289 | * @return string the url |
290 | 290 | * @since 4.0.0 |
291 | 291 | */ |
292 | - public static function linkToRemote( $service ) { |
|
292 | + public static function linkToRemote($service) { |
|
293 | 293 | $urlGenerator = \OC::$server->getURLGenerator(); |
294 | - $remoteBase = $urlGenerator->linkTo('', 'remote.php') . '/' . $service; |
|
294 | + $remoteBase = $urlGenerator->linkTo('', 'remote.php').'/'.$service; |
|
295 | 295 | return $urlGenerator->getAbsoluteURL( |
296 | - $remoteBase . (($service[strlen($service) - 1] != '/') ? '/' : '') |
|
296 | + $remoteBase.(($service[strlen($service) - 1] != '/') ? '/' : '') |
|
297 | 297 | ); |
298 | 298 | } |
299 | 299 | |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | * @deprecated 8.1.0 Use \OC::$server->getURLGenerator()->linkToRoute($route, $parameters) |
317 | 317 | * @since 5.0.0 |
318 | 318 | */ |
319 | - public static function linkToRoute( $route, $parameters = array() ) { |
|
319 | + public static function linkToRoute($route, $parameters = array()) { |
|
320 | 320 | return \OC::$server->getURLGenerator()->linkToRoute($route, $parameters); |
321 | 321 | } |
322 | 322 | |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | * @deprecated 8.1.0 Use \OC::$server->getURLGenerator()->linkTo($app, $file, $args) |
331 | 331 | * @since 4.0.0 - parameter $args was added in 4.5.0 |
332 | 332 | */ |
333 | - public static function linkTo( $app, $file, $args = array() ) { |
|
333 | + public static function linkTo($app, $file, $args = array()) { |
|
334 | 334 | return \OC::$server->getURLGenerator()->linkTo($app, $file, $args); |
335 | 335 | } |
336 | 336 | |
@@ -429,7 +429,7 @@ discard block |
||
429 | 429 | * @deprecated 8.1.0 Use \OC::$server->getURLGenerator()->imagePath($app, $image) |
430 | 430 | * @since 4.0.0 |
431 | 431 | */ |
432 | - public static function imagePath( $app, $image ) { |
|
432 | + public static function imagePath($app, $image) { |
|
433 | 433 | return \OC::$server->getURLGenerator()->imagePath($app, $image); |
434 | 434 | } |
435 | 435 | |
@@ -439,8 +439,8 @@ discard block |
||
439 | 439 | * @return string a human readable file size |
440 | 440 | * @since 4.0.0 |
441 | 441 | */ |
442 | - public static function humanFileSize( $bytes ) { |
|
443 | - return(\OC_Helper::humanFileSize( $bytes )); |
|
442 | + public static function humanFileSize($bytes) { |
|
443 | + return(\OC_Helper::humanFileSize($bytes)); |
|
444 | 444 | } |
445 | 445 | |
446 | 446 | /** |
@@ -451,8 +451,8 @@ discard block |
||
451 | 451 | * Inspired by: http://www.php.net/manual/en/function.filesize.php#92418 |
452 | 452 | * @since 4.0.0 |
453 | 453 | */ |
454 | - public static function computerFileSize( $str ) { |
|
455 | - return(\OC_Helper::computerFileSize( $str )); |
|
454 | + public static function computerFileSize($str) { |
|
455 | + return(\OC_Helper::computerFileSize($str)); |
|
456 | 456 | } |
457 | 457 | |
458 | 458 | /** |
@@ -469,8 +469,8 @@ discard block |
||
469 | 469 | * TODO: write example |
470 | 470 | * @since 4.0.0 |
471 | 471 | */ |
472 | - static public function connectHook($signalClass, $signalName, $slotClass, $slotName ) { |
|
473 | - return(\OC_Hook::connect($signalClass, $signalName, $slotClass, $slotName )); |
|
472 | + static public function connectHook($signalClass, $signalName, $slotClass, $slotName) { |
|
473 | + return(\OC_Hook::connect($signalClass, $signalName, $slotClass, $slotName)); |
|
474 | 474 | } |
475 | 475 | |
476 | 476 | /** |
@@ -483,8 +483,8 @@ discard block |
||
483 | 483 | * TODO: write example |
484 | 484 | * @since 4.0.0 |
485 | 485 | */ |
486 | - static public function emitHook( $signalclass, $signalname, $params = array()) { |
|
487 | - return(\OC_Hook::emit( $signalclass, $signalname, $params )); |
|
486 | + static public function emitHook($signalclass, $signalname, $params = array()) { |
|
487 | + return(\OC_Hook::emit($signalclass, $signalname, $params)); |
|
488 | 488 | } |
489 | 489 | |
490 | 490 | /** |
@@ -500,7 +500,7 @@ discard block |
||
500 | 500 | * @since 4.5.0 |
501 | 501 | */ |
502 | 502 | public static function callRegister() { |
503 | - if(self::$token === '') { |
|
503 | + if (self::$token === '') { |
|
504 | 504 | self::$token = \OC::$server->getCsrfTokenManager()->getToken()->getEncryptedValue(); |
505 | 505 | } |
506 | 506 | return self::$token; |
@@ -512,7 +512,7 @@ discard block |
||
512 | 512 | * @deprecated 9.0.0 Use annotations based on the app framework. |
513 | 513 | */ |
514 | 514 | public static function callCheck() { |
515 | - if(!\OC::$server->getRequest()->passesStrictCookieCheck()) { |
|
515 | + if (!\OC::$server->getRequest()->passesStrictCookieCheck()) { |
|
516 | 516 | header('Location: '.\OC::$WEBROOT); |
517 | 517 | exit(); |
518 | 518 | } |
@@ -703,7 +703,7 @@ discard block |
||
703 | 703 | */ |
704 | 704 | public static function needUpgrade() { |
705 | 705 | if (!isset(self::$needUpgradeCache)) { |
706 | - self::$needUpgradeCache=\OC_Util::needUpgrade(\OC::$server->getConfig()); |
|
706 | + self::$needUpgradeCache = \OC_Util::needUpgrade(\OC::$server->getConfig()); |
|
707 | 707 | } |
708 | 708 | return self::$needUpgradeCache; |
709 | 709 | } |
@@ -68,7 +68,7 @@ |
||
68 | 68 | * remove all user backends |
69 | 69 | * @since 8.0.0 |
70 | 70 | */ |
71 | - public function clearBackends() ; |
|
71 | + public function clearBackends(); |
|
72 | 72 | |
73 | 73 | /** |
74 | 74 | * get a user by user id |