Completed
Push — master ( 3808f8...455fb7 )
by Julius
39:53 queued 15s
created
lib/public/WorkflowEngine/IRuleMatcher.php 1 patch
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -36,56 +36,56 @@
 block discarded – undo
36 36
  * @since 18.0.0
37 37
  */
38 38
 interface IRuleMatcher extends IFileCheck {
39
-	/**
40
-	 * This method is left for backwards compatibility and easier porting of
41
-	 * apps. Please use 'getFlows' instead (and setOperation if you implement
42
-	 * an IComplexOperation).
43
-	 *
44
-	 * @since 18.0.0
45
-	 * @deprecated 18.0.0
46
-	 */
47
-	public function getMatchingOperations(string $class, bool $returnFirstMatchingOperationOnly = true): array;
39
+    /**
40
+     * This method is left for backwards compatibility and easier porting of
41
+     * apps. Please use 'getFlows' instead (and setOperation if you implement
42
+     * an IComplexOperation).
43
+     *
44
+     * @since 18.0.0
45
+     * @deprecated 18.0.0
46
+     */
47
+    public function getMatchingOperations(string $class, bool $returnFirstMatchingOperationOnly = true): array;
48 48
 
49
-	/**
50
-	 * @throws RuntimeException
51
-	 * @since 18.0.0
52
-	 */
53
-	public function getFlows(bool $returnFirstMatchingOperationOnly = true): array;
49
+    /**
50
+     * @throws RuntimeException
51
+     * @since 18.0.0
52
+     */
53
+    public function getFlows(bool $returnFirstMatchingOperationOnly = true): array;
54 54
 
55
-	/**
56
-	 * this method can only be called once and is typically called by the
57
-	 * Flow engine, unless for IComplexOperations.
58
-	 *
59
-	 * @throws RuntimeException
60
-	 * @since 18.0.0
61
-	 */
62
-	public function setOperation(IOperation $operation): void;
55
+    /**
56
+     * this method can only be called once and is typically called by the
57
+     * Flow engine, unless for IComplexOperations.
58
+     *
59
+     * @throws RuntimeException
60
+     * @since 18.0.0
61
+     */
62
+    public function setOperation(IOperation $operation): void;
63 63
 
64
-	/**
65
-	 * this method can only be called once and is typically called by the
66
-	 * Flow engine, unless for IComplexOperations.
67
-	 *
68
-	 * @throws RuntimeException
69
-	 * @since 18.0.0
70
-	 */
71
-	public function setEntity(IEntity $entity): void;
64
+    /**
65
+     * this method can only be called once and is typically called by the
66
+     * Flow engine, unless for IComplexOperations.
67
+     *
68
+     * @throws RuntimeException
69
+     * @since 18.0.0
70
+     */
71
+    public function setEntity(IEntity $entity): void;
72 72
 
73
-	/**
74
-	 * returns the entity which might provide more information, depending on
75
-	 * the interfaces it implements
76
-	 *
77
-	 * @return IEntity
78
-	 * @since 18.0.0
79
-	 */
80
-	public function getEntity(): IEntity;
73
+    /**
74
+     * returns the entity which might provide more information, depending on
75
+     * the interfaces it implements
76
+     *
77
+     * @return IEntity
78
+     * @since 18.0.0
79
+     */
80
+    public function getEntity(): IEntity;
81 81
 
82
-	/**
83
-	 * this method can be called once to set the event name that is currently
84
-	 * being processed. The workflow engine takes care of this usually, only an
85
-	 * IComplexOperation might want to make use of it.
86
-	 *
87
-	 * @throws RuntimeException
88
-	 * @since 20.0.0
89
-	 */
90
-	public function setEventName(string $eventName): void;
82
+    /**
83
+     * this method can be called once to set the event name that is currently
84
+     * being processed. The workflow engine takes care of this usually, only an
85
+     * IComplexOperation might want to make use of it.
86
+     *
87
+     * @throws RuntimeException
88
+     * @since 20.0.0
89
+     */
90
+    public function setEventName(string $eventName): void;
91 91
 }
Please login to merge, or discard this patch.
apps/user_status/lib/Migration/Version0002Date20200902144824.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -36,22 +36,22 @@
 block discarded – undo
36 36
  */
