Passed
Push — master ( 348454...c8160a )
by Joas
15:07 queued 14s
created
lib/public/FullTextSearch/Service/ISearchService.php 1 patch
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -45,45 +45,45 @@
 block discarded – undo
45 45
 interface ISearchService {
46 46
 
47 47
 
48
-	/**
49
-	 * generate a search request, based on an array:
50
-	 *
51
-	 * $request =
52
-	 *   [
53
-	 *        'providers' =>    (string/array) 'all'
54
-	 *        'author' =>       (string) owner of the document.
55
-	 *        'search' =>       (string) search string,
56
-	 *        'size' =>         (int) number of items to be return
57
-	 *        'page' =>         (int) page
58
-	 *        'parts' =>        (array) parts of document to search within,
59
-	 *        'options' =       (array) search options,
60
-	 *        'tags'     =>     (array) tags,
61
-	 *        'metatags' =>     (array) metatags,
62
-	 *        'subtags'  =>     (array) subtags
63
-	 *   ]
64
-	 *
65
-	 * 'providers' can be an array of providerIds
66
-	 *
67
-	 * @since 15.0.0
68
-	 *
69
-	 * @param array $request
70
-	 *
71
-	 * @return ISearchRequest
72
-	 */
73
-	public function generateSearchRequest(array $request): ISearchRequest;
48
+    /**
49
+     * generate a search request, based on an array:
50
+     *
51
+     * $request =
52
+     *   [
53
+     *        'providers' =>    (string/array) 'all'
54
+     *        'author' =>       (string) owner of the document.
55
+     *        'search' =>       (string) search string,
56
+     *        'size' =>         (int) number of items to be return
57
+     *        'page' =>         (int) page
58
+     *        'parts' =>        (array) parts of document to search within,
59
+     *        'options' =       (array) search options,
60
+     *        'tags'     =>     (array) tags,
61
+     *        'metatags' =>     (array) metatags,
62
+     *        'subtags'  =>     (array) subtags
63
+     *   ]
64
+     *
65
+     * 'providers' can be an array of providerIds
66
+     *
67
+     * @since 15.0.0
68
+     *
69
+     * @param array $request
70
+     *
71
+     * @return ISearchRequest
72
+     */
73
+    public function generateSearchRequest(array $request): ISearchRequest;
74 74
 
75 75
 
76
-	/**
77
-	 * Search documents
78
-	 *
79
-	 * @since 15.0.0
80
-	 *
81
-	 * @param string $userId
82
-	 * @param ISearchRequest $searchRequest
83
-	 *
84
-	 * @return ISearchResult[]
85
-	 */
86
-	public function search(string $userId, ISearchRequest $searchRequest): array;
76
+    /**
77
+     * Search documents
78
+     *
79
+     * @since 15.0.0
80
+     *
81
+     * @param string $userId
82
+     * @param ISearchRequest $searchRequest
83
+     *
84
+     * @return ISearchResult[]
85
+     */
86
+    public function search(string $userId, ISearchRequest $searchRequest): array;
87 87
 
88 88
 }
89 89
 
Please login to merge, or discard this patch.
lib/public/FullTextSearch/Service/IProviderService.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -41,24 +41,24 @@
 block discarded – undo
41 41
 interface IProviderService {
42 42
 
43 43
 
44
-	/**
45
-	 * Check if the provider $providerId is already indexed.
46
-	 *
47
-	 * @since 15.0.0
48
-	 *
49
-	 * @param string $providerId
50
-	 *
51
-	 * @return bool
52
-	 */
53
-	public function isProviderIndexed(string $providerId);
44
+    /**
45
+     * Check if the provider $providerId is already indexed.
46
+     *
47
+     * @since 15.0.0
48
+     *
49
+     * @param string $providerId
50
+     *
51
+     * @return bool
52
+     */
53
+    public function isProviderIndexed(string $providerId);
54 54
 
55 55
 
56
-	/**
57
-	 * Add the Javascript API in the navigation page of an app.
58
-	 *
59
-	 * @since 15.0.0
60
-	 */
61
-	public function addJavascriptAPI();
56
+    /**
57
+     * Add the Javascript API in the navigation page of an app.
58
+     *
59
+     * @since 15.0.0
60
+     */
61
+    public function addJavascriptAPI();
62 62
 
63 63
 
64 64
 }
Please login to merge, or discard this patch.
lib/public/FullTextSearch/Model/IIndexOptions.php 1 patch
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -46,41 +46,41 @@
 block discarded – undo
