@@ -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 | /** |
@@ -91,8 +91,8 @@ discard block |
||
91 | 91 | * @since 5.0.0 |
92 | 92 | * @suppress PhanDeprecatedFunction |
93 | 93 | */ |
94 | - public static function getDisplayNames( $search = '', $limit = null, $offset = null ) { |
|
95 | - return \OC_User::getDisplayNames( $search, $limit, $offset ); |
|
94 | + public static function getDisplayNames($search = '', $limit = null, $offset = null) { |
|
95 | + return \OC_User::getDisplayNames($search, $limit, $offset); |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | /** |
@@ -135,8 +135,8 @@ discard block |
||
135 | 135 | * @deprecated 8.0.0 Use \OC::$server->getUserManager()->checkPassword(); |
136 | 136 | * @since 5.0.0 |
137 | 137 | */ |
138 | - public static function checkPassword( $uid, $password ) { |
|
139 | - return \OC_User::checkPassword( $uid, $password ); |
|
138 | + public static function checkPassword($uid, $password) { |
|
139 | + return \OC_User::checkPassword($uid, $password); |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | /** |
@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | * null cache indefinitely |
53 | 53 | * @since 4.0.0 |
54 | 54 | */ |
55 | - static public function enableCaching( $cache_time = null ) { |
|
56 | - \OC_Response::enableCaching( $cache_time ); |
|
55 | + static public function enableCaching($cache_time = null) { |
|
56 | + \OC_Response::enableCaching($cache_time); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
@@ -62,8 +62,8 @@ discard block |
||
62 | 62 | * @param string $lastModified time when the response was last modified |
63 | 63 | * @since 4.0.0 |
64 | 64 | */ |
65 | - static public function setLastModifiedHeader( $lastModified ) { |
|
66 | - \OC_Response::setLastModifiedHeader( $lastModified ); |
|
65 | + static public function setLastModifiedHeader($lastModified) { |
|
66 | + \OC_Response::setLastModifiedHeader($lastModified); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | /** |
@@ -72,8 +72,8 @@ discard block |
||
72 | 72 | * @param string $type disposition type, either 'attachment' or 'inline' |
73 | 73 | * @since 7.0.0 |
74 | 74 | */ |
75 | - static public function setContentDispositionHeader( $filename, $type = 'attachment' ) { |
|
76 | - \OC_Response::setContentDispositionHeader( $filename, $type ); |
|
75 | + static public function setContentDispositionHeader($filename, $type = 'attachment') { |
|
76 | + \OC_Response::setContentDispositionHeader($filename, $type); |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | /** |
@@ -100,8 +100,8 @@ discard block |
||
100 | 100 | * @param string $etag token to use for modification check |
101 | 101 | * @since 4.0.0 |
102 | 102 | */ |
103 | - static public function setETagHeader( $etag ) { |
|
104 | - \OC_Response::setETagHeader( $etag ); |
|
103 | + static public function setETagHeader($etag) { |
|
104 | + \OC_Response::setETagHeader($etag); |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | /** |
@@ -111,8 +111,8 @@ discard block |
||
111 | 111 | * @deprecated 8.1.0 - Use \OCP\AppFramework\Http\StreamResponse or another AppFramework controller instead |
112 | 112 | * @suppress PhanDeprecatedFunction |
113 | 113 | */ |
114 | - static public function sendFile( $filepath ) { |
|
115 | - \OC_Response::sendFile( $filepath ); |
|
114 | + static public function sendFile($filepath) { |
|
115 | + \OC_Response::sendFile($filepath); |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | /** |
@@ -122,8 +122,8 @@ discard block |
||
122 | 122 | * DateTime object when to expire response |
123 | 123 | * @since 4.0.0 |
124 | 124 | */ |
125 | - static public function setExpiresHeader( $expires ) { |
|
126 | - \OC_Response::setExpiresHeader( $expires ); |
|
125 | + static public function setExpiresHeader($expires) { |
|
126 | + \OC_Response::setExpiresHeader($expires); |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | /** |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | * @param string $location to redirect to |
132 | 132 | * @since 4.0.0 |
133 | 133 | */ |
134 | - static public function redirect( $location ) { |
|
135 | - \OC_Response::redirect( $location ); |
|
134 | + static public function redirect($location) { |
|
135 | + \OC_Response::redirect($location); |
|
136 | 136 | } |
137 | 137 | } |
@@ -59,9 +59,9 @@ discard block |
||
59 | 59 | */ |
60 | 60 | public function __construct($appName, |
61 | 61 | IRequest $request, |
62 | - $corsMethods='PUT, POST, GET, DELETE, PATCH', |
|
63 | - $corsAllowedHeaders='Authorization, Content-Type, Accept', |
|
64 | - $corsMaxAge=1728000){ |
|
62 | + $corsMethods = 'PUT, POST, GET, DELETE, PATCH', |
|
63 | + $corsAllowedHeaders = 'Authorization, Content-Type, Accept', |
|
64 | + $corsMaxAge = 1728000) { |
|
65 | 65 | parent::__construct($appName, $request); |
66 | 66 | $this->corsMethods = $corsMethods; |
67 | 67 | $this->corsAllowedHeaders = $corsAllowedHeaders; |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | * @since 7.0.0 |
80 | 80 | */ |
81 | 81 | public function preflightedCors() { |
82 | - if(isset($this->request->server['HTTP_ORIGIN'])) { |
|
82 | + if (isset($this->request->server['HTTP_ORIGIN'])) { |
|
83 | 83 | $origin = $this->request->server['HTTP_ORIGIN']; |
84 | 84 | } else { |
85 | 85 | $origin = '*'; |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $response = new Response(); |
89 | 89 | $response->addHeader('Access-Control-Allow-Origin', $origin); |
90 | 90 | $response->addHeader('Access-Control-Allow-Methods', $this->corsMethods); |
91 | - $response->addHeader('Access-Control-Max-Age', (string)$this->corsMaxAge); |
|
91 | + $response->addHeader('Access-Control-Max-Age', (string) $this->corsMaxAge); |
|
92 | 92 | $response->addHeader('Access-Control-Allow-Headers', $this->corsAllowedHeaders); |
93 | 93 | $response->addHeader('Access-Control-Allow-Credentials', 'false'); |
94 | 94 | return $response; |
@@ -30,6 +30,6 @@ |
||
30 | 30 | * @package OCP\Files |
31 | 31 | * @since 11.0.0 |
32 | 32 | */ |
33 | -interface IAppData extends ISimpleRoot { |
|
33 | +interface IAppData extends ISimpleRoot { |
|
34 | 34 | |
35 | 35 | } |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | // need to send an initial message to force-init the event source, |
42 | 42 | // which will then trigger its own CSRF check and produces its own CSRF error |
43 | 43 | // message |
44 | -$eventSource->send('success', (string)$l->t('Preparing update')); |
|
44 | +$eventSource->send('success', (string) $l->t('Preparing update')); |
|
45 | 45 | |
46 | 46 | class FeedBackHandler { |
47 | 47 | /** @var integer */ |
@@ -77,21 +77,21 @@ discard block |
||
77 | 77 | if (empty($desc)) { |
78 | 78 | $desc = $this->currentStep; |
79 | 79 | } |
80 | - $this->eventSource->send('success', (string)$this->l10n->t('[%d / %d]: %s', [$this->progressStateStep, $this->progressStateMax, $desc])); |
|
80 | + $this->eventSource->send('success', (string) $this->l10n->t('[%d / %d]: %s', [$this->progressStateStep, $this->progressStateMax, $desc])); |
|
81 | 81 | break; |
82 | 82 | case '\OC\Repair::finishProgress': |
83 | 83 | $this->progressStateMax = $this->progressStateStep; |
84 | - $this->eventSource->send('success', (string)$this->l10n->t('[%d / %d]: %s', [$this->progressStateStep, $this->progressStateMax, $this->currentStep])); |
|
84 | + $this->eventSource->send('success', (string) $this->l10n->t('[%d / %d]: %s', [$this->progressStateStep, $this->progressStateMax, $this->currentStep])); |
|
85 | 85 | break; |
86 | 86 | case '\OC\Repair::step': |
87 | 87 | break; |
88 | 88 | case '\OC\Repair::info': |
89 | 89 | break; |
90 | 90 | case '\OC\Repair::warning': |
91 | - $this->eventSource->send('notice', (string)$this->l10n->t('Repair warning: ') . $event->getArgument(0)); |
|
91 | + $this->eventSource->send('notice', (string) $this->l10n->t('Repair warning: ').$event->getArgument(0)); |
|
92 | 92 | break; |
93 | 93 | case '\OC\Repair::error': |
94 | - $this->eventSource->send('notice', (string)$this->l10n->t('Repair error: ') . $event->getArgument(0)); |
|
94 | + $this->eventSource->send('notice', (string) $this->l10n->t('Repair error: ').$event->getArgument(0)); |
|
95 | 95 | break; |
96 | 96 | } |
97 | 97 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | |
102 | 102 | $config = \OC::$server->getSystemConfig(); |
103 | 103 | if ($config->getValue('upgrade.disable-web', false)) { |
104 | - $eventSource->send('failure', (string)$l->t('Please use the command line updater because automatic updating is disabled in the config.php.')); |
|
104 | + $eventSource->send('failure', (string) $l->t('Please use the command line updater because automatic updating is disabled in the config.php.')); |
|
105 | 105 | $eventSource->close(); |
106 | 106 | exit(); |
107 | 107 | } |
@@ -123,12 +123,12 @@ discard block |
||
123 | 123 | $dispatcher = \OC::$server->getEventDispatcher(); |
124 | 124 | $dispatcher->addListener('\OC\DB\Migrator::executeSql', function($event) use ($eventSource, $l) { |
125 | 125 | if ($event instanceof GenericEvent) { |
126 | - $eventSource->send('success', (string)$l->t('[%d / %d]: %s', [$event[0], $event[1], $event->getSubject()])); |
|
126 | + $eventSource->send('success', (string) $l->t('[%d / %d]: %s', [$event[0], $event[1], $event->getSubject()])); |
|
127 | 127 | } |
128 | 128 | }); |
129 | 129 | $dispatcher->addListener('\OC\DB\Migrator::checkTable', function($event) use ($eventSource, $l) { |
130 | 130 | if ($event instanceof GenericEvent) { |
131 | - $eventSource->send('success', (string)$l->t('[%d / %d]: Checking table %s', [$event[0], $event[1], $event->getSubject()])); |
|
131 | + $eventSource->send('success', (string) $l->t('[%d / %d]: Checking table %s', [$event[0], $event[1], $event->getSubject()])); |
|
132 | 132 | } |
133 | 133 | }); |
134 | 134 | $feedBack = new FeedBackHandler($eventSource, $l); |
@@ -140,76 +140,76 @@ discard block |
||
140 | 140 | $dispatcher->addListener('\OC\Repair::warning', [$feedBack, 'handleRepairFeedback']); |
141 | 141 | $dispatcher->addListener('\OC\Repair::error', [$feedBack, 'handleRepairFeedback']); |
142 | 142 | |
143 | - $updater->listen('\OC\Updater', 'maintenanceEnabled', function () use ($eventSource, $l) { |
|
144 | - $eventSource->send('success', (string)$l->t('Turned on maintenance mode')); |
|
143 | + $updater->listen('\OC\Updater', 'maintenanceEnabled', function() use ($eventSource, $l) { |
|
144 | + $eventSource->send('success', (string) $l->t('Turned on maintenance mode')); |
|
145 | 145 | }); |
146 | - $updater->listen('\OC\Updater', 'maintenanceDisabled', function () use ($eventSource, $l) { |
|
147 | - $eventSource->send('success', (string)$l->t('Turned off maintenance mode')); |
|
146 | + $updater->listen('\OC\Updater', 'maintenanceDisabled', function() use ($eventSource, $l) { |
|
147 | + $eventSource->send('success', (string) $l->t('Turned off maintenance mode')); |
|
148 | 148 | }); |
149 | - $updater->listen('\OC\Updater', 'maintenanceActive', function () use ($eventSource, $l) { |
|
150 | - $eventSource->send('success', (string)$l->t('Maintenance mode is kept active')); |
|
149 | + $updater->listen('\OC\Updater', 'maintenanceActive', function() use ($eventSource, $l) { |
|
150 | + $eventSource->send('success', (string) $l->t('Maintenance mode is kept active')); |
|
151 | 151 | }); |
152 | - $updater->listen('\OC\Updater', 'dbUpgradeBefore', function () use($eventSource, $l) { |
|
153 | - $eventSource->send('success', (string)$l->t('Updating database schema')); |
|
152 | + $updater->listen('\OC\Updater', 'dbUpgradeBefore', function() use($eventSource, $l) { |
|
153 | + $eventSource->send('success', (string) $l->t('Updating database schema')); |
|
154 | 154 | }); |
155 | - $updater->listen('\OC\Updater', 'dbUpgrade', function () use ($eventSource, $l) { |
|
156 | - $eventSource->send('success', (string)$l->t('Updated database')); |
|
155 | + $updater->listen('\OC\Updater', 'dbUpgrade', function() use ($eventSource, $l) { |
|
156 | + $eventSource->send('success', (string) $l->t('Updated database')); |
|
157 | 157 | }); |
158 | - $updater->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function () use($eventSource, $l) { |
|
159 | - $eventSource->send('success', (string)$l->t('Checking whether the database schema can be updated (this can take a long time depending on the database size)')); |
|
158 | + $updater->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function() use($eventSource, $l) { |
|
159 | + $eventSource->send('success', (string) $l->t('Checking whether the database schema can be updated (this can take a long time depending on the database size)')); |
|
160 | 160 | }); |
161 | - $updater->listen('\OC\Updater', 'dbSimulateUpgrade', function () use ($eventSource, $l) { |
|
162 | - $eventSource->send('success', (string)$l->t('Checked database schema update')); |
|
161 | + $updater->listen('\OC\Updater', 'dbSimulateUpgrade', function() use ($eventSource, $l) { |
|
162 | + $eventSource->send('success', (string) $l->t('Checked database schema update')); |
|
163 | 163 | }); |
164 | - $updater->listen('\OC\Updater', 'appUpgradeCheckBefore', function () use ($eventSource, $l) { |
|
165 | - $eventSource->send('success', (string)$l->t('Checking updates of apps')); |
|
164 | + $updater->listen('\OC\Updater', 'appUpgradeCheckBefore', function() use ($eventSource, $l) { |
|
165 | + $eventSource->send('success', (string) $l->t('Checking updates of apps')); |
|
166 | 166 | }); |
167 | - $updater->listen('\OC\Updater', 'checkAppStoreAppBefore', function ($app) use ($eventSource, $l) { |
|
168 | - $eventSource->send('success', (string)$l->t('Checking for update of app "%s" in appstore', [$app])); |
|
167 | + $updater->listen('\OC\Updater', 'checkAppStoreAppBefore', function($app) use ($eventSource, $l) { |
|
168 | + $eventSource->send('success', (string) $l->t('Checking for update of app "%s" in appstore', [$app])); |
|
169 | 169 | }); |
170 | - $updater->listen('\OC\Updater', 'upgradeAppStoreApp', function ($app) use ($eventSource, $l) { |
|
171 | - $eventSource->send('success', (string)$l->t('Update app "%s" from appstore', [$app])); |
|
170 | + $updater->listen('\OC\Updater', 'upgradeAppStoreApp', function($app) use ($eventSource, $l) { |
|
171 | + $eventSource->send('success', (string) $l->t('Update app "%s" from appstore', [$app])); |
|
172 | 172 | }); |
173 | - $updater->listen('\OC\Updater', 'checkAppStoreApp', function ($app) use ($eventSource, $l) { |
|
174 | - $eventSource->send('success', (string)$l->t('Checked for update of app "%s" in appstore', [$app])); |
|
173 | + $updater->listen('\OC\Updater', 'checkAppStoreApp', function($app) use ($eventSource, $l) { |
|
174 | + $eventSource->send('success', (string) $l->t('Checked for update of app "%s" in appstore', [$app])); |
|
175 | 175 | }); |
176 | - $updater->listen('\OC\Updater', 'appSimulateUpdate', function ($app) use ($eventSource, $l) { |
|
177 | - $eventSource->send('success', (string)$l->t('Checking whether the database schema for %s can be updated (this can take a long time depending on the database size)', [$app])); |
|
176 | + $updater->listen('\OC\Updater', 'appSimulateUpdate', function($app) use ($eventSource, $l) { |
|
177 | + $eventSource->send('success', (string) $l->t('Checking whether the database schema for %s can be updated (this can take a long time depending on the database size)', [$app])); |
|
178 | 178 | }); |
179 | - $updater->listen('\OC\Updater', 'appUpgradeCheck', function () use ($eventSource, $l) { |
|
180 | - $eventSource->send('success', (string)$l->t('Checked database schema update for apps')); |
|
179 | + $updater->listen('\OC\Updater', 'appUpgradeCheck', function() use ($eventSource, $l) { |
|
180 | + $eventSource->send('success', (string) $l->t('Checked database schema update for apps')); |
|
181 | 181 | }); |
182 | - $updater->listen('\OC\Updater', 'appUpgrade', function ($app, $version) use ($eventSource, $l) { |
|
183 | - $eventSource->send('success', (string)$l->t('Updated "%s" to %s', array($app, $version))); |
|
182 | + $updater->listen('\OC\Updater', 'appUpgrade', function($app, $version) use ($eventSource, $l) { |
|
183 | + $eventSource->send('success', (string) $l->t('Updated "%s" to %s', array($app, $version))); |
|
184 | 184 | }); |
185 | - $updater->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use (&$incompatibleApps) { |
|
186 | - $incompatibleApps[]= $app; |
|
185 | + $updater->listen('\OC\Updater', 'incompatibleAppDisabled', function($app) use (&$incompatibleApps) { |
|
186 | + $incompatibleApps[] = $app; |
|
187 | 187 | }); |
188 | - $updater->listen('\OC\Updater', 'thirdPartyAppDisabled', function ($app) use (&$disabledThirdPartyApps) { |
|
189 | - $disabledThirdPartyApps[]= $app; |
|
188 | + $updater->listen('\OC\Updater', 'thirdPartyAppDisabled', function($app) use (&$disabledThirdPartyApps) { |
|
189 | + $disabledThirdPartyApps[] = $app; |
|
190 | 190 | }); |
191 | - $updater->listen('\OC\Updater', 'failure', function ($message) use ($eventSource, $config) { |
|
191 | + $updater->listen('\OC\Updater', 'failure', function($message) use ($eventSource, $config) { |
|
192 | 192 | $eventSource->send('failure', $message); |
193 | 193 | $eventSource->close(); |
194 | 194 | $config->setSystemValue('maintenance', false); |
195 | 195 | }); |
196 | - $updater->listen('\OC\Updater', 'setDebugLogLevel', function ($logLevel, $logLevelName) use($eventSource, $l) { |
|
197 | - $eventSource->send('success', (string)$l->t('Set log level to debug')); |
|
196 | + $updater->listen('\OC\Updater', 'setDebugLogLevel', function($logLevel, $logLevelName) use($eventSource, $l) { |
|
197 | + $eventSource->send('success', (string) $l->t('Set log level to debug')); |
|
198 | 198 | }); |
199 | - $updater->listen('\OC\Updater', 'resetLogLevel', function ($logLevel, $logLevelName) use($eventSource, $l) { |
|
200 | - $eventSource->send('success', (string)$l->t('Reset log level')); |
|
199 | + $updater->listen('\OC\Updater', 'resetLogLevel', function($logLevel, $logLevelName) use($eventSource, $l) { |
|
200 | + $eventSource->send('success', (string) $l->t('Reset log level')); |
|
201 | 201 | }); |
202 | - $updater->listen('\OC\Updater', 'startCheckCodeIntegrity', function () use($eventSource, $l) { |
|
203 | - $eventSource->send('success', (string)$l->t('Starting code integrity check')); |
|
202 | + $updater->listen('\OC\Updater', 'startCheckCodeIntegrity', function() use($eventSource, $l) { |
|
203 | + $eventSource->send('success', (string) $l->t('Starting code integrity check')); |
|
204 | 204 | }); |
205 | - $updater->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function () use($eventSource, $l) { |
|
206 | - $eventSource->send('success', (string)$l->t('Finished code integrity check')); |
|
205 | + $updater->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function() use($eventSource, $l) { |
|
206 | + $eventSource->send('success', (string) $l->t('Finished code integrity check')); |
|
207 | 207 | }); |
208 | 208 | |
209 | 209 | try { |
210 | 210 | $updater->upgrade(); |
211 | 211 | } catch (\Exception $e) { |
212 | - $eventSource->send('failure', get_class($e) . ': ' . $e->getMessage()); |
|
212 | + $eventSource->send('failure', get_class($e).': '.$e->getMessage()); |
|
213 | 213 | $eventSource->close(); |
214 | 214 | exit(); |
215 | 215 | } |
@@ -224,10 +224,10 @@ discard block |
||
224 | 224 | |
225 | 225 | if (!empty($disabledApps)) { |
226 | 226 | $eventSource->send('notice', |
227 | - (string)$l->t('Following apps have been disabled: %s', [implode(', ', $disabledApps)])); |
|
227 | + (string) $l->t('Following apps have been disabled: %s', [implode(', ', $disabledApps)])); |
|
228 | 228 | } |
229 | 229 | } else { |
230 | - $eventSource->send('notice', (string)$l->t('Already up to date')); |
|
230 | + $eventSource->send('notice', (string) $l->t('Already up to date')); |
|
231 | 231 | } |
232 | 232 | |
233 | 233 | $eventSource->send('done', ''); |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | if (!($node instanceof File)) { |
179 | 179 | return new JSONResponse(['data' => ['message' => $this->l->t('Please select a file.')]]); |
180 | 180 | } |
181 | - if ($node->getSize() > 20*1024*1024) { |
|
181 | + if ($node->getSize() > 20 * 1024 * 1024) { |
|
182 | 182 | return new JSONResponse( |
183 | 183 | ['data' => ['message' => $this->l->t('File is too big')]], |
184 | 184 | Http::STATUS_BAD_REQUEST |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | is_uploaded_file($files['tmp_name'][0]) && |
207 | 207 | !\OC\Files\Filesystem::isFileBlacklisted($files['tmp_name'][0]) |
208 | 208 | ) { |
209 | - if ($files['size'][0] > 20*1024*1024) { |
|
209 | + if ($files['size'][0] > 20 * 1024 * 1024) { |
|
210 | 210 | return new JSONResponse( |
211 | 211 | ['data' => ['message' => $this->l->t('File is too big')]], |
212 | 212 | Http::STATUS_BAD_REQUEST |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | Http::STATUS_OK, |
298 | 298 | ['Content-Type' => $image->mimeType()]); |
299 | 299 | |
300 | - $resp->setETag((string)crc32($image->data())); |
|
300 | + $resp->setETag((string) crc32($image->data())); |
|
301 | 301 | $resp->cacheFor(0); |
302 | 302 | $resp->setLastModified(new \DateTime('now', new \DateTimeZone('GMT'))); |
303 | 303 | return $resp; |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | } |
330 | 330 | |
331 | 331 | $image = new \OC_Image($tmpAvatar); |
332 | - $image->crop($crop['x'], $crop['y'], (int)round($crop['w']), (int)round($crop['h'])); |
|
332 | + $image->crop($crop['x'], $crop['y'], (int) round($crop['w']), (int) round($crop['h'])); |
|
333 | 333 | try { |
334 | 334 | $avatar = $this->avatarManager->getAvatar($this->userId); |
335 | 335 | $avatar->set($image); |
@@ -93,18 +93,18 @@ discard block |
||
93 | 93 | public function view($id) { |
94 | 94 | try { |
95 | 95 | $comment = $this->commentsManager->get($id); |
96 | - if($comment->getObjectType() !== 'files') { |
|
96 | + if ($comment->getObjectType() !== 'files') { |
|
97 | 97 | return new NotFoundResponse(); |
98 | 98 | } |
99 | - $files = $this->folder->getById((int)$comment->getObjectId()); |
|
100 | - if(count($files) === 0) { |
|
99 | + $files = $this->folder->getById((int) $comment->getObjectId()); |
|
100 | + if (count($files) === 0) { |
|
101 | 101 | $this->markProcessed($comment); |
102 | 102 | return new NotFoundResponse(); |
103 | 103 | } |
104 | 104 | |
105 | 105 | $url = $this->urlGenerator->linkToRouteAbsolute( |
106 | 106 | 'files.viewcontroller.showFile', |
107 | - [ 'fileid' => $comment->getObjectId() ] |
|
107 | + ['fileid' => $comment->getObjectId()] |
|
108 | 108 | ); |
109 | 109 | |
110 | 110 | $this->markProcessed($comment); |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | */ |
122 | 122 | protected function markProcessed(IComment $comment) { |
123 | 123 | $user = $this->userSession->getUser(); |
124 | - if(is_null($user)) { |
|
124 | + if (is_null($user)) { |
|
125 | 125 | return; |
126 | 126 | } |
127 | 127 | $notification = $this->notificationManager->createNotification(); |
@@ -32,7 +32,7 @@ |
||
32 | 32 | |
33 | 33 | if (strrpos($principalUrl, 'principals/users', -strlen($principalUrl)) !== false) { |
34 | 34 | list(, $principalId) = \Sabre\Uri\split($principalUrl); |
35 | - return self::CALENDAR_ROOT .'/' . $principalId; |
|
35 | + return self::CALENDAR_ROOT.'/'.$principalId; |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | return; |
@@ -45,15 +45,15 @@ discard block |
||
45 | 45 | |
46 | 46 | if (strrpos($principal, 'principals/users', -strlen($principal)) !== false) { |
47 | 47 | list(, $principalId) = \Sabre\Uri\split($principal); |
48 | - return self::ADDRESSBOOK_ROOT . '/users/' . $principalId; |
|
48 | + return self::ADDRESSBOOK_ROOT.'/users/'.$principalId; |
|
49 | 49 | } |
50 | 50 | if (strrpos($principal, 'principals/groups', -strlen($principal)) !== false) { |
51 | 51 | list(, $principalId) = \Sabre\Uri\split($principal); |
52 | - return self::ADDRESSBOOK_ROOT . '/groups/' . $principalId; |
|
52 | + return self::ADDRESSBOOK_ROOT.'/groups/'.$principalId; |
|
53 | 53 | } |
54 | 54 | if (strrpos($principal, 'principals/system', -strlen($principal)) !== false) { |
55 | 55 | list(, $principalId) = \Sabre\Uri\split($principal); |
56 | - return self::ADDRESSBOOK_ROOT . '/system/' . $principalId; |
|
56 | + return self::ADDRESSBOOK_ROOT.'/system/'.$principalId; |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | throw new \LogicException('This is not supposed to happen'); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | |
73 | 73 | if ($node instanceof AddressBook) { |
74 | 74 | |
75 | - $propFind->handle($ns . 'groups', function () use ($node) { |
|
75 | + $propFind->handle($ns.'groups', function() use ($node) { |
|
76 | 76 | return new Groups($node->getContactsGroups()); |
77 | 77 | }); |
78 | 78 | } |