37 37
 class Version0002Date20200902144824 extends SimpleMigrationStep {
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
-	 * @since 20.0.0
45
-	 */
46
-	public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
47
-		/** @var ISchemaWrapper $schema */
48
-		$schema = $schemaClosure();
49
-
50
-		$statusTable = $schema->getTable('user_status');
51
-
52
-		$statusTable->addIndex(['status_timestamp'], 'user_status_tstmp_ix');
53
-		$statusTable->addIndex(['is_user_defined', 'status'], 'user_status_iud_ix');
54
-
55
-		return $schema;
56
-	}
39
+    /**
40
+     * @param IOutput $output
41
+     * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
42
+     * @param array $options
43
+     * @return null|ISchemaWrapper
44
+     * @since 20.0.0
45
+     */
46
+    public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
47
+        /** @var ISchemaWrapper $schema */
48
+        $schema = $schemaClosure();
49
+
50
+        $statusTable = $schema->getTable('user_status');
51
+
52
+        $statusTable->addIndex(['status_timestamp'], 'user_status_tstmp_ix');
53
+        $statusTable->addIndex(['is_user_defined', 'status'], 'user_status_iud_ix');
54
+
55
+        return $schema;
56
+    }
57 57
 }
Please login to merge, or discard this patch.
lib/private/Files/Cache/NullWatcher.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -24,30 +24,30 @@
 block discarded – undo
24 24
 namespace OC\Files\Cache;
25 25
 
26 26
 class NullWatcher extends Watcher {
27
-	private $policy;
27
+    private $policy;
28 28
 
29
-	public function __construct() {
30
-	}
29
+    public function __construct() {
30
+    }
31 31
 
32
-	public function setPolicy($policy) {
33
-		$this->policy = $policy;
34
-	}
32
+    public function setPolicy($policy) {
33
+        $this->policy = $policy;
34
+    }
35 35
 
36
-	public function getPolicy() {
37
-		return $this->policy;
38
-	}
36
+    public function getPolicy() {
37
+        return $this->policy;
38
+    }
39 39
 
40
-	public function checkUpdate($path, $cachedEntry = null) {
41
-		return false;
42
-	}
40
+    public function checkUpdate($path, $cachedEntry = null) {
41
+        return false;
42
+    }
43 43
 
44
-	public function update($path, $cachedData) {
45
-	}
44
+    public function update($path, $cachedData) {
45
+    }
46 46
 
47
-	public function needsUpdate($path, $cachedData) {
48
-		return false;
49
-	}
47
+    public function needsUpdate($path, $cachedData) {
48
+        return false;
49
+    }
50 50
 
51
-	public function cleanFolder($path) {
52
-	}
51
+    public function cleanFolder($path) {
52
+    }
53 53
 }
Please login to merge, or discard this patch.
lib/private/AppFramework/Http.php 1 patch
Indentation   +90 added lines, -90 removed lines patch added patch discarded remove patch
@@ -33,99 +33,99 @@
 block discarded – undo
33 33
 use OCP\AppFramework\Http as BaseHttp;
34 34
 
