Completed
Push — master ( ae6394...970eb8 )
by John
31:32 queued 02:08
created
lib/public/DB/QueryBuilder/IFunctionBuilder.php 1 patch
Indentation   +144 added lines, -144 removed lines patch added patch discarded remove patch
@@ -30,162 +30,162 @@
 block discarded – undo
30 30
  * @since 12.0.0
31 31
  */
32 32
 interface IFunctionBuilder {
33
-	/**
34
-	 * Calculates the MD5 hash of a given input
35
-	 *
36
-	 * @param string|ILiteral|IParameter|IQueryFunction $input The input to be hashed
37
-	 *
38
-	 * @return IQueryFunction
39
-	 * @since 12.0.0
40
-	 */
41
-	public function md5($input): IQueryFunction;
33
+    /**
34
+     * Calculates the MD5 hash of a given input
35
+     *
36
+     * @param string|ILiteral|IParameter|IQueryFunction $input The input to be hashed
37
+     *
38
+     * @return IQueryFunction
39
+     * @since 12.0.0
40
+     */
41
+    public function md5($input): IQueryFunction;
42 42
 
43
-	/**
44
-	 * Combines two input strings
45
-	 *
46
-	 * @param string|ILiteral|IParameter|IQueryFunction $x Expressions or literal strings
47
-	 * @param string|ILiteral|IParameter|IQueryFunction ...$exprs Expressions or literal strings
48
-	 *
49
-	 * @return IQueryFunction
50
-	 * @since 12.0.0
51
-	 */
52
-	public function concat($x, ...$expr): IQueryFunction;
43
+    /**
44
+     * Combines two input strings
45
+     *
46
+     * @param string|ILiteral|IParameter|IQueryFunction $x Expressions or literal strings
47
+     * @param string|ILiteral|IParameter|IQueryFunction ...$exprs Expressions or literal strings
48
+     *
49
+     * @return IQueryFunction
50
+     * @since 12.0.0
51
+     */
52
+    public function concat($x, ...$expr): IQueryFunction;
53 53
 
54
-	/**
55
-	 * Returns a string which is the concatenation of all non-NULL values of X
56
-	 *
57
-	 * Usage examples:
58
-	 *
59
-	 * groupConcat('column') -- with comma as separator (default separator)
60
-	 *
61
-	 * groupConcat('column', ';') -- with different separator
62
-	 *
63
-	 * @param string|IQueryFunction $expr The expression to group
64
-	 * @param string|null $separator The separator
65
-	 * @return IQueryFunction
66
-	 * @since 24.0.0
67
-	 */
68
-	public function groupConcat($expr, ?string $separator = ','): IQueryFunction;
54
+    /**
55
+     * Returns a string which is the concatenation of all non-NULL values of X
56
+     *
57
+     * Usage examples:
58
+     *
59
+     * groupConcat('column') -- with comma as separator (default separator)
60
+     *
61
+     * groupConcat('column', ';') -- with different separator
62
+     *
63
+     * @param string|IQueryFunction $expr The expression to group
64
+     * @param string|null $separator The separator
65
+     * @return IQueryFunction
66
+     * @since 24.0.0
67
+     */
68
+    public function groupConcat($expr, ?string $separator = ','): IQueryFunction;
69 69
 
70
-	/**
71
-	 * Takes a substring from the input string
72
-	 *
73
-	 * @param string|ILiteral|IParameter|IQueryFunction $input The input string
74
-	 * @param string|ILiteral|IParameter|IQueryFunction $start The start of the substring, note that counting starts at 1
75
-	 * @param null|ILiteral|IParameter|IQueryFunction $length The length of the substring
76
-	 *
77
-	 * @return IQueryFunction
78
-	 * @since 12.0.0
79
-	 */
80
-	public function substring($input, $start, $length = null): IQueryFunction;
70
+    /**
71
+     * Takes a substring from the input string
72
+     *
73
+     * @param string|ILiteral|IParameter|IQueryFunction $input The input string
74
+     * @param string|ILiteral|IParameter|IQueryFunction $start The start of the substring, note that counting starts at 1
75
+     * @param null|ILiteral|IParameter|IQueryFunction $length The length of the substring
76
+     *
77
+     * @return IQueryFunction
78
+     * @since 12.0.0
79
+     */
80
+    public function substring($input, $start, $length = null): IQueryFunction;
81 81
 
82
-	/**
83
-	 * Takes the sum of all rows in a column
84
-	 *
85
-	 * @param string|ILiteral|IParameter|IQueryFunction $field the column to sum
86
-	 *
87
-	 * @return IQueryFunction
88
-	 * @since 12.0.0
89
-	 */
90
-	public function sum($field): IQueryFunction;
82
+    /**
83
+     * Takes the sum of all rows in a column
84
+     *
85
+     * @param string|ILiteral|IParameter|IQueryFunction $field the column to sum
86
+     *
87
+     * @return IQueryFunction
88
+     * @since 12.0.0
89
+     */
90
+    public function sum($field): IQueryFunction;
91 91
 
92
-	/**
93
-	 * Transforms a string field or value to lower case
94
-	 *
95
-	 * @param string|ILiteral|IParameter|IQueryFunction $field
96
-	 * @return IQueryFunction
97
-	 * @since 14.0.0
98
-	 */
99
-	public function lower($field): IQueryFunction;
92
+    /**
93
+     * Transforms a string field or value to lower case
94
+     *
95
+     * @param string|ILiteral|IParameter|IQueryFunction $field
96
+     * @return IQueryFunction
97
+     * @since 14.0.0
98
+     */
99
+    public function lower($field): IQueryFunction;
100 100
 
101
-	/**
102
-	 * @param string|ILiteral|IParameter|IQueryFunction $x The first input field or number
103
-	 * @param string|ILiteral|IParameter|IQueryFunction $y The second input field or number
104
-	 * @return IQueryFunction
105
-	 * @since 14.0.0
106
-	 */
107
-	public function add($x, $y): IQueryFunction;
101
+    /**
102
+     * @param string|ILiteral|IParameter|IQueryFunction $x The first input field or number
103
+     * @param string|ILiteral|IParameter|IQueryFunction $y The second input field or number
104
+     * @return IQueryFunction
105
+     * @since 14.0.0
106
+     */
107
+    public function add($x, $y): IQueryFunction;
108 108
 
109
-	/**
110
-	 * @param string|ILiteral|IParameter|IQueryFunction $x The first input field or number
111
-	 * @param string|ILiteral|IParameter|IQueryFunction $y The second input field or number
112
-	 * @return IQueryFunction
113
-	 * @since 14.0.0
114
-	 */
115
-	public function subtract($x, $y): IQueryFunction;
109
+    /**
110
+     * @param string|ILiteral|IParameter|IQueryFunction $x The first input field or number
111
+     * @param string|ILiteral|IParameter|IQueryFunction $y The second input field or number
112
+     * @return IQueryFunction
113
+     * @since 14.0.0
114
+     */
115
+    public function subtract($x, $y): IQueryFunction;
116 116
 
117
-	/**
118
-	 * @param string|ILiteral|IParameter|IQueryFunction $count The input to be counted
119
-	 * @param string $alias Alias for the counter
120
-	 *
121
-	 * @return IQueryFunction
122
-	 * @since 14.0.0
123
-	 */
124
-	public function count($count = '', $alias = ''): IQueryFunction;
117
+    /**
118
+     * @param string|ILiteral|IParameter|IQueryFunction $count The input to be counted
119
+     * @param string $alias Alias for the counter
120
+     *
121
+     * @return IQueryFunction
122
+     * @since 14.0.0
123
+     */
124
+    public function count($count = '', $alias = ''): IQueryFunction;
125 125
 
126
-	/**
127
-	 * @param string|ILiteral|IParameter|IQueryFunction $field The input to be measured
128
-	 * @param string $alias Alias for the length
129
-	 *
130
-	 * @return IQueryFunction
131
-	 * @since 24.0.0
132
-	 */
133
-	public function octetLength($field, $alias = ''): IQueryFunction;
126
+    /**
127
+     * @param string|ILiteral|IParameter|IQueryFunction $field The input to be measured
128
+     * @param string $alias Alias for the length
129
+     *
130
+     * @return IQueryFunction
131
+     * @since 24.0.0
132
+     */
133
+    public function octetLength($field, $alias = ''): IQueryFunction;
134 134
 
135
-	/**
136
-	 * @param string|ILiteral|IParameter|IQueryFunction $field The input to be measured
137
-	 * @param string $alias Alias for the length
138
-	 *
139
-	 * @return IQueryFunction
140
-	 * @since 24.0.0
141
-	 */
142
-	public function charLength($field, $alias = ''): IQueryFunction;
135
+    /**
136
+     * @param string|ILiteral|IParameter|IQueryFunction $field The input to be measured
137
+     * @param string $alias Alias for the length
138
+     *
139
+     * @return IQueryFunction
140
+     * @since 24.0.0
141
+     */
142
+    public function charLength($field, $alias = ''): IQueryFunction;
143 143
 
144
-	/**
145
-	 * Takes the maximum of all rows in a column
146
-	 *
147
-	 * If you want to get the maximum value of multiple columns in the same row, use `greatest` instead
148
-	 *
149
-	 * @param string|ILiteral|IParameter|IQueryFunction $field the column to maximum
150
-	 *
151
-	 * @return IQueryFunction
152
-	 * @since 18.0.0
153
-	 */
154
-	public function max($field): IQueryFunction;
144
+    /**
145
+     * Takes the maximum of all rows in a column
146
+     *
147
+     * If you want to get the maximum value of multiple columns in the same row, use `greatest` instead
148
+     *
149
+     * @param string|ILiteral|IParameter|IQueryFunction $field the column to maximum
150
+     *
151
+     * @return IQueryFunction
152
+     * @since 18.0.0
153
+     */
154
+    public function max($field): IQueryFunction;
155 155
 
156
-	/**
157
-	 * Takes the minimum of all rows in a column
158
-	 *
159
-	 * If you want to get the minimum value of multiple columns in the same row, use `least` instead
160
-	 *
161
-	 * @param string|ILiteral|IParameter|IQueryFunction $field the column to minimum
162
-	 *
163
-	 * @return IQueryFunction
164
-	 * @since 18.0.0
165
-	 */
166
-	public function min($field): IQueryFunction;
156
+    /**
157
+     * Takes the minimum of all rows in a column
158
+     *
159
+     * If you want to get the minimum value of multiple columns in the same row, use `least` instead
160
+     *
161
+     * @param string|ILiteral|IParameter|IQueryFunction $field the column to minimum
162
+     *
163
+     * @return IQueryFunction
164
+     * @since 18.0.0
165
+     */
166
+    public function min($field): IQueryFunction;
167 167
 
168
-	/**
169
-	 * Takes the maximum of multiple values
170
-	 *
171
-	 * If you want to get the maximum value of all rows in a column, use `max` instead
172
-	 *
173
-	 * @param string|ILiteral|IParameter|IQueryFunction $x
174
-	 * @param string|ILiteral|IParameter|IQueryFunction $y
175
-	 * @return IQueryFunction
176
-	 * @since 18.0.0
177
-	 */
178
-	public function greatest($x, $y): IQueryFunction;
168
+    /**
169
+     * Takes the maximum of multiple values
170
+     *
171
+     * If you want to get the maximum value of all rows in a column, use `max` instead
172
+     *
173
+     * @param string|ILiteral|IParameter|IQueryFunction $x
174
+     * @param string|ILiteral|IParameter|IQueryFunction $y
175
+     * @return IQueryFunction
176
+     * @since 18.0.0
177
+     */
178
+    public function greatest($x, $y): IQueryFunction;
179 179
 
180
-	/**
181
-	 * Takes the minimum of multiple values
182
-	 *
183
-	 * If you want to get the minimum value of all rows in a column, use `min` instead
184
-	 *
185
-	 * @param string|ILiteral|IParameter|IQueryFunction $x
186
-	 * @param string|ILiteral|IParameter|IQueryFunction $y
187
-	 * @return IQueryFunction
188
-	 * @since 18.0.0
189
-	 */
190
-	public function least($x, $y): IQueryFunction;
180
+    /**
181
+     * Takes the minimum of multiple values
182
+     *
183
+     * If you want to get the minimum value of all rows in a column, use `min` instead
184
+     *
185
+     * @param string|ILiteral|IParameter|IQueryFunction $x
186
+     * @param string|ILiteral|IParameter|IQueryFunction $y
187
+     * @return IQueryFunction
188
+     * @since 18.0.0
189
+     */
190
+    public function least($x, $y): IQueryFunction;
191 191
 }
