@@ -93,14 +93,14 @@ discard block |
||
93 | 93 | $params = array(); |
94 | 94 | if (count($ids) == 1 && isset($uidOwner)) { |
95 | 95 | // FIXME: don't concat $parents, use Docrine's PARAM_INT_ARRAY approach |
96 | - $queryString = 'SELECT `id`, `share_with`, `item_type`, `share_type`, ' . |
|
97 | - '`item_target`, `file_target`, `parent` ' . |
|
98 | - 'FROM `*PREFIX*share` ' . |
|
96 | + $queryString = 'SELECT `id`, `share_with`, `item_type`, `share_type`, '. |
|
97 | + '`item_target`, `file_target`, `parent` '. |
|
98 | + 'FROM `*PREFIX*share` '. |
|
99 | 99 | 'WHERE `parent` IN ('.$parents.') AND `uid_owner` = ? '; |
100 | 100 | $params[] = $uidOwner; |
101 | 101 | } else { |
102 | - $queryString = 'SELECT `id`, `share_with`, `item_type`, `share_type`, ' . |
|
103 | - '`item_target`, `file_target`, `parent`, `uid_owner` ' . |
|
102 | + $queryString = 'SELECT `id`, `share_with`, `item_type`, `share_type`, '. |
|
103 | + '`item_target`, `file_target`, `parent`, `uid_owner` '. |
|
104 | 104 | 'FROM `*PREFIX*share` WHERE `parent` IN ('.$parents.') '; |
105 | 105 | } |
106 | 106 | if ($excludeGroupChildren) { |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | 'shareWith' => $item['share_with'], |
118 | 118 | 'itemTarget' => $item['item_target'], |
119 | 119 | 'itemType' => $item['item_type'], |
120 | - 'shareType' => (int)$item['share_type'], |
|
120 | + 'shareType' => (int) $item['share_type'], |
|
121 | 121 | ); |
122 | 122 | if (isset($item['file_target'])) { |
123 | 123 | $tmpItem['fileTarget'] = $item['file_target']; |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | if ($defaultExpireDate === 'yes') { |
169 | 169 | $enforceExpireDate = $config->getAppValue('core', 'shareapi_enforce_expire_date', 'no'); |
170 | 170 | $defaultExpireSettings['defaultExpireDateSet'] = true; |
171 | - $defaultExpireSettings['expireAfterDays'] = (int)($config->getAppValue('core', 'shareapi_expire_after_n_days', '7')); |
|
171 | + $defaultExpireSettings['expireAfterDays'] = (int) ($config->getAppValue('core', 'shareapi_expire_after_n_days', '7')); |
|
172 | 172 | $defaultExpireSettings['enforceExpireDate'] = $enforceExpireDate === 'yes' ? true : false; |
173 | 173 | } |
174 | 174 |
@@ -51,9 +51,9 @@ discard block |
||
51 | 51 | * Callback function for usort. http://php.net/usort |
52 | 52 | */ |
53 | 53 | public function sort($a, $b) { |
54 | - if(!isset($a[$this->key]) || !isset($b[$this->key])) { |
|
55 | - if(!is_null($this->log)) { |
|
56 | - $this->log->error('Sharing dialogue: cannot sort due to ' . |
|
54 | + if (!isset($a[$this->key]) || !isset($b[$this->key])) { |
|
55 | + if (!is_null($this->log)) { |
|
56 | + $this->log->error('Sharing dialogue: cannot sort due to '. |
|
57 | 57 | 'missing array key', array('app' => 'core')); |
58 | 58 | } |
59 | 59 | return 0; |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $i = mb_strpos($nameA, $this->search, 0, $this->encoding); |
64 | 64 | $j = mb_strpos($nameB, $this->search, 0, $this->encoding); |
65 | 65 | |
66 | - if($i === $j || $i > 0 && $j > 0) { |
|
66 | + if ($i === $j || $i > 0 && $j > 0) { |
|
67 | 67 | return strcmp(mb_strtolower($nameA, $this->encoding), |
68 | 68 | mb_strtolower($nameB, $this->encoding)); |
69 | 69 | } elseif ($i === 0) { |
@@ -35,7 +35,7 @@ |
||
35 | 35 | |
36 | 36 | const FORMAT_NONE = -1; |
37 | 37 | const FORMAT_STATUSES = -2; |
38 | - const FORMAT_SOURCES = -3; // ToDo Check if it is still in use otherwise remove it |
|
38 | + const FORMAT_SOURCES = -3; // ToDo Check if it is still in use otherwise remove it |
|
39 | 39 | |
40 | 40 | const RESPONSE_FORMAT = 'json'; // default resonse format for ocs calls |
41 | 41 |
@@ -44,23 +44,23 @@ discard block |
||
44 | 44 | |
45 | 45 | public function run(IOutput $output) { |
46 | 46 | |
47 | - $dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data'); |
|
47 | + $dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data'); |
|
48 | 48 | $instanceId = $this->config->getSystemValue('instanceid', null); |
49 | 49 | |
50 | - if(!is_string($instanceId) || empty($instanceId)) { |
|
50 | + if (!is_string($instanceId) || empty($instanceId)) { |
|
51 | 51 | return; |
52 | 52 | } |
53 | 53 | |
54 | - $updaterFolderPath = $dataDir . '/updater-' . $instanceId; |
|
55 | - $stepFile = $updaterFolderPath . '/.step'; |
|
56 | - if(file_exists($stepFile)) { |
|
54 | + $updaterFolderPath = $dataDir.'/updater-'.$instanceId; |
|
55 | + $stepFile = $updaterFolderPath.'/.step'; |
|
56 | + if (file_exists($stepFile)) { |
|
57 | 57 | $output->info('.step file exists'); |
58 | 58 | |
59 | - $previousStepFile = $updaterFolderPath . '/.step-previous-update'; |
|
59 | + $previousStepFile = $updaterFolderPath.'/.step-previous-update'; |
|
60 | 60 | |
61 | 61 | // cleanup |
62 | - if(file_exists($previousStepFile)) { |
|
63 | - if(\OC_Helper::rmdirr($previousStepFile)) { |
|
62 | + if (file_exists($previousStepFile)) { |
|
63 | + if (\OC_Helper::rmdirr($previousStepFile)) { |
|
64 | 64 | $output->info('.step-previous-update removed'); |
65 | 65 | } else { |
66 | 66 | $output->info('.step-previous-update can\'t be removed - abort move of .step file'); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | } |
70 | 70 | |
71 | 71 | // move step file |
72 | - if(rename($stepFile, $previousStepFile)) { |
|
72 | + if (rename($stepFile, $previousStepFile)) { |
|
73 | 73 | $output->info('.step file moved to .step-previous-update'); |
74 | 74 | } else { |
75 | 75 | $output->warning('.step file can\'t be moved'); |
@@ -64,7 +64,7 @@ |
||
64 | 64 | |
65 | 65 | public function run(IOutput $output) { |
66 | 66 | if (!$this->config->getAppValue('core', 'previewsCleanedUp', false)) { |
67 | - $this->userManager->callForSeenUsers(function (IUser $user) { |
|
67 | + $this->userManager->callForSeenUsers(function(IUser $user) { |
|
68 | 68 | $this->jobList->add(CleanPreviewsBackgroundJob::class, ['uid' => $user->getUID()]); |
69 | 69 | }); |
70 | 70 | $this->config->setAppValue('core', 'previewsCleanedUp', 1); |
@@ -69,7 +69,7 @@ |
||
69 | 69 | $result->closeCursor(); |
70 | 70 | |
71 | 71 | if ($entriesUpdated > 0) { |
72 | - $output->info($entriesUpdated . ' mounts updated'); |
|
72 | + $output->info($entriesUpdated.' mounts updated'); |
|
73 | 73 | return; |
74 | 74 | } |
75 | 75 |
@@ -93,7 +93,7 @@ |
||
93 | 93 | $result->closeCursor(); |
94 | 94 | |
95 | 95 | if ($deletedEntries) { |
96 | - $output->info('Removed ' . $deletedEntries . ' shares where user is not a member of the group anymore'); |
|
96 | + $output->info('Removed '.$deletedEntries.' shares where user is not a member of the group anymore'); |
|
97 | 97 | } |
98 | 98 | } |
99 | 99 |
@@ -33,7 +33,7 @@ |
||
33 | 33 | } |
34 | 34 | if ($table !== null) { |
35 | 35 | $suffix = '_SEQ'; |
36 | - $table = '"' . $table . $suffix . '"'; |
|
36 | + $table = '"'.$table.$suffix.'"'; |
|
37 | 37 | } |
38 | 38 | return $this->conn->realLastInsertId($table); |
39 | 39 | } |
@@ -37,7 +37,7 @@ |
||
37 | 37 | /** |
38 | 38 | * {@inheritDoc} |
39 | 39 | */ |
40 | - protected function _getCreateTableSQL($name, array $columns, array $options = array()){ |
|
40 | + protected function _getCreateTableSQL($name, array $columns, array $options = array()) { |
|
41 | 41 | // if auto increment is set the column is already defined as primary key |
42 | 42 | foreach ($columns as $column) { |
43 | 43 | if (!empty($column['autoincrement'])) { |