35 35
 class Http extends BaseHttp {
36
-	private $server;
37
-	private $protocolVersion;
38
-	protected $headers;
36
+    private $server;
37
+    private $protocolVersion;
38
+    protected $headers;
39 39
 
40
-	/**
41
-	 * @param array $server $_SERVER
42
-	 * @param string $protocolVersion the http version to use defaults to HTTP/1.1
43
-	 */
44
-	public function __construct($server, $protocolVersion = 'HTTP/1.1') {
45
-		$this->server = $server;
46
-		$this->protocolVersion = $protocolVersion;
40
+    /**
41
+     * @param array $server $_SERVER
42
+     * @param string $protocolVersion the http version to use defaults to HTTP/1.1
43
+     */
44
+    public function __construct($server, $protocolVersion = 'HTTP/1.1') {
45
+        $this->server = $server;
46
+        $this->protocolVersion = $protocolVersion;
47 47
 
48
-		$this->headers = [
49
-			self::STATUS_CONTINUE => 'Continue',
50
-			self::STATUS_SWITCHING_PROTOCOLS => 'Switching Protocols',
51
-			self::STATUS_PROCESSING => 'Processing',
52
-			self::STATUS_OK => 'OK',
53
-			self::STATUS_CREATED => 'Created',
54
-			self::STATUS_ACCEPTED => 'Accepted',
55
-			self::STATUS_NON_AUTHORATIVE_INFORMATION => 'Non-Authorative Information',
56
-			self::STATUS_NO_CONTENT => 'No Content',
57
-			self::STATUS_RESET_CONTENT => 'Reset Content',
58
-			self::STATUS_PARTIAL_CONTENT => 'Partial Content',
59
-			self::STATUS_MULTI_STATUS => 'Multi-Status', // RFC 4918
60
-			self::STATUS_ALREADY_REPORTED => 'Already Reported', // RFC 5842
61
-			self::STATUS_IM_USED => 'IM Used', // RFC 3229
62
-			self::STATUS_MULTIPLE_CHOICES => 'Multiple Choices',
63
-			self::STATUS_MOVED_PERMANENTLY => 'Moved Permanently',
64
-			self::STATUS_FOUND => 'Found',
65
-			self::STATUS_SEE_OTHER => 'See Other',
66
-			self::STATUS_NOT_MODIFIED => 'Not Modified',
67
-			self::STATUS_USE_PROXY => 'Use Proxy',
68
-			self::STATUS_RESERVED => 'Reserved',
69
-			self::STATUS_TEMPORARY_REDIRECT => 'Temporary Redirect',
70
-			self::STATUS_BAD_REQUEST => 'Bad request',
71
-			self::STATUS_UNAUTHORIZED => 'Unauthorized',
72
-			self::STATUS_PAYMENT_REQUIRED => 'Payment Required',
73
-			self::STATUS_FORBIDDEN => 'Forbidden',
74
-			self::STATUS_NOT_FOUND => 'Not Found',
75
-			self::STATUS_METHOD_NOT_ALLOWED => 'Method Not Allowed',
76
-			self::STATUS_NOT_ACCEPTABLE => 'Not Acceptable',
77
-			self::STATUS_PROXY_AUTHENTICATION_REQUIRED => 'Proxy Authentication Required',
78
-			self::STATUS_REQUEST_TIMEOUT => 'Request Timeout',
79
-			self::STATUS_CONFLICT => 'Conflict',
80
-			self::STATUS_GONE => 'Gone',
81
-			self::STATUS_LENGTH_REQUIRED => 'Length Required',
82
-			self::STATUS_PRECONDITION_FAILED => 'Precondition failed',
83
-			self::STATUS_REQUEST_ENTITY_TOO_LARGE => 'Request Entity Too Large',
84
-			self::STATUS_REQUEST_URI_TOO_LONG => 'Request-URI Too Long',
85
-			self::STATUS_UNSUPPORTED_MEDIA_TYPE => 'Unsupported Media Type',
86
-			self::STATUS_REQUEST_RANGE_NOT_SATISFIABLE => 'Requested Range Not Satisfiable',
87
-			self::STATUS_EXPECTATION_FAILED => 'Expectation Failed',
88
-			self::STATUS_IM_A_TEAPOT => 'I\'m a teapot', // RFC 2324
89
-			self::STATUS_UNPROCESSABLE_ENTITY => 'Unprocessable Entity', // RFC 4918
90
-			self::STATUS_LOCKED => 'Locked', // RFC 4918
91
-			self::STATUS_FAILED_DEPENDENCY => 'Failed Dependency', // RFC 4918
92
-			self::STATUS_UPGRADE_REQUIRED => 'Upgrade required',
93
-			self::STATUS_PRECONDITION_REQUIRED => 'Precondition required', // draft-nottingham-http-new-status
94
-			self::STATUS_TOO_MANY_REQUESTS => 'Too Many Requests', // draft-nottingham-http-new-status
95
-			self::STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE => 'Request Header Fields Too Large', // draft-nottingham-http-new-status
96
-			self::STATUS_INTERNAL_SERVER_ERROR => 'Internal Server Error',
97
-			self::STATUS_NOT_IMPLEMENTED => 'Not Implemented',
98
-			self::STATUS_BAD_GATEWAY => 'Bad Gateway',
99
-			self::STATUS_SERVICE_UNAVAILABLE => 'Service Unavailable',
100
-			self::STATUS_GATEWAY_TIMEOUT => 'Gateway Timeout',
101
-			self::STATUS_HTTP_VERSION_NOT_SUPPORTED => 'HTTP Version not supported',
102
-			self::STATUS_VARIANT_ALSO_NEGOTIATES => 'Variant Also Negotiates',
103
-			self::STATUS_INSUFFICIENT_STORAGE => 'Insufficient Storage', // RFC 4918
104
-			self::STATUS_LOOP_DETECTED => 'Loop Detected', // RFC 5842
105
-			self::STATUS_BANDWIDTH_LIMIT_EXCEEDED => 'Bandwidth Limit Exceeded', // non-standard
106
-			self::STATUS_NOT_EXTENDED => 'Not extended',
107
-			self::STATUS_NETWORK_AUTHENTICATION_REQUIRED => 'Network Authentication Required', // draft-nottingham-http-new-status
108
-		];
109
-	}
48
+        $this->headers = [
49
+            self::STATUS_CONTINUE => 'Continue',
50
+            self::STATUS_SWITCHING_PROTOCOLS => 'Switching Protocols',
51
+            self::STATUS_PROCESSING => 'Processing',
52
+            self::STATUS_OK => 'OK',
53
+            self::STATUS_CREATED => 'Created',
54
+            self::STATUS_ACCEPTED => 'Accepted',
55
+            self::STATUS_NON_AUTHORATIVE_INFORMATION => 'Non-Authorative Information',
56
+            self::STATUS_NO_CONTENT => 'No Content',
57
+            self::STATUS_RESET_CONTENT => 'Reset Content',
58
+            self::STATUS_PARTIAL_CONTENT => 'Partial Content',
59
+            self::STATUS_MULTI_STATUS => 'Multi-Status', // RFC 4918
60
+            self::STATUS_ALREADY_REPORTED => 'Already Reported', // RFC 5842
61
+            self::STATUS_IM_USED => 'IM Used', // RFC 3229
62
+            self::STATUS_MULTIPLE_CHOICES => 'Multiple Choices',
63
+            self::STATUS_MOVED_PERMANENTLY => 'Moved Permanently',
64
+            self::STATUS_FOUND => 'Found',
65
+            self::STATUS_SEE_OTHER => 'See Other',
66
+            self::STATUS_NOT_MODIFIED => 'Not Modified',
67
+            self::STATUS_USE_PROXY => 'Use Proxy',
68
+            self::STATUS_RESERVED => 'Reserved',
69
+            self::STATUS_TEMPORARY_REDIRECT => 'Temporary Redirect',
70
+            self::STATUS_BAD_REQUEST => 'Bad request',
71
+            self::STATUS_UNAUTHORIZED => 'Unauthorized',
72
+            self::STATUS_PAYMENT_REQUIRED => 'Payment Required',
73
+            self::STATUS_FORBIDDEN => 'Forbidden',
74
+            self::STATUS_NOT_FOUND => 'Not Found',
75
+            self::STATUS_METHOD_NOT_ALLOWED => 'Method Not Allowed',
76
+            self::STATUS_NOT_ACCEPTABLE => 'Not Acceptable',
77
+            self::STATUS_PROXY_AUTHENTICATION_REQUIRED => 'Proxy Authentication Required',
78
+            self::STATUS_REQUEST_TIMEOUT => 'Request Timeout',
79
+            self::STATUS_CONFLICT => 'Conflict',
80
+            self::STATUS_GONE => 'Gone',
81
+            self::STATUS_LENGTH_REQUIRED => 'Length Required',
82
+            self::STATUS_PRECONDITION_FAILED => 'Precondition failed',
83
+            self::STATUS_REQUEST_ENTITY_TOO_LARGE => 'Request Entity Too Large',
84
+            self::STATUS_REQUEST_URI_TOO_LONG => 'Request-URI Too Long',
85
+            self::STATUS_UNSUPPORTED_MEDIA_TYPE => 'Unsupported Media Type',
86
+            self::STATUS_REQUEST_RANGE_NOT_SATISFIABLE => 'Requested Range Not Satisfiable',
87
+            self::STATUS_EXPECTATION_FAILED => 'Expectation Failed',
88
+            self::STATUS_IM_A_TEAPOT => 'I\'m a teapot', // RFC 2324
89
+            self::STATUS_UNPROCESSABLE_ENTITY => 'Unprocessable Entity', // RFC 4918
90
+            self::STATUS_LOCKED => 'Locked', // RFC 4918
91
+            self::STATUS_FAILED_DEPENDENCY => 'Failed Dependency', // RFC 4918
92
+            self::STATUS_UPGRADE_REQUIRED => 'Upgrade required',
93
+            self::STATUS_PRECONDITION_REQUIRED => 'Precondition required', // draft-nottingham-http-new-status
94
+            self::STATUS_TOO_MANY_REQUESTS => 'Too Many Requests', // draft-nottingham-http-new-status
95
+            self::STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE => 'Request Header Fields Too Large', // draft-nottingham-http-new-status
96
+            self::STATUS_INTERNAL_SERVER_ERROR => 'Internal Server Error',
97
+            self::STATUS_NOT_IMPLEMENTED => 'Not Implemented',
98
+            self::STATUS_BAD_GATEWAY => 'Bad Gateway',
99
+            self::STATUS_SERVICE_UNAVAILABLE => 'Service Unavailable',
100
+            self::STATUS_GATEWAY_TIMEOUT => 'Gateway Timeout',
101
+            self::STATUS_HTTP_VERSION_NOT_SUPPORTED => 'HTTP Version not supported',
102
+            self::STATUS_VARIANT_ALSO_NEGOTIATES => 'Variant Also Negotiates',
103
+            self::STATUS_INSUFFICIENT_STORAGE => 'Insufficient Storage', // RFC 4918
104
+            self::STATUS_LOOP_DETECTED => 'Loop Detected', // RFC 5842
105
+            self::STATUS_BANDWIDTH_LIMIT_EXCEEDED => 'Bandwidth Limit Exceeded', // non-standard
106
+            self::STATUS_NOT_EXTENDED => 'Not extended',
107
+            self::STATUS_NETWORK_AUTHENTICATION_REQUIRED => 'Network Authentication Required', // draft-nottingham-http-new-status
108
+        ];
109
+    }
110 110
 
111 111
 
112
-	/**
113
-	 * Gets the correct header
114
-	 * @param int Http::CONSTANT $status the constant from the Http class
115
-	 * @param \DateTime $lastModified formatted last modified date
116
-	 * @param string $ETag the etag
117
-	 * @return string
118
-	 */
119
-	public function getStatusHeader($status) {
120
-		// we have one change currently for the http 1.0 header that differs
121
-		// from 1.1: STATUS_TEMPORARY_REDIRECT should be STATUS_FOUND
122
-		// if this differs any more, we want to create childclasses for this
123
-		if ($status === self::STATUS_TEMPORARY_REDIRECT
124
-			&& $this->protocolVersion === 'HTTP/1.0') {
125
-			$status = self::STATUS_FOUND;
126
-		}
112
+    /**
113
+     * Gets the correct header
114
+     * @param int Http::CONSTANT $status the constant from the Http class
115
+     * @param \DateTime $lastModified formatted last modified date
116
+     * @param string $ETag the etag
117
+     * @return string
118
+     */
119
+    public function getStatusHeader($status) {
120
+        // we have one change currently for the http 1.0 header that differs
121
+        // from 1.1: STATUS_TEMPORARY_REDIRECT should be STATUS_FOUND
122
+        // if this differs any more, we want to create childclasses for this
123
+        if ($status === self::STATUS_TEMPORARY_REDIRECT
124
+            && $this->protocolVersion === 'HTTP/1.0') {
125
+            $status = self::STATUS_FOUND;
126
+        }
127 127
 
128
-		return $this->protocolVersion . ' ' . $status . ' ' .
129
-			$this->headers[$status];
130
-	}
128
+        return $this->protocolVersion . ' ' . $status . ' ' .
129
+            $this->headers[$status];
130
+    }
131 131
 }
