@@ -27,31 +27,31 @@ |
||
27 | 27 | |
28 | 28 | class AdapterMySQL extends Adapter { |
29 | 29 | |
30 | - /** @var string */ |
|
31 | - protected $charset; |
|
32 | - |
|
33 | - /** |
|
34 | - * @param string $tableName |
|
35 | - */ |
|
36 | - public function lockTable($tableName) { |
|
37 | - $this->conn->executeUpdate('LOCK TABLES `' .$tableName . '` WRITE'); |
|
38 | - } |
|
39 | - |
|
40 | - public function unlockTable() { |
|
41 | - $this->conn->executeUpdate('UNLOCK TABLES'); |
|
42 | - } |
|
43 | - |
|
44 | - public function fixupStatement($statement) { |
|
45 | - $statement = str_replace(' ILIKE ', ' COLLATE ' . $this->getCharset() . '_general_ci LIKE ', $statement); |
|
46 | - return $statement; |
|
47 | - } |
|
48 | - |
|
49 | - protected function getCharset() { |
|
50 | - if (!$this->charset) { |
|
51 | - $params = $this->conn->getParams(); |
|
52 | - $this->charset = isset($params['charset']) ? $params['charset'] : 'utf8'; |
|
53 | - } |
|
54 | - |
|
55 | - return $this->charset; |
|
56 | - } |
|
30 | + /** @var string */ |
|
31 | + protected $charset; |
|
32 | + |
|
33 | + /** |
|
34 | + * @param string $tableName |
|
35 | + */ |
|
36 | + public function lockTable($tableName) { |
|
37 | + $this->conn->executeUpdate('LOCK TABLES `' .$tableName . '` WRITE'); |
|
38 | + } |
|
39 | + |
|
40 | + public function unlockTable() { |
|
41 | + $this->conn->executeUpdate('UNLOCK TABLES'); |
|
42 | + } |
|
43 | + |
|
44 | + public function fixupStatement($statement) { |
|
45 | + $statement = str_replace(' ILIKE ', ' COLLATE ' . $this->getCharset() . '_general_ci LIKE ', $statement); |
|
46 | + return $statement; |
|
47 | + } |
|
48 | + |
|
49 | + protected function getCharset() { |
|
50 | + if (!$this->charset) { |
|
51 | + $params = $this->conn->getParams(); |
|
52 | + $this->charset = isset($params['charset']) ? $params['charset'] : 'utf8'; |
|
53 | + } |
|
54 | + |
|
55 | + return $this->charset; |
|
56 | + } |
|
57 | 57 | } |
@@ -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(); |
@@ -26,53 +26,53 @@ |
||
26 | 26 | |
27 | 27 | abstract class Base extends \OC\Core\Command\Base { |
28 | 28 | |
29 | - /** @var SystemConfig */ |
|
30 | - protected $systemConfig; |
|
29 | + /** @var SystemConfig */ |
|
30 | + protected $systemConfig; |
|
31 | 31 | |
32 | - /** |
|
33 | - * @param string $argumentName |
|
34 | - * @param CompletionContext $context |
|
35 | - * @return string[] |
|
36 | - */ |
|
37 | - public function completeArgumentValues($argumentName, CompletionContext $context) { |
|
38 | - if ($argumentName === 'name') { |
|
39 | - $words = $this->getPreviousNames($context, $context->getWordIndex()); |
|
40 | - if (empty($words)) { |
|
41 | - $completions = $this->systemConfig->getKeys(); |
|
42 | - } else { |
|
43 | - $key = array_shift($words); |
|
44 | - $value = $this->systemConfig->getValue($key); |
|
45 | - $completions = array_keys($value); |
|
32 | + /** |
|
33 | + * @param string $argumentName |
|
34 | + * @param CompletionContext $context |
|
35 | + * @return string[] |
|
36 | + */ |
|
37 | + public function completeArgumentValues($argumentName, CompletionContext $context) { |
|
38 | + if ($argumentName === 'name') { |
|
39 | + $words = $this->getPreviousNames($context, $context->getWordIndex()); |
|
40 | + if (empty($words)) { |
|
41 | + $completions = $this->systemConfig->getKeys(); |
|
42 | + } else { |
|
43 | + $key = array_shift($words); |
|
44 | + $value = $this->systemConfig->getValue($key); |
|
45 | + $completions = array_keys($value); |
|
46 | 46 | |
47 | - while (!empty($words) && is_array($value)) { |
|
48 | - $key = array_shift($words); |
|
49 | - if (!isset($value[$key]) || !is_array($value[$key])) { |
|
50 | - break; |
|
51 | - } |
|
47 | + while (!empty($words) && is_array($value)) { |
|
48 | + $key = array_shift($words); |
|
49 | + if (!isset($value[$key]) || !is_array($value[$key])) { |
|
50 | + break; |
|
51 | + } |
|
52 | 52 | |
53 | - $value = $value[$key]; |
|
54 | - $completions = array_keys($value); |
|
55 | - } |
|
56 | - } |
|
53 | + $value = $value[$key]; |
|
54 | + $completions = array_keys($value); |
|
55 | + } |
|
56 | + } |
|
57 | 57 | |
58 | - return $completions; |
|
59 | - } |
|
60 | - return parent::completeArgumentValues($argumentName, $context); |
|
61 | - } |
|
58 | + return $completions; |
|
59 | + } |
|
60 | + return parent::completeArgumentValues($argumentName, $context); |
|
61 | + } |
|
62 | 62 | |
63 | - /** |
|
64 | - * @param CompletionContext $context |
|
65 | - * @param int $currentIndex |
|
66 | - * @return string[] |
|
67 | - */ |
|
68 | - protected function getPreviousNames(CompletionContext $context, $currentIndex) { |
|
69 | - $word = $context->getWordAtIndex($currentIndex - 1); |
|
70 | - if ($word === $this->getName() || $currentIndex <= 0) { |
|
71 | - return []; |
|
72 | - } |
|
63 | + /** |
|
64 | + * @param CompletionContext $context |
|
65 | + * @param int $currentIndex |
|
66 | + * @return string[] |
|
67 | + */ |
|
68 | + protected function getPreviousNames(CompletionContext $context, $currentIndex) { |
|
69 | + $word = $context->getWordAtIndex($currentIndex - 1); |
|
70 | + if ($word === $this->getName() || $currentIndex <= 0) { |
|
71 | + return []; |
|
72 | + } |
|
73 | 73 | |
74 | - $words = $this->getPreviousNames($context, $currentIndex - 1); |
|
75 | - $words[] = $word; |
|
76 | - return $words; |
|
77 | - } |
|
74 | + $words = $this->getPreviousNames($context, $currentIndex - 1); |
|
75 | + $words[] = $word; |
|
76 | + return $words; |
|
77 | + } |
|
78 | 78 | } |
@@ -26,23 +26,23 @@ |
||
26 | 26 | |
27 | 27 | abstract class Base extends \OC\Core\Command\Base { |
28 | 28 | |
29 | - /** * @var IConfig */ |
|
30 | - protected $config; |
|
29 | + /** * @var IConfig */ |
|
30 | + protected $config; |
|
31 | 31 | |
32 | - /** |
|
33 | - * @param string $argumentName |
|
34 | - * @param CompletionContext $context |
|
35 | - * @return string[] |
|
36 | - */ |
|
37 | - public function completeArgumentValues($argumentName, CompletionContext $context) { |
|
38 | - if ($argumentName === 'app') { |
|
39 | - return \OC_App::getAllApps(); |
|
40 | - } |
|
32 | + /** |
|
33 | + * @param string $argumentName |
|
34 | + * @param CompletionContext $context |
|
35 | + * @return string[] |
|
36 | + */ |
|
37 | + public function completeArgumentValues($argumentName, CompletionContext $context) { |
|
38 | + if ($argumentName === 'app') { |
|
39 | + return \OC_App::getAllApps(); |
|
40 | + } |
|
41 | 41 | |
42 | - if ($argumentName === 'name') { |
|
43 | - $appName = $context->getWordAtIndex($context->getWordIndex() - 1); |
|
44 | - return $this->config->getAppKeys($appName); |
|
45 | - } |
|
46 | - return []; |
|
47 | - } |
|
42 | + if ($argumentName === 'name') { |
|
43 | + $appName = $context->getWordAtIndex($context->getWordIndex() - 1); |
|
44 | + return $this->config->getAppKeys($appName); |
|
45 | + } |
|
46 | + return []; |
|
47 | + } |
|
48 | 48 | } |
@@ -33,33 +33,33 @@ |
||
33 | 33 | */ |
34 | 34 | interface IAction extends JsonSerializable { |
35 | 35 | |
36 | - /** |
|
37 | - * @param string $icon absolute URI to an icon |
|
38 | - * @since 12.0 |
|
39 | - */ |
|
40 | - public function setIcon($icon); |
|
36 | + /** |
|
37 | + * @param string $icon absolute URI to an icon |
|
38 | + * @since 12.0 |
|
39 | + */ |
|
40 | + public function setIcon($icon); |
|
41 | 41 | |
42 | - /** |
|
43 | - * @return string localized action name, e.g. 'Call' |
|
44 | - * @since 12.0 |
|
45 | - */ |
|
46 | - public function getName(); |
|
42 | + /** |
|
43 | + * @return string localized action name, e.g. 'Call' |
|
44 | + * @since 12.0 |
|
45 | + */ |
|
46 | + public function getName(); |
|
47 | 47 | |
48 | - /** |
|
49 | - * @param string $name localized action name, e.g. 'Call' |
|
50 | - * @since 12.0 |
|
51 | - */ |
|
52 | - public function setName($name); |
|
48 | + /** |
|
49 | + * @param string $name localized action name, e.g. 'Call' |
|
50 | + * @since 12.0 |
|
51 | + */ |
|
52 | + public function setName($name); |
|
53 | 53 | |
54 | - /** |
|
55 | - * @param int $priority priorize actions, high order ones are shown on top |
|
56 | - * @since 12.0 |
|
57 | - */ |
|
58 | - public function setPriority($priority); |
|
54 | + /** |
|
55 | + * @param int $priority priorize actions, high order ones are shown on top |
|
56 | + * @since 12.0 |
|
57 | + */ |
|
58 | + public function setPriority($priority); |
|
59 | 59 | |
60 | - /** |
|
61 | - * @return int priority to priorize actions, high order ones are shown on top |
|
62 | - * @since 12.0 |
|
63 | - */ |
|
64 | - public function getPriority(); |
|
60 | + /** |
|
61 | + * @return int priority to priorize actions, high order ones are shown on top |
|
62 | + * @since 12.0 |
|
63 | + */ |
|
64 | + public function getPriority(); |
|
65 | 65 | } |