Please login to merge, or discard this patch.
lib/private/DB/QueryBuilder/FunctionBuilder/SqliteFunctionBuilder.php 1 patch
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -27,37 +27,37 @@
 block discarded – undo
27 27
 use OCP\DB\QueryBuilder\IQueryFunction;
28 28
 
29 29
 class SqliteFunctionBuilder extends FunctionBuilder {
30
-	public function concat($x, ...$expr): IQueryFunction {
31
-		$args = func_get_args();
32
-		$list = [];
33
-		foreach ($args as $item) {
34
-			$list[] = $this->helper->quoteColumnName($item);
35
-		}
36
-		return new QueryFunction(sprintf('(%s)', implode(' || ', $list)));
37
-	}
30
+    public function concat($x, ...$expr): IQueryFunction {
31
+        $args = func_get_args();
32
+        $list = [];
33
+        foreach ($args as $item) {
34
+            $list[] = $this->helper->quoteColumnName($item);
35
+        }
36
+        return new QueryFunction(sprintf('(%s)', implode(' || ', $list)));
37
+    }
38 38
 
39
-	public function groupConcat($expr, ?string $separator = ','): IQueryFunction {
40
-		$separator = $this->connection->quote($separator);
41
-		return new QueryFunction('GROUP_CONCAT(' . $this->helper->quoteColumnName($expr) . ', ' . $separator . ')');
42
-	}
39
+    public function groupConcat($expr, ?string $separator = ','): IQueryFunction {
40
+        $separator = $this->connection->quote($separator);
41
+        return new QueryFunction('GROUP_CONCAT(' . $this->helper->quoteColumnName($expr) . ', ' . $separator . ')');
42
+    }
43 43
 
44
-	public function greatest($x, $y): IQueryFunction {
45
-		return new QueryFunction('MAX(' . $this->helper->quoteColumnName($x) . ', ' . $this->helper->quoteColumnName($y) . ')');
46
-	}
44
+    public function greatest($x, $y): IQueryFunction {
45
+        return new QueryFunction('MAX(' . $this->helper->quoteColumnName($x) . ', ' . $this->helper->quoteColumnName($y) . ')');
46
+    }
47 47
 
48
-	public function least($x, $y): IQueryFunction {
49
-		return new QueryFunction('MIN(' . $this->helper->quoteColumnName($x) . ', ' . $this->helper->quoteColumnName($y) . ')');
50
-	}
48
+    public function least($x, $y): IQueryFunction {
49
+        return new QueryFunction('MIN(' . $this->helper->quoteColumnName($x) . ', ' . $this->helper->quoteColumnName($y) . ')');
50
+    }
51 51
 
52
-	public function octetLength($field, $alias = ''): IQueryFunction {
53
-		$alias = $alias ? (' AS ' . $this->helper->quoteColumnName($alias)) : '';
54
-		$quotedName = $this->helper->quoteColumnName($field);
55
-		return new QueryFunction('LENGTH(CAST(' . $quotedName . ' as BLOB))' . $alias);
56
-	}
52
+    public function octetLength($field, $alias = ''): IQueryFunction {
53
+        $alias = $alias ? (' AS ' . $this->helper->quoteColumnName($alias)) : '';
54
+        $quotedName = $this->helper->quoteColumnName($field);
55
+        return new QueryFunction('LENGTH(CAST(' . $quotedName . ' as BLOB))' . $alias);
56
+    }
57 57
 
58
-	public function charLength($field, $alias = ''): IQueryFunction {
59
-		$alias = $alias ? (' AS ' . $this->helper->quoteColumnName($alias)) : '';
60
-		$quotedName = $this->helper->quoteColumnName($field);
61
-		return new QueryFunction('LENGTH(' . $quotedName . ')' . $alias);
62
-	}
58
+    public function charLength($field, $alias = ''): IQueryFunction {
59
+        $alias = $alias ? (' AS ' . $this->helper->quoteColumnName($alias)) : '';
60
+        $quotedName = $this->helper->quoteColumnName($field);
61
+        return new QueryFunction('LENGTH(' . $quotedName . ')' . $alias);
62
+    }
63 63
 }