Please login to merge, or discard this patch.
lib/public/Log/IFileBased.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -30,13 +30,13 @@
 block discarded – undo
30 30
  * @since 14.0.0
31 31
  */
32 32
 interface IFileBased {
33
-	/**
34
-	 * @since 14.0.0
35
-	 */
36
-	public function getLogFilePath():string;
33
+    /**
34
+     * @since 14.0.0
35
+     */
36
+    public function getLogFilePath():string;
37 37
 
38
-	/**
39
-	 * @since 14.0.0
40
-	 */
41
-	public function getEntries(int $limit = 50, int $offset = 0): array;
38
+    /**
39
+     * @since 14.0.0
40
+     */
41
+    public function getEntries(int $limit = 50, int $offset = 0): array;
42 42
 }
Please login to merge, or discard this patch.
lib/private/Hooks/PublicEmitter.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -29,15 +29,15 @@
 block discarded – undo
29 29
  * @deprecated 18.0.0 use events and the \OCP\EventDispatcher\IEventDispatcher service
30 30
  */
31 31
 class PublicEmitter extends BasicEmitter {
32
-	/**
33
-	 * @param string $scope
34
-	 * @param string $method
35
-	 * @param array $arguments optional
36
-	 * @deprecated 18.0.0 use \OCP\EventDispatcher\IEventDispatcher::dispatchTyped
37
-	 *
38
-	 * @suppress PhanAccessMethodProtected
39
-	 */
40
-	public function emit($scope, $method, array $arguments = []) {
41
-		parent::emit($scope, $method, $arguments);
42
-	}
32
+    /**
33
+     * @param string $scope
34
+     * @param string $method
35
+     * @param array $arguments optional
36
+     * @deprecated 18.0.0 use \OCP\EventDispatcher\IEventDispatcher::dispatchTyped
37
+     *
38
+     * @suppress PhanAccessMethodProtected
39
+     */
40
+    public function emit($scope, $method, array $arguments = []) {
41
+        parent::emit($scope, $method, $arguments);
42
+    }
43 43
 }