46 46
 interface IIndexOptions {
47 47
 
48 48
 
49
-	/**
50
-	 * Get the value (as a string) for an option.
51
-	 *
52
-	 * @since 15.0.0
53
-	 *
54
-	 * @param string $option
55
-	 * @param string $default
56
-	 *
57
-	 * @return string
58
-	 */
59
-	public function getOption(string $option, string $default = ''): string;
49
+    /**
50
+     * Get the value (as a string) for an option.
51
+     *
52
+     * @since 15.0.0
53
+     *
54
+     * @param string $option
55
+     * @param string $default
56
+     *
57
+     * @return string
58
+     */
59
+    public function getOption(string $option, string $default = ''): string;
60 60
 
61
-	/**
62
-	 * Get the value (as an array) for an option.
63
-	 *
64
-	 * @since 15.0.0
65
-	 *
66
-	 * @param string $option
67
-	 * @param array $default
68
-	 *
69
-	 * @return array
70
-	 */
71
-	public function getOptionArray(string $option, array $default = []): array;
61
+    /**
62
+     * Get the value (as an array) for an option.
63
+     *
64
+     * @since 15.0.0
65
+     *
66
+     * @param string $option
67
+     * @param array $default
68
+     *
69
+     * @return array
70
+     */
71
+    public function getOptionArray(string $option, array $default = []): array;
72 72
 
73
-	/**
74
-	 * Get the value (as an boolean) for an option.
75
-	 *
76
-	 * @since 15.0.0
77
-	 *
78
-	 * @param string $option
79
-	 * @param bool $default
80
-	 *
81
-	 * @return bool
82
-	 */
83
-	public function getOptionBool(string $option, bool $default): bool;
73
+    /**
74
+     * Get the value (as an boolean) for an option.
75
+     *
76
+     * @since 15.0.0
77
+     *
78
+     * @param string $option
79
+     * @param bool $default
80
+     *
81
+     * @return bool
82
+     */
83
+    public function getOptionBool(string $option, bool $default): bool;
84 84
 
85 85
 }
86 86
 
Please login to merge, or discard this patch.
lib/private/Authentication/Exceptions/ExpiredTokenException.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -26,16 +26,16 @@
 block discarded – undo
26 26
 use OC\Authentication\Token\IToken;
27 27
 
28 28
 class ExpiredTokenException extends InvalidTokenException {
29
-	/** @var IToken */
30
-	private $token;
29
+    /** @var IToken */
30
+    private $token;
31 31
 
32
-	public function __construct(IToken $token) {
33
-		parent::__construct();
32
+    public function __construct(IToken $token) {
33
+        parent::__construct();
34 34
 
35
-		$this->token = $token;
36
-	}
35
+        $this->token = $token;
36
+    }
37 37
 
38
-	public function getToken(): IToken {
39
-		return $this->token;
40
-	}
38
+    public function getToken(): IToken {
39
+        return $this->token;
40
+    }
41 41
 }
Please login to merge, or discard this patch.
apps/files_versions/lib/Versions/IVersionManager.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -25,12 +25,12 @@
 block discarded – undo
25 25
  * @since 15.0.0
26 26
  */
27 27
 interface IVersionManager extends IVersionBackend {
28
-	/**
29
-	 * Register a new backend
30
-	 *
31
-	 * @param string $storageType
32
-	 * @param IVersionBackend $backend
33
-	 * @since 15.0.0
34
-	 */
35
-	public function registerBackend(string $storageType, IVersionBackend $backend);
28
+    /**
29
+     * Register a new backend
30
+     *
31
+     * @param string $storageType
32
+     * @param IVersionBackend $backend
33
+     * @since 15.0.0
34
+     */
35
+    public function registerBackend(string $storageType, IVersionBackend $backend);
36 36
 }