Please login to merge, or discard this patch.
lib/private/Files/Mount/ObjectStorePreviewCacheMountProvider.php 1 patch
Indentation   +100 added lines, -100 removed lines patch added patch discarded remove patch
@@ -37,119 +37,119 @@
 block discarded – undo
37 37
  * Mount provider for object store app data folder for previews
38 38
  */
39 39
 class ObjectStorePreviewCacheMountProvider implements IRootMountProvider {
40
-	private LoggerInterface $logger;
41
-	/** @var IConfig */
42
-	private $config;
43
-
44
-	public function __construct(LoggerInterface $logger, IConfig $config) {
45
-		$this->logger = $logger;
46
-		$this->config = $config;
47
-	}
48
-
49
-	/**
50
-	 * @return MountPoint[]
51
-	 * @throws \Exception
52
-	 */
53
-	public function getRootMounts(IStorageFactory $loader): array {
54
-		if (!is_array($this->config->getSystemValue('objectstore_multibucket'))) {
55
-			return [];
56
-		}
57
-		if ($this->config->getSystemValue('objectstore.multibucket.preview-distribution', false) !== true) {
58
-			return [];
59
-		}
60
-
61
-		$instanceId = $this->config->getSystemValueString('instanceid', '');
62
-		$mountPoints = [];
63
-		$directoryRange = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];
64
-		$i = 0;
65
-		foreach ($directoryRange as $parent) {
66
-			foreach ($directoryRange as $child) {
67
-				$mountPoints[] = new MountPoint(
68
-					AppdataPreviewObjectStoreStorage::class,
69
-					'/appdata_' . $instanceId . '/preview/' . $parent . '/' . $child,
70
-					$this->getMultiBucketObjectStore($i),
71
-					$loader,
72
-					null,
73
-					null,
74
-					self::class
75
-				);
76
-				$i++;
77
-			}
78
-		}
79
-
80
-		$rootStorageArguments = $this->getMultiBucketObjectStoreForRoot();
81
-		$fakeRootStorage = new ObjectStoreStorage($rootStorageArguments);
82
-		$fakeRootStorageJail = new Jail([
83
-			'storage' => $fakeRootStorage,
84
-			'root' => '/appdata_' . $instanceId . '/preview',
85
-		]);
86
-
87
-		// add a fallback location to be able to fetch existing previews from the old bucket
88
-		$mountPoints[] = new MountPoint(
89
-			$fakeRootStorageJail,
90
-			'/appdata_' . $instanceId . '/preview/old-multibucket',
91
-			null,
92
-			$loader,
93
-			null,
94
-			null,
95
-			self::class
96
-		);
97
-
98
-		return $mountPoints;
99
-	}
100
-
101
-	protected function getMultiBucketObjectStore(int $number): array {
102
-		$config = $this->config->getSystemValue('objectstore_multibucket');
103
-
104
-		// sanity checks
105
-		if (empty($config['class'])) {
106
-			$this->logger->error('No class given for objectstore', ['app' => 'files']);
107
-		}
108
-		if (!isset($config['arguments'])) {
109
-			$config['arguments'] = [];
110
-		}
111
-
112
-		/*
40
+    private LoggerInterface $logger;
41
+    /** @var IConfig */
42
+    private $config;
43
+
44
+    public function __construct(LoggerInterface $logger, IConfig $config) {
45
+        $this->logger = $logger;
46
+        $this->config = $config;
47
+    }
48
+
49
+    /**
50
+     * @return MountPoint[]
51
+     * @throws \Exception
52
+     */
53
+    public function getRootMounts(IStorageFactory $loader): array {
54
+        if (!is_array($this->config->getSystemValue('objectstore_multibucket'))) {
55
+            return [];
56
+        }
57
+        if ($this->config->getSystemValue('objectstore.multibucket.preview-distribution', false) !== true) {
58
+            return [];
59
+        }
60
+
61
+        $instanceId = $this->config->getSystemValueString('instanceid', '');
62
+        $mountPoints = [];
63
+        $directoryRange = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];
64
+        $i = 0;
65
+        foreach ($directoryRange as $parent) {
66
+            foreach ($directoryRange as $child) {
67
+                $mountPoints[] = new MountPoint(
68
+                    AppdataPreviewObjectStoreStorage::class,
69
+                    '/appdata_' . $instanceId . '/preview/' . $parent . '/' . $child,
70
+                    $this->getMultiBucketObjectStore($i),
71
+                    $loader,
72
+                    null,
73
+                    null,
74
+                    self::class
75
+                );
76
+                $i++;
77
+            }
78
+        }
79
+
80
+        $rootStorageArguments = $this->getMultiBucketObjectStoreForRoot();
81
+        $fakeRootStorage = new ObjectStoreStorage($rootStorageArguments);
82
+        $fakeRootStorageJail = new Jail([
83
+            'storage' => $fakeRootStorage,
84
+            'root' => '/appdata_' . $instanceId . '/preview',
85
+        ]);
86
+
87
+        // add a fallback location to be able to fetch existing previews from the old bucket
88
+        $mountPoints[] = new MountPoint(
89
+            $fakeRootStorageJail,
90
+            '/appdata_' . $instanceId . '/preview/old-multibucket',
91
+            null,
92
+            $loader,
93
+            null,
94
+            null,
95
+            self::class
96
+        );
97
+
98
+        return $mountPoints;
99
+    }
100
+
101
+    protected function getMultiBucketObjectStore(int $number): array {
102
+        $config = $this->config->getSystemValue('objectstore_multibucket');
103
+
104
+        // sanity checks
105
+        if (empty($config['class'])) {
106
+            $this->logger->error('No class given for objectstore', ['app' => 'files']);
107
+        }
108
+        if (!isset($config['arguments'])) {
109
+            $config['arguments'] = [];
110
+        }
111
+
112
+        /*
113 113
 		 * Use any provided bucket argument as prefix
114 114
 		 * and add the mapping from parent/child => bucket
115 115
 		 */
116
-		if (!isset($config['arguments']['bucket'])) {
117
-			$config['arguments']['bucket'] = '';
118
-		}
116
+        if (!isset($config['arguments']['bucket'])) {
117
+            $config['arguments']['bucket'] = '';
118
+        }
119 119
 
120
-		$config['arguments']['bucket'] .= "-preview-$number";
120
+        $config['arguments']['bucket'] .= "-preview-$number";
121 121
 
122
-		// instantiate object store implementation
123
-		$config['arguments']['objectstore'] = new $config['class']($config['arguments']);
122
+        // instantiate object store implementation
123
+        $config['arguments']['objectstore'] = new $config['class']($config['arguments']);
124 124
 
125
-		$config['arguments']['internal-id'] = $number;
125
+        $config['arguments']['internal-id'] = $number;
126 126
 
127
-		return $config['arguments'];
128
-	}
127
+        return $config['arguments'];
128
+    }
129 129
 