Please login to merge, or discard this patch.
lib/private/AppFramework/Http/Output.php 1 patch
Indentation   +65 added lines, -65 removed lines patch added patch discarded remove patch
@@ -32,77 +32,77 @@
 block discarded – undo
32 32
  * Very thin wrapper class to make output testable
33 33
  */
34 34
 class Output implements IOutput {
35
-	/** @var string */
36
-	private $webRoot;
35
+    /** @var string */
36
+    private $webRoot;
37 37
 
38
-	/**
39
-	 * @param $webRoot
40
-	 */
41
-	public function __construct($webRoot) {
42
-		$this->webRoot = $webRoot;
43
-	}
38
+    /**
39
+     * @param $webRoot
40
+     */
41
+    public function __construct($webRoot) {
42
+        $this->webRoot = $webRoot;
43
+    }
44 44
 
45
-	/**
46
-	 * @param string $out
47
-	 */
48
-	public function setOutput($out) {
49
-		print($out);
50
-	}
45
+    /**
46
+     * @param string $out
47
+     */
48
+    public function setOutput($out) {
49
+        print($out);
50
+    }
51 51
 
52
-	/**
53
-	 * @param string|resource $path or file handle
54
-	 *
55
-	 * @return bool false if an error occurred
56
-	 */
57
-	public function setReadfile($path) {
58
-		if (is_resource($path)) {
59
-			$output = fopen('php://output', 'w');
60
-			return stream_copy_to_stream($path, $output) > 0;
61
-		} else {
62
-			return @readfile($path);
63
-		}
64
-	}
52
+    /**
53
+     * @param string|resource $path or file handle
54
+     *
55
+     * @return bool false if an error occurred
56
+     */
57
+    public function setReadfile($path) {
58
+        if (is_resource($path)) {
59
+            $output = fopen('php://output', 'w');
60
+            return stream_copy_to_stream($path, $output) > 0;
61
+        } else {
62
+            return @readfile($path);
63
+        }
64
+    }
65 65
 
66
-	/**
67
-	 * @param string $header
68
-	 */
69
-	public function setHeader($header) {
70
-		header($header);
71
-	}
66
+    /**
67
+     * @param string $header
68
+     */
69
+    public function setHeader($header) {
70
+        header($header);
71
+    }
72 72
 
73
-	/**
74
-	 * @param int $code sets the http status code
75
-	 */
76
-	public function setHttpResponseCode($code) {
77
-		http_response_code($code);
78
-	}
73
+    /**
74
+     * @param int $code sets the http status code
75
+     */
76
+    public function setHttpResponseCode($code) {
77
+        http_response_code($code);
78
+    }
79 79
 
80
-	/**
81
-	 * @return int returns the current http response code
82
-	 */
83
-	public function getHttpResponseCode() {
84
-		return http_response_code();
85
-	}
80
+    /**
81
+     * @return int returns the current http response code
82
+     */
83
+    public function getHttpResponseCode() {
84
+        return http_response_code();
85
+    }
86 86
 
87
-	/**
88
-	 * @param string $name
89
-	 * @param string $value
90
-	 * @param int $expire
91
-	 * @param string $path
92
-	 * @param string $domain
93
-	 * @param bool $secure
94
-	 * @param bool $httpOnly
95
-	 */
96
-	public function setCookie($name, $value, $expire, $path, $domain, $secure, $httpOnly, $sameSite = 'Lax') {
97
-		$path = $this->webRoot ? : '/';
87
+    /**
88
+     * @param string $name
89
+     * @param string $value
90
+     * @param int $expire
91
+     * @param string $path
92
+     * @param string $domain
93
+     * @param bool $secure
94
+     * @param bool $httpOnly
95
+     */
96
+    public function setCookie($name, $value, $expire, $path, $domain, $secure, $httpOnly, $sameSite = 'Lax') {
97
+        $path = $this->webRoot ? : '/';
98 98
 
99
-		setcookie($name, $value, [
100
-			'expires' => $expire,
101
-			'path' => $path,
102
-			'domain' => $domain,
103
-			'secure' => $secure,
104
-			'httponly' => $httpOnly,
105
-			'samesite' => $sameSite
106
-		]);
107
-	}
99
+        setcookie($name, $value, [
100
+            'expires' => $expire,
101
+            'path' => $path,
102
+            'domain' => $domain,
103
+            'secure' => $secure,
104
+            'httponly' => $httpOnly,
105
+            'samesite' => $sameSite
106
+        ]);
107
+    }
108 108
 }
