@@ -25,17 +25,17 @@ |
||
| 25 | 25 | use OCP\DB\QueryBuilder\IParameter; |
| 26 | 26 | |
| 27 | 27 | class Parameter implements IParameter { |
| 28 | - /** @var mixed */ |
|
| 29 | - protected $name; |
|
| 28 | + /** @var mixed */ |
|
| 29 | + protected $name; |
|
| 30 | 30 | |
| 31 | - public function __construct($name) { |
|
| 32 | - $this->name = $name; |
|
| 33 | - } |
|
| 31 | + public function __construct($name) { |
|
| 32 | + $this->name = $name; |
|
| 33 | + } |
|
| 34 | 34 | |
| 35 | - /** |
|
| 36 | - * @return string |
|
| 37 | - */ |
|
| 38 | - public function __toString() { |
|
| 39 | - return (string) $this->name; |
|
| 40 | - } |
|
| 35 | + /** |
|
| 36 | + * @return string |
|
| 37 | + */ |
|
| 38 | + public function __toString() { |
|
| 39 | + return (string) $this->name; |
|
| 40 | + } |
|
| 41 | 41 | } |
@@ -25,32 +25,32 @@ |
||
| 25 | 25 | use Doctrine\DBAL\Schema\Schema; |
| 26 | 26 | |
| 27 | 27 | class PostgreSqlMigrator extends Migrator { |
| 28 | - /** |
|
| 29 | - * @param Schema $targetSchema |
|
| 30 | - * @param \Doctrine\DBAL\Connection $connection |
|
| 31 | - * @return \Doctrine\DBAL\Schema\SchemaDiff |
|
| 32 | - */ |
|
| 33 | - protected function getDiff(Schema $targetSchema, \Doctrine\DBAL\Connection $connection) { |
|
| 34 | - $schemaDiff = parent::getDiff($targetSchema, $connection); |
|
| 28 | + /** |
|
| 29 | + * @param Schema $targetSchema |
|
| 30 | + * @param \Doctrine\DBAL\Connection $connection |
|
| 31 | + * @return \Doctrine\DBAL\Schema\SchemaDiff |
|
| 32 | + */ |
|
| 33 | + protected function getDiff(Schema $targetSchema, \Doctrine\DBAL\Connection $connection) { |
|
| 34 | + $schemaDiff = parent::getDiff($targetSchema, $connection); |
|
| 35 | 35 | |
| 36 | - foreach ($schemaDiff->changedTables as $tableDiff) { |
|
| 37 | - // fix default value in brackets - pg 9.4 is returning a negative default value in () |
|
| 38 | - // see https://github.com/doctrine/dbal/issues/2427 |
|
| 39 | - foreach ($tableDiff->changedColumns as $column) { |
|
| 40 | - $column->changedProperties = array_filter($column->changedProperties, function ($changedProperties) use ($column) { |
|
| 41 | - if ($changedProperties !== 'default') { |
|
| 42 | - return true; |
|
| 43 | - } |
|
| 44 | - $fromDefault = $column->fromColumn->getDefault(); |
|
| 45 | - $toDefault = $column->column->getDefault(); |
|
| 46 | - $fromDefault = trim($fromDefault, "()"); |
|
| 36 | + foreach ($schemaDiff->changedTables as $tableDiff) { |
|
| 37 | + // fix default value in brackets - pg 9.4 is returning a negative default value in () |
|
| 38 | + // see https://github.com/doctrine/dbal/issues/2427 |
|
| 39 | + foreach ($tableDiff->changedColumns as $column) { |
|
| 40 | + $column->changedProperties = array_filter($column->changedProperties, function ($changedProperties) use ($column) { |
|
| 41 | + if ($changedProperties !== 'default') { |
|
| 42 | + return true; |
|
| 43 | + } |
|
| 44 | + $fromDefault = $column->fromColumn->getDefault(); |
|
| 45 | + $toDefault = $column->column->getDefault(); |
|
| 46 | + $fromDefault = trim($fromDefault, "()"); |
|
| 47 | 47 | |
| 48 | - // by intention usage of != |
|
| 49 | - return $fromDefault != $toDefault; |
|
| 50 | - }); |
|
| 51 | - } |
|
| 52 | - } |
|
| 48 | + // by intention usage of != |
|
| 49 | + return $fromDefault != $toDefault; |
|
| 50 | + }); |
|
| 51 | + } |
|
| 52 | + } |
|
| 53 | 53 | |
| 54 | - return $schemaDiff; |
|
| 55 | - } |
|
| 54 | + return $schemaDiff; |
|
| 55 | + } |
|
| 56 | 56 | } |
@@ -22,31 +22,31 @@ |
||
| 22 | 22 | namespace OC\App\AppStore\Version; |
| 23 | 23 | |
| 24 | 24 | class Version { |
| 25 | - /** @var string */ |
|
| 26 | - private $minVersion; |
|
| 27 | - /** @var string */ |
|
| 28 | - private $maxVersion; |
|
| 25 | + /** @var string */ |
|
| 26 | + private $minVersion; |
|
| 27 | + /** @var string */ |
|
| 28 | + private $maxVersion; |
|
| 29 | 29 | |
| 30 | - /** |
|
| 31 | - * @param string $minVersion |
|
| 32 | - * @param string $maxVersion |
|
| 33 | - */ |
|
| 34 | - public function __construct($minVersion, $maxVersion) { |
|
| 35 | - $this->minVersion = $minVersion; |
|
| 36 | - $this->maxVersion = $maxVersion; |
|
| 37 | - } |
|
| 30 | + /** |
|
| 31 | + * @param string $minVersion |
|
| 32 | + * @param string $maxVersion |
|
| 33 | + */ |
|
| 34 | + public function __construct($minVersion, $maxVersion) { |
|
| 35 | + $this->minVersion = $minVersion; |
|
| 36 | + $this->maxVersion = $maxVersion; |
|
| 37 | + } |
|
| 38 | 38 | |
| 39 | - /** |
|
| 40 | - * @return string |
|
| 41 | - */ |
|
| 42 | - public function getMinimumVersion() { |
|
| 43 | - return $this->minVersion; |
|
| 44 | - } |
|
| 39 | + /** |
|
| 40 | + * @return string |
|
| 41 | + */ |
|
| 42 | + public function getMinimumVersion() { |
|
| 43 | + return $this->minVersion; |
|
| 44 | + } |
|
| 45 | 45 | |
| 46 | - /** |
|
| 47 | - * @return string |
|
| 48 | - */ |
|
| 49 | - public function getMaximumVersion() { |
|
| 50 | - return $this->maxVersion; |
|
| 51 | - } |
|
| 46 | + /** |
|
| 47 | + * @return string |
|
| 48 | + */ |
|
| 49 | + public function getMaximumVersion() { |
|
| 50 | + return $this->maxVersion; |
|
| 51 | + } |
|
| 52 | 52 | } |
@@ -28,41 +28,41 @@ |
||
| 28 | 28 | use OCP\Preview\IProvider; |
| 29 | 29 | |
| 30 | 30 | abstract class Provider implements IProvider { |
| 31 | - private $options; |
|
| 31 | + private $options; |
|
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * Constructor |
|
| 35 | - * |
|
| 36 | - * @param array $options |
|
| 37 | - */ |
|
| 38 | - public function __construct(array $options = []) { |
|
| 39 | - $this->options = $options; |
|
| 40 | - } |
|
| 33 | + /** |
|
| 34 | + * Constructor |
|
| 35 | + * |
|
| 36 | + * @param array $options |
|
| 37 | + */ |
|
| 38 | + public function __construct(array $options = []) { |
|
| 39 | + $this->options = $options; |
|
| 40 | + } |
|
| 41 | 41 | |
| 42 | - /** |
|
| 43 | - * @return string Regex with the mimetypes that are supported by this provider |
|
| 44 | - */ |
|
| 45 | - abstract public function getMimeType(); |
|
| 42 | + /** |
|
| 43 | + * @return string Regex with the mimetypes that are supported by this provider |
|
| 44 | + */ |
|
| 45 | + abstract public function getMimeType(); |
|
| 46 | 46 | |
| 47 | - /** |
|
| 48 | - * Check if a preview can be generated for $path |
|
| 49 | - * |
|
| 50 | - * @param \OCP\Files\FileInfo $file |
|
| 51 | - * @return bool |
|
| 52 | - */ |
|
| 53 | - public function isAvailable(\OCP\Files\FileInfo $file) { |
|
| 54 | - return true; |
|
| 55 | - } |
|
| 47 | + /** |
|
| 48 | + * Check if a preview can be generated for $path |
|
| 49 | + * |
|
| 50 | + * @param \OCP\Files\FileInfo $file |
|
| 51 | + * @return bool |
|
| 52 | + */ |
|
| 53 | + public function isAvailable(\OCP\Files\FileInfo $file) { |
|
| 54 | + return true; |
|
| 55 | + } |
|
| 56 | 56 | |
| 57 | - /** |
|
| 58 | - * Generates thumbnail which fits in $maxX and $maxY and keeps the aspect ratio, for file at path $path |
|
| 59 | - * |
|
| 60 | - * @param string $path Path of file |
|
| 61 | - * @param int $maxX The maximum X size of the thumbnail. It can be smaller depending on the shape of the image |
|
| 62 | - * @param int $maxY The maximum Y size of the thumbnail. It can be smaller depending on the shape of the image |
|
| 63 | - * @param bool $scalingup Disable/Enable upscaling of previews |
|
| 64 | - * @param \OC\Files\View $fileview fileview object of user folder |
|
| 65 | - * @return bool|\OCP\IImage false if no preview was generated |
|
| 66 | - */ |
|
| 67 | - abstract public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview); |
|
| 57 | + /** |
|
| 58 | + * Generates thumbnail which fits in $maxX and $maxY and keeps the aspect ratio, for file at path $path |
|
| 59 | + * |
|
| 60 | + * @param string $path Path of file |
|
| 61 | + * @param int $maxX The maximum X size of the thumbnail. It can be smaller depending on the shape of the image |
|
| 62 | + * @param int $maxY The maximum Y size of the thumbnail. It can be smaller depending on the shape of the image |
|
| 63 | + * @param bool $scalingup Disable/Enable upscaling of previews |
|
| 64 | + * @param \OC\Files\View $fileview fileview object of user folder |
|
| 65 | + * @return bool|\OCP\IImage false if no preview was generated |
|
| 66 | + */ |
|
| 67 | + abstract public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview); |
|
| 68 | 68 | } |
@@ -27,12 +27,12 @@ |
||
| 27 | 27 | |
| 28 | 28 | class ModuleAlreadyExistsException extends GenericEncryptionException { |
| 29 | 29 | |
| 30 | - /** |
|
| 31 | - * @param string $id |
|
| 32 | - * @param string $name |
|
| 33 | - */ |
|
| 34 | - public function __construct($id, $name) { |
|
| 35 | - parent::__construct('Id "' . $id . '" already used by encryption module "' . $name . '"'); |
|
| 36 | - } |
|
| 30 | + /** |
|
| 31 | + * @param string $id |
|
| 32 | + * @param string $name |
|
| 33 | + */ |
|
| 34 | + public function __construct($id, $name) { |
|
| 35 | + parent::__construct('Id "' . $id . '" already used by encryption module "' . $name . '"'); |
|
| 36 | + } |
|
| 37 | 37 | |
| 38 | 38 | } |
@@ -27,10 +27,10 @@ |
||
| 27 | 27 | |
| 28 | 28 | class EncryptionHeaderKeyExistsException extends GenericEncryptionException { |
| 29 | 29 | |
| 30 | - /** |
|
| 31 | - * @param string $key |
|
| 32 | - */ |
|
| 33 | - public function __construct($key) { |
|
| 34 | - parent::__construct('header key "'. $key . '" already reserved by ownCloud'); |
|
| 35 | - } |
|
| 30 | + /** |
|
| 31 | + * @param string $key |
|
| 32 | + */ |
|
| 33 | + public function __construct($key) { |
|
| 34 | + parent::__construct('header key "'. $key . '" already reserved by ownCloud'); |
|
| 35 | + } |
|
| 36 | 36 | } |
@@ -26,8 +26,8 @@ |
||
| 26 | 26 | $server = \OC::$server; |
| 27 | 27 | |
| 28 | 28 | $controller = new \OC\OCS\Provider( |
| 29 | - 'ocs_provider', |
|
| 30 | - $server->getRequest(), |
|
| 31 | - $server->getAppManager() |
|
| 29 | + 'ocs_provider', |
|
| 30 | + $server->getRequest(), |
|
| 31 | + $server->getAppManager() |
|
| 32 | 32 | ); |
| 33 | 33 | echo $controller->buildProviderList()->render(); |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | */ |
| 22 | 22 | // no php execution timeout for webdav |
| 23 | 23 | if (strpos(@ini_get('disable_functions'), 'set_time_limit') === false) { |
| 24 | - @set_time_limit(0); |
|
| 24 | + @set_time_limit(0); |
|
| 25 | 25 | } |
| 26 | 26 | ignore_user_abort(true); |
| 27 | 27 | |
@@ -37,57 +37,57 @@ |
||
| 37 | 37 | */ |
| 38 | 38 | class ConsoleOutput implements IOutput { |
| 39 | 39 | |
| 40 | - /** @var OutputInterface */ |
|
| 41 | - private $output; |
|
| 40 | + /** @var OutputInterface */ |
|
| 41 | + private $output; |
|
| 42 | 42 | |
| 43 | - /** @var ProgressBar */ |
|
| 44 | - private $progressBar; |
|
| 43 | + /** @var ProgressBar */ |
|
| 44 | + private $progressBar; |
|
| 45 | 45 | |
| 46 | - public function __construct(OutputInterface $output) { |
|
| 47 | - $this->output = $output; |
|
| 48 | - } |
|
| 46 | + public function __construct(OutputInterface $output) { |
|
| 47 | + $this->output = $output; |
|
| 48 | + } |
|
| 49 | 49 | |
| 50 | - /** |
|
| 51 | - * @param string $message |
|
| 52 | - */ |
|
| 53 | - public function info($message) { |
|
| 54 | - $this->output->writeln("<info>$message</info>"); |
|
| 55 | - } |
|
| 50 | + /** |
|
| 51 | + * @param string $message |
|
| 52 | + */ |
|
| 53 | + public function info($message) { |
|
| 54 | + $this->output->writeln("<info>$message</info>"); |
|
| 55 | + } |
|
| 56 | 56 | |
| 57 | - /** |
|
| 58 | - * @param string $message |
|
| 59 | - */ |
|
| 60 | - public function warning($message) { |
|
| 61 | - $this->output->writeln("<comment>$message</comment>"); |
|
| 62 | - } |
|
| 57 | + /** |
|
| 58 | + * @param string $message |
|
| 59 | + */ |
|
| 60 | + public function warning($message) { |
|
| 61 | + $this->output->writeln("<comment>$message</comment>"); |
|
| 62 | + } |
|
| 63 | 63 | |
| 64 | - /** |
|
| 65 | - * @param int $max |
|
| 66 | - */ |
|
| 67 | - public function startProgress($max = 0) { |
|
| 68 | - if (!is_null($this->progressBar)) { |
|
| 69 | - $this->progressBar->finish(); |
|
| 70 | - } |
|
| 71 | - $this->progressBar = new ProgressBar($this->output); |
|
| 72 | - $this->progressBar->start($max); |
|
| 73 | - } |
|
| 64 | + /** |
|
| 65 | + * @param int $max |
|
| 66 | + */ |
|
| 67 | + public function startProgress($max = 0) { |
|
| 68 | + if (!is_null($this->progressBar)) { |
|
| 69 | + $this->progressBar->finish(); |
|
| 70 | + } |
|
| 71 | + $this->progressBar = new ProgressBar($this->output); |
|
| 72 | + $this->progressBar->start($max); |
|
| 73 | + } |
|
| 74 | 74 | |
| 75 | - /** |
|
| 76 | - * @param int $step |
|
| 77 | - * @param string $description |
|
| 78 | - */ |
|
| 79 | - public function advance($step = 1, $description = '') { |
|
| 80 | - if (!is_null($this->progressBar)) { |
|
| 81 | - $this->progressBar = new ProgressBar($this->output); |
|
| 82 | - $this->progressBar->start(); |
|
| 83 | - } |
|
| 84 | - $this->progressBar->advance($step); |
|
| 85 | - } |
|
| 75 | + /** |
|
| 76 | + * @param int $step |
|
| 77 | + * @param string $description |
|
| 78 | + */ |
|
| 79 | + public function advance($step = 1, $description = '') { |
|
| 80 | + if (!is_null($this->progressBar)) { |
|
| 81 | + $this->progressBar = new ProgressBar($this->output); |
|
| 82 | + $this->progressBar->start(); |
|
| 83 | + } |
|
| 84 | + $this->progressBar->advance($step); |
|
| 85 | + } |
|
| 86 | 86 | |
| 87 | - public function finishProgress() { |
|
| 88 | - if (is_null($this->progressBar)) { |
|
| 89 | - return; |
|
| 90 | - } |
|
| 91 | - $this->progressBar->finish(); |
|
| 92 | - } |
|
| 87 | + public function finishProgress() { |
|
| 88 | + if (is_null($this->progressBar)) { |
|
| 89 | + return; |
|
| 90 | + } |
|
| 91 | + $this->progressBar->finish(); |
|
| 92 | + } |
|
| 93 | 93 | } |