130
-	protected function getMultiBucketObjectStoreForRoot(): array {
131
-		$config = $this->config->getSystemValue('objectstore_multibucket');
130
+    protected function getMultiBucketObjectStoreForRoot(): array {
131
+        $config = $this->config->getSystemValue('objectstore_multibucket');
132 132
 
133
-		// sanity checks
134
-		if (empty($config['class'])) {
135
-			$this->logger->error('No class given for objectstore', ['app' => 'files']);
136
-		}
137
-		if (!isset($config['arguments'])) {
138
-			$config['arguments'] = [];
139
-		}
133
+        // sanity checks
134
+        if (empty($config['class'])) {
135
+            $this->logger->error('No class given for objectstore', ['app' => 'files']);
136
+        }
137
+        if (!isset($config['arguments'])) {
138
+            $config['arguments'] = [];
139
+        }
140 140
 
141
-		/*
141
+        /*
142 142
 		 * Use any provided bucket argument as prefix
143 143
 		 * and add the mapping from parent/child => bucket
144 144
 		 */
145
-		if (!isset($config['arguments']['bucket'])) {
146
-			$config['arguments']['bucket'] = '';
147
-		}
148
-		$config['arguments']['bucket'] .= '0';
145
+        if (!isset($config['arguments']['bucket'])) {
146
+            $config['arguments']['bucket'] = '';
147
+        }
148
+        $config['arguments']['bucket'] .= '0';
149 149
 
150
-		// instantiate object store implementation
151
-		$config['arguments']['objectstore'] = new $config['class']($config['arguments']);
150
+        // instantiate object store implementation
151
+        $config['arguments']['objectstore'] = new $config['class']($config['arguments']);
152 152
 
153
-		return $config['arguments'];
154
-	}
153
+        return $config['arguments'];
154
+    }
155 155
 }