Please login to merge, or discard this patch.
core/Migrations/Version14000Date20180710092004.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -34,19 +34,19 @@
 block discarded – undo
34 34
 use OCP\Migration\SimpleMigrationStep;
35 35
 
36 36
 class Version14000Date20180710092004 extends SimpleMigrationStep {
37
-	public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
38
-		/** @var ISchemaWrapper $schema */
39
-		$schema = $schemaClosure();
37
+    public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
38
+        /** @var ISchemaWrapper $schema */
39
+        $schema = $schemaClosure();
40 40
 
41
-		$table = $schema->getTable('share');
41
+        $table = $schema->getTable('share');
42 42
 
43
-		if (!$table->hasColumn('password_by_talk')) {
44
-			$table->addColumn('password_by_talk', Types::BOOLEAN, [
45
-				'default' => 0,
46
-				'notnull' => false,
47
-			]);
48
-		}
43
+        if (!$table->hasColumn('password_by_talk')) {
44
+            $table->addColumn('password_by_talk', Types::BOOLEAN, [
45
+                'default' => 0,
46
+                'notnull' => false,
47
+            ]);
48
+        }
49 49
 
50
-		return $schema;
51
-	}
50
+        return $schema;
51
+    }
52 52
 }
Please login to merge, or discard this patch.
apps/dav/lib/Migration/Version1016Date20201109085907.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -32,30 +32,30 @@
 block discarded – undo
