Passed
Push — master ( 630edd...09718c )
by Morris
14:42 queued 10s
created
lib/private/DB/PostgreSqlMigrator.php 1 patch
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -25,32 +25,32 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
lib/private/DB/AdapterMySQL.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -27,31 +27,31 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
lib/private/App/AppStore/Version/Version.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -22,31 +22,31 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
lib/private/Preview/Provider.php 1 patch
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -28,41 +28,41 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
lib/private/Encryption/Exceptions/ModuleAlreadyExistsException.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -27,12 +27,12 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
lib/private/Encryption/Exceptions/EncryptionHeaderKeyExistsException.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,10 +27,10 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
ocs-provider/index.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
core/Command/Config/System/Base.php 1 patch
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -26,53 +26,53 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
core/Command/Config/App/Base.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -26,23 +26,23 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.