Please login to merge, or discard this patch.
apps/user_ldap/lib/Migration/Version1130Date20220110154718.php 1 patch
Indentation   +57 added lines, -57 removed lines patch added patch discarded remove patch
@@ -32,68 +32,68 @@
 block discarded – undo
32 32
 use OCP\Migration\IOutput;
33 33
 
34 34
 class Version1130Date20220110154718 extends GroupMappingMigration {
35
-	public function getName() {
36
-		return 'Copy ldap_group_mapping data from backup table and if needed';
37
-	}
35
+    public function getName() {
36
+        return 'Copy ldap_group_mapping data from backup table and if needed';
37
+    }
38 38
 
39
-	/**
40
-	 * @param IOutput $output
41
-	 * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
42
-	 * @param array $options
43
-	 * @return null|ISchemaWrapper
44
-	 */
45
-	public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
46
-		/** @var ISchemaWrapper $schema */
47
-		$schema = $schemaClosure();
39
+    /**
40
+     * @param IOutput $output
41
+     * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
42
+     * @param array $options
43
+     * @return null|ISchemaWrapper
44
+     */
45
+    public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
46
+        /** @var ISchemaWrapper $schema */
47
+        $schema = $schemaClosure();
48 48
 
49
-		if (!$schema->hasTable('ldap_group_mapping_backup')) {
50
-			// Backup table does not exist
51
-			return null;
52
-		}
49
+        if (!$schema->hasTable('ldap_group_mapping_backup')) {
50
+            // Backup table does not exist
51
+            return null;
52
+        }
53 53
 
54
-		$table = $schema->createTable('ldap_group_mapping');
55
-		$table->addColumn('ldap_dn', Types::STRING, [
56
-			'notnull' => true,
57
-			'length' => 4000,
58
-			'default' => '',
59
-		]);
60
-		$table->addColumn('owncloud_name', Types::STRING, [
61
-			'notnull' => true,
62
-			'length' => 64,
63
-			'default' => '',
64
-		]);
65
-		$table->addColumn('directory_uuid', Types::STRING, [
66
-			'notnull' => true,
67
-			'length' => 255,
68
-			'default' => '',
69
-		]);
70
-		$table->addColumn('ldap_dn_hash', Types::STRING, [
71
-			'notnull' => false,
72
-			'length' => 64,
73
-		]);
74
-		$table->setPrimaryKey(['owncloud_name']);
75
-		$table->addUniqueIndex(['ldap_dn_hash'], 'ldap_group_dn_hashes');
76
-		$table->addUniqueIndex(['directory_uuid'], 'ldap_group_directory_uuid');
54
+        $table = $schema->createTable('ldap_group_mapping');
55
+        $table->addColumn('ldap_dn', Types::STRING, [
56
+            'notnull' => true,
57
+            'length' => 4000,
58
+            'default' => '',
59
+        ]);
60
+        $table->addColumn('owncloud_name', Types::STRING, [
61
+            'notnull' => true,
62
+            'length' => 64,
63
+            'default' => '',
64
+        ]);
65
+        $table->addColumn('directory_uuid', Types::STRING, [
66
+            'notnull' => true,
67
+            'length' => 255,
68
+            'default' => '',
69
+        ]);
70
+        $table->addColumn('ldap_dn_hash', Types::STRING, [
71
+            'notnull' => false,
72
+            'length' => 64,
73
+        ]);
74
+        $table->setPrimaryKey(['owncloud_name']);
75
+        $table->addUniqueIndex(['ldap_dn_hash'], 'ldap_group_dn_hashes');
76
+        $table->addUniqueIndex(['directory_uuid'], 'ldap_group_directory_uuid');
77 77
 
78
-		return $schema;
79
-	}
78
+        return $schema;
79
+    }
80 80
 
81
-	/**
82
-	 * @param IOutput $output
83
-	 * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
84
-	 * @param array $options
85
-	 */
86
-	public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
87
-		/** @var ISchemaWrapper $schema */
88
-		$schema = $schemaClosure();
81
+    /**
82
+     * @param IOutput $output
83
+     * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
84
+     * @param array $options
85
+     */
86
+    public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
87
+        /** @var ISchemaWrapper $schema */
88
+        $schema = $schemaClosure();
89 89
 
90
-		if (!$schema->hasTable('ldap_group_mapping_backup')) {
91
-			// Backup table does not exist
92
-			return;
93
-		}
90
+        if (!$schema->hasTable('ldap_group_mapping_backup')) {
91
+            // Backup table does not exist
92
+            return;
93
+        }
94 94
 
95
-		$output->startProgress();
96
-		$this->copyGroupMappingData('ldap_group_mapping_backup', 'ldap_group_mapping');
97
-		$output->finishProgress();
98
-	}
95
+        $output->startProgress();
96
+        $this->copyGroupMappingData('ldap_group_mapping_backup', 'ldap_group_mapping');
97
+        $output->finishProgress();
98
+    }
99 99
 }
Please login to merge, or discard this patch.
apps/user_ldap/lib/Migration/Version1010Date20200630192842.php 1 patch
Indentation   +73 added lines, -73 removed lines patch added patch discarded remove patch
@@ -33,80 +33,80 @@
 block discarded – undo
33 33
 use OCP\Migration\SimpleMigrationStep;
34 34
 
