@@ -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'); |
@@ -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 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | |
25 | 25 | use OCP\DB\QueryBuilder\ILiteral; |
26 | 26 | |
27 | -class Literal implements ILiteral{ |
|
27 | +class Literal implements ILiteral { |
|
28 | 28 | /** @var mixed */ |
29 | 29 | protected $literal; |
30 | 30 |
@@ -48,7 +48,7 @@ |
||
48 | 48 | public function iLike($x, $y, $type = null) { |
49 | 49 | $x = $this->helper->quoteColumnName($x); |
50 | 50 | $y = $this->helper->quoteColumnName($y); |
51 | - return $this->expressionBuilder->comparison($x, ' COLLATE ' . $this->charset . '_general_ci LIKE', $y); |
|
51 | + return $this->expressionBuilder->comparison($x, ' COLLATE '.$this->charset.'_general_ci LIKE', $y); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | } |
@@ -48,7 +48,7 @@ |
||
48 | 48 | * @return null |
49 | 49 | */ |
50 | 50 | public function resynchronizeDatabaseSequences(Connection $conn) { |
51 | - $filterExpression = '/^' . preg_quote($this->config->getSystemValue('dbtableprefix', 'oc_')) . '/'; |
|
51 | + $filterExpression = '/^'.preg_quote($this->config->getSystemValue('dbtableprefix', 'oc_')).'/'; |
|
52 | 52 | $databaseName = $conn->getDatabase(); |
53 | 53 | $conn->getConfiguration()->setFilterSchemaAssetsExpression($filterExpression); |
54 | 54 |
@@ -37,7 +37,7 @@ |
||
37 | 37 | // fix default value in brackets - pg 9.4 is returning a negative default value in () |
38 | 38 | // see https://github.com/doctrine/dbal/issues/2427 |
39 | 39 | foreach ($tableDiff->changedColumns as $column) { |
40 | - $column->changedProperties = array_filter($column->changedProperties, function ($changedProperties) use ($column) { |
|
40 | + $column->changedProperties = array_filter($column->changedProperties, function($changedProperties) use ($column) { |
|
41 | 41 | if ($changedProperties !== 'default') { |
42 | 42 | return true; |
43 | 43 | } |