Please login to merge, or discard this patch.
apps/files_versions/lib/Sabre/VersionRoot.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
 	public function getChild($name) {
72 72
 		$userFolder = $this->rootFolder->getUserFolder($this->user->getUID());
73 73
 
74
-		$fileId = (int)$name;
74
+		$fileId = (int) $name;
75 75
 		$nodes = $userFolder->getById($fileId);
76 76
 
77 77
 		if ($nodes === []) {
Please login to merge, or discard this patch.
Indentation   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -36,74 +36,74 @@
 block discarded – undo
36 36
 
37 37
 class VersionRoot implements ICollection {
38 38
 
39
-	/** @var IUser */
40
-	private $user;
39
+    /** @var IUser */
40
+    private $user;
41 41
 
42
-	/** @var IRootFolder */
43
-	private $rootFolder;
42
+    /** @var IRootFolder */
43
+    private $rootFolder;
44 44
 
45
-	/** @var IVersionManager */
46
-	private $versionManager;
45
+    /** @var IVersionManager */
46
+    private $versionManager;
47 47
 
48
-	public function __construct(IUser $user, IRootFolder $rootFolder, IVersionManager $versionManager) {
49
-		$this->user = $user;
50
-		$this->rootFolder = $rootFolder;
51
-		$this->versionManager = $versionManager;
52
-	}
48
+    public function __construct(IUser $user, IRootFolder $rootFolder, IVersionManager $versionManager) {
49
+        $this->user = $user;
50
+        $this->rootFolder = $rootFolder;
51
+        $this->versionManager = $versionManager;
52
+    }
53 53
 
54
-	public function delete() {
55
-		throw new Forbidden();
56
-	}
54
+    public function delete() {
55
+        throw new Forbidden();
56
+    }
57 57
 
58
-	public function getName(): string {
59
-		return 'versions';
60
-	}
58
+    public function getName(): string {
59
+        return 'versions';
60
+    }
61 61
 
62
-	public function setName($name) {
63
-		throw new Forbidden();
64
-	}
62
+    public function setName($name) {
63
+        throw new Forbidden();
64
+    }
65 65
 
66
-	public function createFile($name, $data = null) {
67
-		throw new Forbidden();
68
-	}
66
+    public function createFile($name, $data = null) {
67
+        throw new Forbidden();
68
+    }
69 69
 
70
-	public function createDirectory($name) {
71
-		throw new Forbidden();
72
-	}
70
+    public function createDirectory($name) {
71
+        throw new Forbidden();
72
+    }
73 73
 
74
-	public function getChild($name) {
75
-		$userFolder = $this->rootFolder->getUserFolder($this->user->getUID());
74
+    public function getChild($name) {
75
+        $userFolder = $this->rootFolder->getUserFolder($this->user->getUID());
76 76
 
77
-		$fileId = (int)$name;
78
-		$nodes = $userFolder->getById($fileId);
77
+        $fileId = (int)$name;
78
+        $nodes = $userFolder->getById($fileId);
79 79
 
80
-		if ($nodes === []) {
81
-			throw new NotFound();
82
-		}
80
+        if ($nodes === []) {
81
+            throw new NotFound();
82
+        }
83 83
 
84
-		$node = array_pop($nodes);
84
+        $node = array_pop($nodes);
85 85
 
86
-		if (!$node instanceof File) {
87
-			throw new NotFound();
88
-		}
86
+        if (!$node instanceof File) {
87
+            throw new NotFound();
88
+        }
89 89
 
90
-		return new VersionCollection($node, $this->user, $this->versionManager);
91
-	}
90
+        return new VersionCollection($node, $this->user, $this->versionManager);
91
+    }
92 92
 
93
-	public function getChildren(): array {
94
-		return [];
95
-	}
93
+    public function getChildren(): array {
94
+        return [];
95
+    }
96 96
 
97
-	public function childExists($name): bool {
98
-		try {
99
-			$this->getChild($name);
100
-			return true;
101
-		} catch (NotFound $e) {
102
-			return false;
103
-		}
104
-	}
97
+    public function childExists($name): bool {
98
+        try {
99
+            $this->getChild($name);
100
+            return true;
101
+        } catch (NotFound $e) {
102
+            return false;
103
+        }
104
+    }
105 105
 
106
-	public function getLastModified(): int {
107
-		return 0;
108
-	}
106
+    public function getLastModified(): int {
107
+        return 0;
108
+    }
109 109
 }
Please login to merge, or discard this patch.
apps/files_versions/lib/Sabre/VersionFile.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 	}
61 61
 
62 62
 	public function getETag(): string {
63
-		return (string)$this->version->getRevisionId();
63
+		return (string) $this->version->getRevisionId();
64 64
 	}
65 65
 
66 66
 	public function getSize(): int {
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 	}
73 73
 
74 74
 	public function getName(): string {
75
-		return (string)$this->version->getRevisionId();
75
+		return (string) $this->version->getRevisionId();
76 76
 	}
77 77
 
78 78
 	public function setName($name) {
Please login to merge, or discard this patch.
Indentation   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -32,62 +32,62 @@
 block discarded – undo
32 32
 use Sabre\DAV\IFile;
33 33
 
34 34
 class VersionFile implements IFile {
35
-	/** @var IVersion */
36
-	private $version;
37
-
38
-	/** @var IVersionManager */
39
-	private $versionManager;
40
-
41
-	public function __construct(IVersion $version, IVersionManager $versionManager) {
42
-		$this->version = $version;
43
-		$this->versionManager = $versionManager;
44
-	}
45
-
46
-	public function put($data) {
47
-		throw new Forbidden();
48
-	}
49
-
50
-	public function get() {
51
-		try {
52
-			return $this->versionManager->read($this->version);
53
-		} catch (NotFoundException $e) {
54
-			throw new NotFound();
55
-		}
56
-	}
57
-
58
-	public function getContentType(): string {
59
-		return $this->version->getMimeType();
60
-	}
61
-
62
-	public function getETag(): string {
63
-		return (string)$this->version->getRevisionId();
64
-	}
65
-
66
-	public function getSize(): int {
67
-		return $this->version->getSize();
68
-	}
69
-
70
-	public function delete() {
71
-		throw new Forbidden();
72
-	}
73
-
74
-	public function getName(): string {
75
-		return (string)$this->version->getRevisionId();
76
-	}
77
-
78
-	public function setName($name) {
79
-		throw new Forbidden();
80
-	}
81
-
82
-	public function getLastModified(): int {
83
-		return $this->version->getTimestamp();
84
-	}
85
-
86
-	public function rollBack() {
87
-		$this->versionManager->rollback($this->version);
88
-	}
89
-
90
-	public function getVersion(): IVersion {
91
-		return $this->version;
92
-	}
35
+    /** @var IVersion */
36
+    private $version;
37
+
38
+    /** @var IVersionManager */
39
+    private $versionManager;
40
+
41
+    public function __construct(IVersion $version, IVersionManager $versionManager) {
42
+        $this->version = $version;
43
+        $this->versionManager = $versionManager;
44
+    }
45
+
46
+    public function put($data) {
47
+        throw new Forbidden();
48
+    }
49
+
50
+    public function get() {
51
+        try {
52
+            return $this->versionManager->read($this->version);
53
+        } catch (NotFoundException $e) {
54
+            throw new NotFound();
55
+        }
56
+    }
57
+
58
+    public function getContentType(): string {
59
+        return $this->version->getMimeType();
60
+    }
61
+
62
+    public function getETag(): string {
63
+        return (string)$this->version->getRevisionId();
64
+    }
65
+
66
+    public function getSize(): int {
67
+        return $this->version->getSize();
68
+    }
69
+
70
+    public function delete() {
71
+        throw new Forbidden();
72
+    }
73
+
74
+    public function getName(): string {
75
+        return (string)$this->version->getRevisionId();
76
+    }
77
+
78
+    public function setName($name) {
79
+        throw new Forbidden();
80
+    }
81
+
82
+    public function getLastModified(): int {
83
+        return $this->version->getTimestamp();
84
+    }
85
+
86
+    public function rollBack() {
87
+        $this->versionManager->rollback($this->version);
88
+    }
89
+
90
+    public function getVersion(): IVersion {
91
+        return $this->version;
92
+    }
93 93
 }
Please login to merge, or discard this patch.
apps/files_versions/lib/Sabre/VersionCollection.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	public function getChildren(): array {
79 79
 		$versions = $this->versionManager->getVersionsForFile($this->user, $this->file);
80 80
 
81
-		return array_map(function (IVersion $version) {
81
+		return array_map(function(IVersion $version) {
82 82
 			return new VersionFile($version, $this->versionManager);
83 83
 		}, $versions);
84 84
 	}
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	}
98 98
 
99 99
 	public function getName(): string {
100
-		return (string)$this->file->getId();
100
+		return (string) $this->file->getId();
101 101
 	}
102 102
 
103 103
 	public function setName($name) {
Please login to merge, or discard this patch.
Indentation   +68 added lines, -68 removed lines patch added patch discarded remove patch
@@ -36,72 +36,72 @@
 block discarded – undo
36 36
 
37 37
 class VersionCollection implements ICollection {
38 38
 
39
-	/** @var File */
40
-	private $file;
41
-
42
-	/** @var IUser */
43
-	private $user;
44
-
45
-	/** @var IVersionManager */
46
-	private $versionManager;
47
-
48
-	public function __construct(File $file, IUser $user, IVersionManager $versionManager) {
49
-		$this->file = $file;
50
-		$this->user = $user;
51
-		$this->versionManager = $versionManager;
52
-	}
53
-
54
-	public function createFile($name, $data = null) {
55
-		throw new Forbidden();
56
-	}
57
-
58
-	public function createDirectory($name) {
59
-		throw new Forbidden();
60
-	}
61
-
62
-	public function getChild($name) {
63
-		/** @var VersionFile[] $versions */
64
-		$versions = $this->getChildren();
65
-
66
-		foreach ($versions as $version) {
67
-			if ($version->getName() === $name) {
68
-				return $version;
69
-			}
70
-		}
71
-
72
-		throw new NotFound();
73
-	}
74
-
75
-	public function getChildren(): array {
76
-		$versions = $this->versionManager->getVersionsForFile($this->user, $this->file);
77
-
78
-		return array_map(function (IVersion $version) {
79
-			return new VersionFile($version, $this->versionManager);
80
-		}, $versions);
81
-	}
82
-
83
-	public function childExists($name): bool {
84
-		try {
85
-			$this->getChild($name);
86
-			return true;
87
-		} catch (NotFound $e) {
88
-			return false;
89
-		}
90
-	}
91
-
92
-	public function delete() {
93
-		throw new Forbidden();
94
-	}
95
-
96
-	public function getName(): string {
97
-		return (string)$this->file->getId();
98
-	}
99
-
100
-	public function setName($name) {
101
-		throw new Forbidden();
102
-	}
103
-
104
-	public function getLastModified(): int {
105
-		return 0;
106
-	}
39
+    /** @var File */
40
+    private $file;
41
+
42
+    /** @var IUser */
43
+    private $user;
44
+
45
+    /** @var IVersionManager */
46
+    private $versionManager;
47
+
48
+    public function __construct(File $file, IUser $user, IVersionManager $versionManager) {
49
+        $this->file = $file;
50
+        $this->user = $user;
51
+        $this->versionManager = $versionManager;
52
+    }
53
+
54
+    public function createFile($name, $data = null) {
55
+        throw new Forbidden();
56
+    }
57
+
58
+    public function createDirectory($name) {
59
+        throw new Forbidden();
60
+    }
61
+
62
+    public function getChild($name) {
63
+        /** @var VersionFile[] $versions */
64
+        $versions = $this->getChildren();
65
+
66
+        foreach ($versions as $version) {
67
+            if ($version->getName() === $name) {
68
+                return $version;
69
+            }
70
+        }
71
+
72
+        throw new NotFound();
73
+    }
74
+
75
+    public function getChildren(): array {
76
+        $versions = $this->versionManager->getVersionsForFile($this->user, $this->file);
77
+
78
+        return array_map(function (IVersion $version) {
79
+            return new VersionFile($version, $this->versionManager);
80
+        }, $versions);
81
+    }
82
+
83
+    public function childExists($name): bool {
84
+        try {
85
+            $this->getChild($name);
86
+            return true;
87
+        } catch (NotFound $e) {
88
+            return false;
89
+        }
90
+    }
91
+
92
+    public function delete() {
93
+        throw new Forbidden();
94
+    }
95
+
96
+    public function getName(): string {
97
+        return (string)$this->file->getId();
98
+    }
99
+
100
+    public function setName($name) {
101
+        throw new Forbidden();
102
+    }
103
+
104
+    public function getLastModified(): int {
105
+        return 0;
106
+    }
107 107
 }
Please login to merge, or discard this patch.
core/Migrations/Version15000Date20181029084625.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -31,23 +31,23 @@
 block discarded – undo
31 31
 
32 32
 class Version15000Date20181029084625 extends SimpleMigrationStep {
33 33
 
34
-	/**
35
-	 * @param IOutput $output
36
-	 * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
37
-	 * @param array $options
38
-	 * @return null|ISchemaWrapper
39
-	 */
40
-	public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
41
-		/** @var ISchemaWrapper $schema */
42
-		$schema = $schemaClosure();
34
+    /**
35
+     * @param IOutput $output
36
+     * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
37
+     * @param array $options
38
+     * @return null|ISchemaWrapper
39
+     */
40
+    public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
41
+        /** @var ISchemaWrapper $schema */
42
+        $schema = $schemaClosure();
43 43
 
44
-		$table = $schema->getTable('share');
45
-		$table->addColumn('label', 'string', [
46
-			'notnull' => false,
47
-			'length' => 255,
48
-		]);
44
+        $table = $schema->getTable('share');
45
+        $table->addColumn('label', 'string', [
46
+            'notnull' => false,
47
+            'length' => 255,
48
+        ]);
49 49
 
50
-		return $schema;
51
-	}
50
+        return $schema;
51
+    }
52 52
 
53 53
 }
Please login to merge, or discard this patch.