35 35
 class Version1010Date20200630192842 extends SimpleMigrationStep {
36
-	/**
37
-	 * @param IOutput $output
38
-	 * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
39
-	 * @param array $options
40
-	 * @return null|ISchemaWrapper
41
-	 */
42
-	public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
43
-		/** @var ISchemaWrapper $schema */
44
-		$schema = $schemaClosure();
36
+    /**
37
+     * @param IOutput $output
38
+     * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
39
+     * @param array $options
40
+     * @return null|ISchemaWrapper
41
+     */
42
+    public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
43
+        /** @var ISchemaWrapper $schema */
44
+        $schema = $schemaClosure();
45 45
 
46
-		if (!$schema->hasTable('ldap_user_mapping')) {
47
-			$table = $schema->createTable('ldap_user_mapping');
48
-			$table->addColumn('ldap_dn', Types::STRING, [
49
-				'notnull' => true,
50
-				'length' => 4000,
51
-				'default' => '',
52
-			]);
53
-			$table->addColumn('owncloud_name', Types::STRING, [
54
-				'notnull' => true,
55
-				'length' => 64,
56
-				'default' => '',
57
-			]);
58
-			$table->addColumn('directory_uuid', Types::STRING, [
59
-				'notnull' => true,
60
-				'length' => 255,
61
-				'default' => '',
62
-			]);
63
-			$table->addColumn('ldap_dn_hash', Types::STRING, [
64
-				'notnull' => false,
65
-				'length' => 64,
66
-			]);
67
-			$table->setPrimaryKey(['owncloud_name']);
68
-			$table->addUniqueIndex(['ldap_dn_hash'], 'ldap_user_dn_hashes');
69
-			$table->addUniqueIndex(['directory_uuid'], 'ldap_user_directory_uuid');
70
-		}
46
+        if (!$schema->hasTable('ldap_user_mapping')) {
47
+            $table = $schema->createTable('ldap_user_mapping');
48
+            $table->addColumn('ldap_dn', Types::STRING, [
49
+                'notnull' => true,
50
+                'length' => 4000,
51
+                'default' => '',
52
+            ]);
53
+            $table->addColumn('owncloud_name', Types::STRING, [
54
+                'notnull' => true,
55
+                'length' => 64,
56
+                'default' => '',
57
+            ]);
58
+            $table->addColumn('directory_uuid', Types::STRING, [
59
+                'notnull' => true,
60
+                'length' => 255,
61
+                'default' => '',
62
+            ]);
63
+            $table->addColumn('ldap_dn_hash', Types::STRING, [
64
+                'notnull' => false,
65
+                'length' => 64,
66
+            ]);
67
+            $table->setPrimaryKey(['owncloud_name']);
68
+            $table->addUniqueIndex(['ldap_dn_hash'], 'ldap_user_dn_hashes');
69
+            $table->addUniqueIndex(['directory_uuid'], 'ldap_user_directory_uuid');
70
+        }
71 71
 
72
-		if (!$schema->hasTable('ldap_group_mapping')) {
73
-			$table = $schema->createTable('ldap_group_mapping');
74
-			$table->addColumn('ldap_dn', Types::STRING, [
75
-				'notnull' => true,
76
-				'length' => 4000,
77
-				'default' => '',
78
-			]);
79
-			$table->addColumn('owncloud_name', Types::STRING, [
80
-				'notnull' => true,
81
-				'length' => 64,
82
-				'default' => '',
83
-			]);
84
-			$table->addColumn('directory_uuid', Types::STRING, [
85
-				'notnull' => true,
86
-				'length' => 255,
87
-				'default' => '',
88
-			]);
89
-			$table->addColumn('ldap_dn_hash', Types::STRING, [
90
-				'notnull' => false,
91
-				'length' => 64,
92
-			]);
93
-			$table->setPrimaryKey(['owncloud_name']);
94
-			$table->addUniqueIndex(['ldap_dn_hash'], 'ldap_group_dn_hashes');
95
-			$table->addUniqueIndex(['directory_uuid'], 'ldap_group_directory_uuid');
96
-		}
72
+        if (!$schema->hasTable('ldap_group_mapping')) {
73
+            $table = $schema->createTable('ldap_group_mapping');
74
+            $table->addColumn('ldap_dn', Types::STRING, [
75
+                'notnull' => true,
76
+                'length' => 4000,
77
+                'default' => '',
78
+            ]);
79
+            $table->addColumn('owncloud_name', Types::STRING, [
80
+                'notnull' => true,
81
+                'length' => 64,
82
+                'default' => '',
83
+            ]);
84
+            $table->addColumn('directory_uuid', Types::STRING, [
85
+                'notnull' => true,
86
+                'length' => 255,
87
+                'default' => '',
88
+            ]);
89
+            $table->addColumn('ldap_dn_hash', Types::STRING, [
90
+                'notnull' => false,
91
+                'length' => 64,
92
+            ]);
93
+            $table->setPrimaryKey(['owncloud_name']);
94
+            $table->addUniqueIndex(['ldap_dn_hash'], 'ldap_group_dn_hashes');
95
+            $table->addUniqueIndex(['directory_uuid'], 'ldap_group_directory_uuid');
96
+        }
97 97
 
98
-		if (!$schema->hasTable('ldap_group_members')) {
99
-			$table = $schema->createTable('ldap_group_members');
100
-			$table->addColumn('owncloudname', Types::STRING, [
101
-				'notnull' => true,
102
-				'length' => 255,
103
-				'default' => '',
104
-			]);
105
-			$table->addColumn('owncloudusers', Types::TEXT, [
106
-				'notnull' => true,
107
-			]);
108
-			$table->setPrimaryKey(['owncloudname']);
109
-		}
110
-		return $schema;
111
-	}
98
+        if (!$schema->hasTable('ldap_group_members')) {
99
+            $table = $schema->createTable('ldap_group_members');
100
+            $table->addColumn('owncloudname', Types::STRING, [
101
+                'notnull' => true,
102
+                'length' => 255,
103
+                'default' => '',
104
+            ]);
105
+            $table->addColumn('owncloudusers', Types::TEXT, [
106
+                'notnull' => true,
107
+            ]);
108
+            $table->setPrimaryKey(['owncloudname']);
109
+        }
110
+        return $schema;
111
+    }
112 112
 }
Please login to merge, or discard this patch.
apps/files_external/lib/Migration/Version1016Date20220324154536.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -31,24 +31,24 @@
 block discarded – undo
31 31
 