32 32
 use OCP\Migration\SimpleMigrationStep;
33 33
 
34 34
 class Version1016Date20201109085907 extends SimpleMigrationStep {
35
-	/**
36
-	 * @param IOutput $output
37
-	 * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
38
-	 * @param array $options
39
-	 * @return null|ISchemaWrapper
40
-	 */
41
-	public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
42
-		/** @var ISchemaWrapper $schema */
43
-		$schema = $schemaClosure();
44
-
45
-		$result = $this->ensureColumnIsNullable($schema, 'calendar_reminders', 'is_recurring');
46
-
47
-		return $result ? $schema : null;
48
-	}
49
-
50
-	protected function ensureColumnIsNullable(ISchemaWrapper $schema, string $tableName, string $columnName): bool {
51
-		$table = $schema->getTable($tableName);
52
-		$column = $table->getColumn($columnName);
53
-
54
-		if ($column->getNotnull()) {
55
-			$column->setNotnull(false);
56
-			return true;
57
-		}
58
-
59
-		return false;
60
-	}
35
+    /**
36
+     * @param IOutput $output
37
+     * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
38
+     * @param array $options
39
+     * @return null|ISchemaWrapper
40
+     */
41
+    public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
42
+        /** @var ISchemaWrapper $schema */
43
+        $schema = $schemaClosure();
44
+
45
+        $result = $this->ensureColumnIsNullable($schema, 'calendar_reminders', 'is_recurring');
46
+
47
+        return $result ? $schema : null;
48
+    }
49
+
50
+    protected function ensureColumnIsNullable(ISchemaWrapper $schema, string $tableName, string $columnName): bool {
51
+        $table = $schema->getTable($tableName);
52
+        $column = $table->getColumn($columnName);
53
+
54
+        if ($column->getNotnull()) {
55
+            $column->setNotnull(false);
56
+            return true;
57
+        }
58
+
59
+        return false;
60
+    }
61 61
 }
Please login to merge, or discard this patch.