32 32
 class Version1016Date20220324154536 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): ?ISchemaWrapper {
41
-		/** @var ISchemaWrapper $schema */
42
-		$schema = $schemaClosure();
43
-
44
-		$table = $schema->getTable('external_config');
45
-		$column = $table->getColumn('value');
46
-
47
-		if ($column->getLength() > 4000) {
48
-			$column->setLength(4000);
49
-			return $schema;
50
-		}
51
-
52
-		return null;
53
-	}
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): ?ISchemaWrapper {
41
+        /** @var ISchemaWrapper $schema */
42
+        $schema = $schemaClosure();
43
+
44
+        $table = $schema->getTable('external_config');
45
+        $column = $table->getColumn('value');
46
+
47
+        if ($column->getLength() > 4000) {
48
+            $column->setLength(4000);
49
+            return $schema;
50
+        }
51
+
52
+        return null;
53
+    }
54 54
 }
Please login to merge, or discard this patch.
lib/public/DataCollector/AbstractDataCollector.php 1 patch
Indentation   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -36,52 +36,52 @@
 block discarded – undo
36 36
  * @since 24.0.0
37 37
  */
38 38
 abstract class AbstractDataCollector implements IDataCollector, \JsonSerializable {
39
-	/** @var array */
40
-	protected $data = [];
39
+    /** @var array */
40
+    protected $data = [];
41 41
 
42
-	/**
43
-	 * @since 24.0.0
44
-	 */
45
-	public function getName(): string {
46
-		return static::class;
47
-	}
42
+    /**
43
+     * @since 24.0.0
44
+     */
45
+    public function getName(): string {
46
+        return static::class;
47
+    }
48 48
 
49
-	/**
50
-	 * Reset the state of the profiler. By default it only empties the
51
-	 * $this->data contents, but you can override this method to do
52
-	 * additional cleaning.
53
-	 * @since 24.0.0
54
-	 */
55
-	public function reset(): void {
56
-		$this->data = [];
57
-	}
49
+    /**
50
+     * Reset the state of the profiler. By default it only empties the
51
+     * $this->data contents, but you can override this method to do
52
+     * additional cleaning.
53
+     * @since 24.0.0
54
+     */
55
+    public function reset(): void {
56
+        $this->data = [];
57
+    }
58 58
 
59
-	/**
60
-	 * @since 24.0.0
61
-	 */
62
-	public function __sleep(): array {
63
-		return ['data'];
64
-	}
59
+    /**
60
+     * @since 24.0.0
61
+     */
62
+    public function __sleep(): array {
63
+        return ['data'];
64
+    }
65 65
 
66
-	/**
67
-	 * @internal to prevent implementing \Serializable
68
-	 * @since 24.0.0
69
-	 */
70
-	final protected function serialize() {
71
-	}
66
+    /**
67
+     * @internal to prevent implementing \Serializable
68
+     * @since 24.0.0
69
+     */
70
+    final protected function serialize() {
71
+    }
72 72
 
73
-	/**
74
-	 * @internal to prevent implementing \Serializable
75
-	 * @since 24.0.0
76
-	 */
77
-	final protected function unserialize(string $data) {
78
-	}
73
+    /**
74
+     * @internal to prevent implementing \Serializable
75
+     * @since 24.0.0
76
+     */
77
+    final protected function unserialize(string $data) {
78
+    }
79 79
 
80
-	/**
81
-	 * @since 24.0.0
82
-	 */
83
-	#[\ReturnTypeWillChange]
84
-	public function jsonSerialize() {
85
-		return $this->data;
86
-	}
80
+    /**
81
+     * @since 24.0.0
82
+     */
83
+    #[\ReturnTypeWillChange]
84
+    public function jsonSerialize() {
85
+        return $this->data;
86
+    }
87 87
 }
Please login to merge, or discard this patch.
lib/public/Profiler/IProfile.php 1 patch
Indentation   +123 added lines, -123 removed lines patch added patch discarded remove patch
@@ -42,127 +42,127 @@
 block discarded – undo
42 42
  * @since 24.0.0
43 43
  */
44 44
 interface IProfile {
45
-	/**
46
-	 * Get the token of the profile
47
-	 * @since 24.0.0
48
-	 */
49
-	public function getToken(): string;
50
-
51
-	/**
52
-	 * Set the token of the profile
53
-	 * @since 24.0.0
54
-	 */
55
-	public function setToken(string $token): void;
56
-
57
-	/**
58
-	 * Get the time of the profile
59
-	 * @since 24.0.0
60
-	 */
61
-	public function getTime(): ?int;
62
-
63
-	/**
64
-	 * Set the time of the profile
65
-	 * @since 24.0.0
66
-	 */
67
-	public function setTime(int $time): void;
68
-
69
-	/**
70
-	 * Get the url of the profile
71
-	 * @since 24.0.0
72
-	 */
73
-	public function getUrl(): ?string;
74
-
75
-	/**
76
-	 * Set the url of the profile
77
-	 * @since 24.0.0
78
-	 */
79
-	public function setUrl(string $url): void;
80
-
81
-	/**
82
-	 * Get the method of the profile
83
-	 * @since 24.0.0
84
-	 */
85
-	public function getMethod(): ?string;
86
-
87
-	/**
88
-	 * Set the method of the profile
89
-	 * @since 24.0.0
90
-	 */
91
-	public function setMethod(string $method): void;
92
-
93
-	/**
94
-	 * Get the status code of the profile
95
-	 * @since 24.0.0
96
-	 */
97
-	public function getStatusCode(): ?int;
98
-
99
-	/**
100
-	 * Set the status code of the profile
101
-	 * @since 24.0.0
102
-	 */
103
-	public function setStatusCode(int $statusCode): void;
104
-
105
-	/**
106
-	 * Add a data collector to the profile
107
-	 * @since 24.0.0
108
-	 */
109
-	public function addCollector(IDataCollector $collector);
110
-
111
-	/**
112
-	 * Get the parent profile to this profile
113
-	 * @since 24.0.0
114
-	 */
115
-	public function getParent(): ?IProfile;
116
-
117
-	/**
118
-	 * Set the parent profile to this profile
119
-	 * @since 24.0.0
120
-	 */
121
-	public function setParent(?IProfile $parent): void;
122
-
123
-	/**
124
-	 * Get the parent token to this profile
125
-	 * @since 24.0.0
126
-	 */
127
-	public function getParentToken(): ?string;
128
-
129
-	/**
130
-	 * Get the profile's children
131
-	 * @return IProfile[]
132
-	 * @since 24.0.0
133
-	 **/
134
-	public function getChildren(): array;
135
-
136
-	/**
137
-	 * Set the profile's children
138
-	 * @param IProfile[] $children
139
-	 * @since 24.0.0
140
-	 */
141
-	public function setChildren(array $children): void;
142
-
143
-	/**
144
-	 * Add the child profile
145
-	 * @since 24.0.0
146
-	 */
147
-	public function addChild(IProfile $profile): void;
148
-
149
-	/**
150
-	 * Get all the data collectors
151
-	 * @return IDataCollector[]
152
-	 * @since 24.0.0
153
-	 */
154
-	public function getCollectors(): array;
155
-
156
-	/**
157
-	 * Set all the data collectors
158
-	 * @param IDataCollector[] $collectors
159
-	 * @since 24.0.0
160
-	 */
161
-	public function setCollectors(array $collectors): void;
162
-
163
-	/**
164
-	 * Get a data collector by name
165
-	 * @since 24.0.0
166
-	 */
167
-	public function getCollector(string $collectorName): ?IDataCollector;
45
+    /**
46
+     * Get the token of the profile
47
+     * @since 24.0.0
48
+     */
49
+    public function getToken(): string;
50
+
51
+    /**
52
+     * Set the token of the profile
53
+     * @since 24.0.0
54
+     */
55
+    public function setToken(string $token): void;
56
+
57
+    /**
58
+     * Get the time of the profile
59
+     * @since 24.0.0
60
+     */
61
+    public function getTime(): ?int;
62
+
63
+    /**
64
+     * Set the time of the profile
65
+     * @since 24.0.0
66
+     */
67
+    public function setTime(int $time): void;
68
+
69
+    /**
70
+     * Get the url of the profile
71
+     * @since 24.0.0
72
+     */
73
+    public function getUrl(): ?string;
74
+
75
+    /**
76
+     * Set the url of the profile
77
+     * @since 24.0.0
78
+     */
79
+    public function setUrl(string $url): void;
80
+
81
+    /**
82
+     * Get the method of the profile
83
+     * @since 24.0.0
84
+     */
85
+    public function getMethod(): ?string;
86
+
87
+    /**
88
+     * Set the method of the profile
89
+     * @since 24.0.0
90
+     */
91
+    public function setMethod(string $method): void;
92
+
93
+    /**
94
+     * Get the status code of the profile
95
+     * @since 24.0.0
96
+     */
97
+    public function getStatusCode(): ?int;
98
+
99
+    /**
100
+     * Set the status code of the profile
101
+     * @since 24.0.0
102
+     */
103
+    public function setStatusCode(int $statusCode): void;
104
+
105
+    /**
106
+     * Add a data collector to the profile
107
+     * @since 24.0.0
108
+     */
109
+    public function addCollector(IDataCollector $collector);
110
+
111
+    /**
112
+     * Get the parent profile to this profile
113
+     * @since 24.0.0
114
+     */
115
+    public function getParent(): ?IProfile;
116
+
117
+    /**
118
+     * Set the parent profile to this profile
119
+     * @since 24.0.0
120
+     */
121
+    public function setParent(?IProfile $parent): void;
122
+
123
+    /**
124
+     * Get the parent token to this profile
125
+     * @since 24.0.0
126
+     */
127
+    public function getParentToken(): ?string;
128
+
129
+    /**
130
+     * Get the profile's children
131
+     * @return IProfile[]
132
+     * @since 24.0.0
133
+     **/
134
+    public function getChildren(): array;
135
+
136
+    /**
137
+     * Set the profile's children
138
+     * @param IProfile[] $children
139
+     * @since 24.0.0
140
+     */
141
+    public function setChildren(array $children): void;
142
+
143
+    /**
144
+     * Add the child profile
145
+     * @since 24.0.0
146
+     */
147
+    public function addChild(IProfile $profile): void;
148
+
149
+    /**
150
+     * Get all the data collectors
151
+     * @return IDataCollector[]
152
+     * @since 24.0.0
153
+     */
154
+    public function getCollectors(): array;
155
+
156
+    /**
157
+     * Set all the data collectors
158
+     * @param IDataCollector[] $collectors
159
+     * @since 24.0.0
160
+     */
161
+    public function setCollectors(array $collectors): void;
162
+
163
+    /**
164
+     * Get a data collector by name
165
+     * @since 24.0.0
166
+     */
167
+    public function getCollector(string $collectorName): ?IDataCollector;
168 168
 }
Please login to merge, or discard this patch.
lib/private/DB/ObjectParameter.php 1 patch
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -35,37 +35,37 @@
 block discarded – undo
35 35
 namespace OC\DB;
36 36
 
37 37
 final class ObjectParameter {
38
-	private $object;
39
-	private $error;
40
-	private $stringable;
41
-	private $class;
38
+    private $object;
39
+    private $error;
40
+    private $stringable;
41
+    private $class;
42 42
 
43
-	/**
44
-	 * @param object $object
45
-	 */
46
-	public function __construct($object, ?\Throwable $error) {
47
-		$this->object = $object;
48
-		$this->error = $error;
49
-		$this->stringable = \is_callable([$object, '__toString']);
50
-		$this->class = \get_class($object);
51
-	}
43
+    /**
44
+     * @param object $object
45
+     */
46
+    public function __construct($object, ?\Throwable $error) {
47
+        $this->object = $object;
48
+        $this->error = $error;
49
+        $this->stringable = \is_callable([$object, '__toString']);
50
+        $this->class = \get_class($object);
51
+    }
52 52
 
53
-	/**
54
-	 * @return object
55
-	 */
56
-	public function getObject() {
57
-		return $this->object;
58
-	}
53
+    /**
54
+     * @return object
55
+     */
56
+    public function getObject() {
57
+        return $this->object;
58
+    }
59 59
 
60
-	public function getError(): ?\Throwable {
61
-		return $this->error;
62
-	}
60
+    public function getError(): ?\Throwable {
61
+        return $this->error;
62
+    }
63 63
 
64
-	public function isStringable(): bool {
65
-		return $this->stringable;
66
-	}
64
+    public function isStringable(): bool {
65
+        return $this->stringable;
66
+    }
67 67
 
68
-	public function getClass(): string {
69
-		return $this->class;
70
-	}
68
+    public function getClass(): string {
69
+        return $this->class;
70
+    }
71 71
 }
Please login to merge, or discard this patch.