Completed
Pull Request — master (#4617)
by Julius
14:00
created
lib/public/DB.php 1 patch
Indentation   +90 added lines, -90 removed lines patch added patch discarded remove patch
@@ -45,102 +45,102 @@
 block discarded – undo
45 45
  * @since 4.5.0
46 46
  */
47 47
 class DB {
48
-	/**
49
-	 * Prepare a SQL query
50
-	 * @param string $query Query string
51
-	 * @param int $limit Limit of the SQL statement
52
-	 * @param int $offset Offset of the SQL statement
53
-	 * @return \OC_DB_StatementWrapper prepared SQL query
54
-	 *
55
-	 * SQL query via Doctrine prepare(), needs to be execute()'d!
56
-	 * @deprecated 8.1.0 use prepare() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection()
57
-	 * @since 4.5.0
58
-	 */
59
-	static public function prepare( $query, $limit=null, $offset=null ) {
60
-		return(\OC_DB::prepare($query, $limit, $offset));
61
-	}
48
+    /**
49
+     * Prepare a SQL query
50
+     * @param string $query Query string
51
+     * @param int $limit Limit of the SQL statement
52
+     * @param int $offset Offset of the SQL statement
53
+     * @return \OC_DB_StatementWrapper prepared SQL query
54
+     *
55
+     * SQL query via Doctrine prepare(), needs to be execute()'d!
56
+     * @deprecated 8.1.0 use prepare() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection()
57
+     * @since 4.5.0
58
+     */
59
+    static public function prepare( $query, $limit=null, $offset=null ) {
60
+        return(\OC_DB::prepare($query, $limit, $offset));
61
+    }
62 62
 
63
-	/**
64
-	 * Insert a row if the matching row does not exists.
65
-	 *
66
-	 * @param string $table The table name (will replace *PREFIX* with the actual prefix)
67
-	 * @param array $input data that should be inserted into the table  (column name => value)
68
-	 * @param array|null $compare List of values that should be checked for "if not exists"
69
-	 *				If this is null or an empty array, all keys of $input will be compared
70
-	 * @return int number of inserted rows
71
-	 * @throws \Doctrine\DBAL\DBALException
72
-	 * @deprecated 8.1.0 use insertIfNotExist() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection()
73
-	 * @since 5.0.0 - parameter $compare was added in 8.1.0
74
-	 *
75
-	 */
76
-	public static function insertIfNotExist($table, $input, array $compare = null) {
77
-		return \OC::$server->getDatabaseConnection()->insertIfNotExist($table, $input, $compare);
78
-	}
63
+    /**
64
+     * Insert a row if the matching row does not exists.
65
+     *
66
+     * @param string $table The table name (will replace *PREFIX* with the actual prefix)
67
+     * @param array $input data that should be inserted into the table  (column name => value)
68
+     * @param array|null $compare List of values that should be checked for "if not exists"
69
+     *				If this is null or an empty array, all keys of $input will be compared
70
+     * @return int number of inserted rows
71
+     * @throws \Doctrine\DBAL\DBALException
72
+     * @deprecated 8.1.0 use insertIfNotExist() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection()
73
+     * @since 5.0.0 - parameter $compare was added in 8.1.0
74
+     *
75
+     */
76
+    public static function insertIfNotExist($table, $input, array $compare = null) {
77
+        return \OC::$server->getDatabaseConnection()->insertIfNotExist($table, $input, $compare);
78
+    }
79 79
 
80
-	/**
81
-	 * Gets last value of autoincrement
82
-	 * @param string $table The optional table name (will replace *PREFIX*) and add sequence suffix
83
-	 * @return string
84
-	 *
85
-	 * \Doctrine\DBAL\Connection lastInsertID()
86
-	 *
87
-	 * Call this method right after the insert command or other functions may
88
-	 * cause trouble!
89
-	 * @deprecated 8.1.0 use lastInsertId() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection()
90
-	 * @since 4.5.0
91
-	 */
92
-	public static function insertid($table=null) {
93
-		return \OC::$server->getDatabaseConnection()->lastInsertId($table);
94
-	}
80
+    /**
81
+     * Gets last value of autoincrement
82
+     * @param string $table The optional table name (will replace *PREFIX*) and add sequence suffix
83
+     * @return string
84
+     *
85
+     * \Doctrine\DBAL\Connection lastInsertID()
86
+     *
87
+     * Call this method right after the insert command or other functions may
88
+     * cause trouble!
89
+     * @deprecated 8.1.0 use lastInsertId() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection()
90
+     * @since 4.5.0
91
+     */
92
+    public static function insertid($table=null) {
93
+        return \OC::$server->getDatabaseConnection()->lastInsertId($table);
94
+    }
95 95
 
96
-	/**
97
-	 * Start a transaction
98
-	 * @deprecated 8.1.0 use beginTransaction() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection()
99
-	 * @since 4.5.0
100
-	 */
101
-	public static function beginTransaction() {
102
-		\OC::$server->getDatabaseConnection()->beginTransaction();
103
-	}
96
+    /**
97
+     * Start a transaction
98
+     * @deprecated 8.1.0 use beginTransaction() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection()
99
+     * @since 4.5.0
100
+     */
101
+    public static function beginTransaction() {
102
+        \OC::$server->getDatabaseConnection()->beginTransaction();
103
+    }
104 104
 
105
-	/**
106
-	 * Commit the database changes done during a transaction that is in progress
107
-	 * @deprecated 8.1.0 use commit() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection()
108
-	 * @since 4.5.0
109
-	 */
110
-	public static function commit() {
111
-		\OC::$server->getDatabaseConnection()->commit();
112
-	}
105
+    /**
106
+     * Commit the database changes done during a transaction that is in progress
107
+     * @deprecated 8.1.0 use commit() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection()
108
+     * @since 4.5.0
109
+     */
110
+    public static function commit() {
111
+        \OC::$server->getDatabaseConnection()->commit();
112
+    }
113 113
 
114
-	/**
115
-	 * Rollback the database changes done during a transaction that is in progress
116
-	 * @deprecated 8.1.0 use rollback() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection()
117
-	 * @since 8.0.0
118
-	 */
119
-	public static function rollback() {
120
-		\OC::$server->getDatabaseConnection()->rollback();
121
-	}
114
+    /**
115
+     * Rollback the database changes done during a transaction that is in progress
116
+     * @deprecated 8.1.0 use rollback() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection()
117
+     * @since 8.0.0
118
+     */
119
+    public static function rollback() {
120
+        \OC::$server->getDatabaseConnection()->rollback();
121
+    }
122 122
 
123
-	/**
124
-	 * Check if a result is an error, works with Doctrine
125
-	 * @param mixed $result
126
-	 * @return bool
127
-	 * @deprecated 8.1.0 Doctrine returns false on error (and throws an exception)
128
-	 * @since 4.5.0
129
-	 */
130
-	public static function isError($result) {
131
-		// Doctrine returns false on error (and throws an exception)
132
-		return $result === false;
133
-	}
123
+    /**
124
+     * Check if a result is an error, works with Doctrine
125
+     * @param mixed $result
126
+     * @return bool
127
+     * @deprecated 8.1.0 Doctrine returns false on error (and throws an exception)
128
+     * @since 4.5.0
129
+     */
130
+    public static function isError($result) {
131
+        // Doctrine returns false on error (and throws an exception)
132
+        return $result === false;
133
+    }
134 134
 
135
-	/**
136
-	 * returns the error code and message as a string for logging
137
-	 * works with DoctrineException
138
-	 * @return string
139
-	 * @deprecated 8.1.0 use getError() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection()
140
-	 * @since 6.0.0
141
-	 */
142
-	public static function getErrorMessage() {
143
-		return \OC::$server->getDatabaseConnection()->getError();
144
-	}
135
+    /**
136
+     * returns the error code and message as a string for logging
137
+     * works with DoctrineException
138
+     * @return string
139
+     * @deprecated 8.1.0 use getError() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection()
140
+     * @since 6.0.0
141
+     */
142
+    public static function getErrorMessage() {
143
+        return \OC::$server->getDatabaseConnection()->getError();
144
+    }
145 145
 
146 146
 }
Please login to merge, or discard this patch.
lib/public/Route/IRouter.php 1 patch
Indentation   +79 added lines, -79 removed lines patch added patch discarded remove patch
@@ -36,92 +36,92 @@
 block discarded – undo
36 36
  */
37 37
 interface IRouter {
38 38
 
39
-	/**
40
-	 * Get the files to load the routes from
41
-	 *
42
-	 * @return string[]
43
-	 * @since 7.0.0
44
-	 * @deprecated 9.0.0
45
-	 */
46
-	public function getRoutingFiles();
39
+    /**
40
+     * Get the files to load the routes from
41
+     *
42
+     * @return string[]
43
+     * @since 7.0.0
44
+     * @deprecated 9.0.0
45
+     */
46
+    public function getRoutingFiles();
47 47
 
48
-	/**
49
-	 * @return string
50
-	 * @since 7.0.0
51
-	 * @deprecated 9.0.0
52
-	 */
53
-	public function getCacheKey();
48
+    /**
49
+     * @return string
50
+     * @since 7.0.0
51
+     * @deprecated 9.0.0
52
+     */
53
+    public function getCacheKey();
54 54
 
55
-	/**
56
-	 * Loads the routes
57
-	 *
58
-	 * @param null|string $app
59
-	 * @since 7.0.0
60
-	 * @deprecated 9.0.0
61
-	 */
62
-	public function loadRoutes($app = null);
55
+    /**
56
+     * Loads the routes
57
+     *
58
+     * @param null|string $app
59
+     * @since 7.0.0
60
+     * @deprecated 9.0.0
61
+     */
62
+    public function loadRoutes($app = null);
63 63
 
64
-	/**
65
-	 * Sets the collection to use for adding routes
66
-	 *
67
-	 * @param string $name Name of the collection to use.
68
-	 * @return void
69
-	 * @since 7.0.0
70
-	 * @deprecated 9.0.0
71
-	 */
72
-	public function useCollection($name);
64
+    /**
65
+     * Sets the collection to use for adding routes
66
+     *
67
+     * @param string $name Name of the collection to use.
68
+     * @return void
69
+     * @since 7.0.0
70
+     * @deprecated 9.0.0
71
+     */
72
+    public function useCollection($name);
73 73
 
74
-	/**
75
-	 * returns the current collection name in use for adding routes
76
-	 *
77
-	 * @return string the collection name
78
-	 * @since 8.0.0
79
-	 * @deprecated 9.0.0
80
-	 */
81
-	public function getCurrentCollection();
74
+    /**
75
+     * returns the current collection name in use for adding routes
76
+     *
77
+     * @return string the collection name
78
+     * @since 8.0.0
79
+     * @deprecated 9.0.0
80
+     */
81
+    public function getCurrentCollection();
82 82
 
83
-	/**
84
-	 * Create a \OCP\Route\IRoute.
85
-	 *
86
-	 * @param string $name Name of the route to create.
87
-	 * @param string $pattern The pattern to match
88
-	 * @param array $defaults An array of default parameter values
89
-	 * @param array $requirements An array of requirements for parameters (regexes)
90
-	 * @return \OCP\Route\IRoute
91
-	 * @since 7.0.0
92
-	 * @deprecated 9.0.0
93
-	 */
94
-	public function create($name, $pattern, array $defaults = array(), array $requirements = array());
83
+    /**
84
+     * Create a \OCP\Route\IRoute.
85
+     *
86
+     * @param string $name Name of the route to create.
87
+     * @param string $pattern The pattern to match
88
+     * @param array $defaults An array of default parameter values
89
+     * @param array $requirements An array of requirements for parameters (regexes)
90
+     * @return \OCP\Route\IRoute
91
+     * @since 7.0.0
92
+     * @deprecated 9.0.0
93
+     */
94
+    public function create($name, $pattern, array $defaults = array(), array $requirements = array());
95 95
 
96
-	/**
97
-	 * Find the route matching $url.
98
-	 *
99
-	 * @param string $url The url to find
100
-	 * @throws \Exception
101
-	 * @return void
102
-	 * @since 7.0.0
103
-	 * @deprecated 9.0.0
104
-	 */
105
-	public function match($url);
96
+    /**
97
+     * Find the route matching $url.
98
+     *
99
+     * @param string $url The url to find
100
+     * @throws \Exception
101
+     * @return void
102
+     * @since 7.0.0
103
+     * @deprecated 9.0.0
104
+     */
105
+    public function match($url);
106 106
 
107
-	/**
108
-	 * Get the url generator
109
-	 *
110
-	 * @since 7.0.0
111
-	 * @deprecated 9.0.0
112
-	 */
113
-	public function getGenerator();
107
+    /**
108
+     * Get the url generator
109
+     *
110
+     * @since 7.0.0
111
+     * @deprecated 9.0.0
112
+     */
113
+    public function getGenerator();
114 114
 
115
-	/**
116
-	 * Generate url based on $name and $parameters
117
-	 *
118
-	 * @param string $name Name of the route to use.
119
-	 * @param array $parameters Parameters for the route
120
-	 * @param bool $absolute
121
-	 * @return string
122
-	 * @since 7.0.0
123
-	 * @deprecated 9.0.0
124
-	 */
125
-	public function generate($name, $parameters = array(), $absolute = false);
115
+    /**
116
+     * Generate url based on $name and $parameters
117
+     *
118
+     * @param string $name Name of the route to use.
119
+     * @param array $parameters Parameters for the route
120
+     * @param bool $absolute
121
+     * @return string
122
+     * @since 7.0.0
123
+     * @deprecated 9.0.0
124
+     */
125
+    public function generate($name, $parameters = array(), $absolute = false);
126 126
 
127 127
 }
Please login to merge, or discard this patch.
lib/public/Route/IRoute.php 1 patch
Indentation   +75 added lines, -75 removed lines patch added patch discarded remove patch
@@ -31,88 +31,88 @@
 block discarded – undo
31 31
  * @since 7.0.0
32 32
  */
33 33
 interface IRoute {
34
-	/**
35
-	 * Specify PATCH as the method to use with this route
36
-	 * @return \OCP\Route\IRoute
37
-	 * @since 7.0.0
38
-	 */
39
-	public function patch();
34
+    /**
35
+     * Specify PATCH as the method to use with this route
36
+     * @return \OCP\Route\IRoute
37
+     * @since 7.0.0
38
+     */
39
+    public function patch();
40 40
 
41
-	/**
42
-	 * Specify the method when this route is to be used
43
-	 *
44
-	 * @param string $method HTTP method (uppercase)
45
-	 * @return \OCP\Route\IRoute
46
-	 * @since 7.0.0
47
-	 */
48
-	public function method($method);
41
+    /**
42
+     * Specify the method when this route is to be used
43
+     *
44
+     * @param string $method HTTP method (uppercase)
45
+     * @return \OCP\Route\IRoute
46
+     * @since 7.0.0
47
+     */
48
+    public function method($method);
49 49
 
50
-	/**
51
-	 * The action to execute when this route matches, includes a file like
52
-	 * it is called directly
53
-	 *
54
-	 * @param string $file
55
-	 * @return void
56
-	 * @since 7.0.0
57
-	 */
58
-	public function actionInclude($file);
50
+    /**
51
+     * The action to execute when this route matches, includes a file like
52
+     * it is called directly
53
+     *
54
+     * @param string $file
55
+     * @return void
56
+     * @since 7.0.0
57
+     */
58
+    public function actionInclude($file);
59 59
 
60
-	/**
61
-	 * Specify GET as the method to use with this route
62
-	 * @return \OCP\Route\IRoute
63
-	 * @since 7.0.0
64
-	 */
65
-	public function get();
60
+    /**
61
+     * Specify GET as the method to use with this route
62
+     * @return \OCP\Route\IRoute
63
+     * @since 7.0.0
64
+     */
65
+    public function get();
66 66
 
67
-	/**
68
-	 * Specify POST as the method to use with this route
69
-	 * @return \OCP\Route\IRoute
70
-	 * @since 7.0.0
71
-	 */
72
-	public function post();
67
+    /**
68
+     * Specify POST as the method to use with this route
69
+     * @return \OCP\Route\IRoute
70
+     * @since 7.0.0
71
+     */
72
+    public function post();
73 73
 
74
-	/**
75
-	 * Specify DELETE as the method to use with this route
76
-	 * @return \OCP\Route\IRoute
77
-	 * @since 7.0.0
78
-	 */
79
-	public function delete();
74
+    /**
75
+     * Specify DELETE as the method to use with this route
76
+     * @return \OCP\Route\IRoute
77
+     * @since 7.0.0
78
+     */
79
+    public function delete();
80 80
 
81
-	/**
82
-	 * The action to execute when this route matches
83
-	 *
84
-	 * @param string|callable $class the class or a callable
85
-	 * @param string $function the function to use with the class
86
-	 * @return \OCP\Route\IRoute
87
-	 *
88
-	 * This function is called with $class set to a callable or
89
-	 * to the class with $function
90
-	 * @since 7.0.0
91
-	 */
92
-	public function action($class, $function = null);
81
+    /**
82
+     * The action to execute when this route matches
83
+     *
84
+     * @param string|callable $class the class or a callable
85
+     * @param string $function the function to use with the class
86
+     * @return \OCP\Route\IRoute
87
+     *
88
+     * This function is called with $class set to a callable or
89
+     * to the class with $function
90
+     * @since 7.0.0
91
+     */
92
+    public function action($class, $function = null);
93 93
 
94
-	/**
95
-	 * Defaults to use for this route
96
-	 *
97
-	 * @param array $defaults The defaults
98
-	 * @return \OCP\Route\IRoute
99
-	 * @since 7.0.0
100
-	 */
101
-	public function defaults($defaults);
94
+    /**
95
+     * Defaults to use for this route
96
+     *
97
+     * @param array $defaults The defaults
98
+     * @return \OCP\Route\IRoute
99
+     * @since 7.0.0
100
+     */
101
+    public function defaults($defaults);
102 102
 
103
-	/**
104
-	 * Requirements for this route
105
-	 *
106
-	 * @param array $requirements The requirements
107
-	 * @return \OCP\Route\IRoute
108
-	 * @since 7.0.0
109
-	 */
110
-	public function requirements($requirements);
103
+    /**
104
+     * Requirements for this route
105
+     *
106
+     * @param array $requirements The requirements
107
+     * @return \OCP\Route\IRoute
108
+     * @since 7.0.0
109
+     */
110
+    public function requirements($requirements);
111 111
 
112
-	/**
113
-	 * Specify PUT as the method to use with this route
114
-	 * @return \OCP\Route\IRoute
115
-	 * @since 7.0.0
116
-	 */
117
-	public function put();
112
+    /**
113
+     * Specify PUT as the method to use with this route
114
+     * @return \OCP\Route\IRoute
115
+     * @since 7.0.0
116
+     */
117
+    public function put();
118 118
 }
Please login to merge, or discard this patch.
lib/public/Response.php 1 patch
Indentation   +81 added lines, -81 removed lines patch added patch discarded remove patch
@@ -44,93 +44,93 @@
 block discarded – undo
44 44
  * @deprecated 8.1.0 - Use AppFramework controllers instead and modify the response object
45 45
  */
46 46
 class Response {
47
-	/**
48
-	 * Enable response caching by sending correct HTTP headers
49
-	 * @param int $cache_time time to cache the response
50
-	 *  >0		cache time in seconds
51
-	 *  0 and <0	enable default browser caching
52
-	 *  null		cache indefinitely
53
-	 * @since 4.0.0
54
-	 */
55
-	static public function enableCaching( $cache_time = null ) {
56
-		\OC_Response::enableCaching( $cache_time );
57
-	}
47
+    /**
48
+     * Enable response caching by sending correct HTTP headers
49
+     * @param int $cache_time time to cache the response
50
+     *  >0		cache time in seconds
51
+     *  0 and <0	enable default browser caching
52
+     *  null		cache indefinitely
53
+     * @since 4.0.0
54
+     */
55
+    static public function enableCaching( $cache_time = null ) {
56
+        \OC_Response::enableCaching( $cache_time );
57
+    }
58 58
 
59
-	/**
60
-	 * Checks and set Last-Modified header, when the request matches sends a
61
-	 * 'not modified' response
62
-	 * @param string $lastModified time when the response was last modified
63
-	 * @since 4.0.0
64
-	 */
65
-	static public function setLastModifiedHeader( $lastModified ) {
66
-		\OC_Response::setLastModifiedHeader( $lastModified );
67
-	}
59
+    /**
60
+     * Checks and set Last-Modified header, when the request matches sends a
61
+     * 'not modified' response
62
+     * @param string $lastModified time when the response was last modified
63
+     * @since 4.0.0
64
+     */
65
+    static public function setLastModifiedHeader( $lastModified ) {
66
+        \OC_Response::setLastModifiedHeader( $lastModified );
67
+    }
68 68
 
69
-	/**
70
-	 * Sets the content disposition header (with possible workarounds)
71
-	 * @param string $filename file name
72
-	 * @param string $type disposition type, either 'attachment' or 'inline'
73
-	 * @since 7.0.0
74
-	 */
75
-	static public function setContentDispositionHeader( $filename, $type = 'attachment' ) {
76
-		\OC_Response::setContentDispositionHeader( $filename, $type );
77
-	}
69
+    /**
70
+     * Sets the content disposition header (with possible workarounds)
71
+     * @param string $filename file name
72
+     * @param string $type disposition type, either 'attachment' or 'inline'
73
+     * @since 7.0.0
74
+     */
75
+    static public function setContentDispositionHeader( $filename, $type = 'attachment' ) {
76
+        \OC_Response::setContentDispositionHeader( $filename, $type );
77
+    }
78 78
 
79
-	/**
80
-	 * Sets the content length header (with possible workarounds)
81
-	 * @param string|int|float $length Length to be sent
82
-	 * @since 8.1.0
83
-	 */
84
-	static public function setContentLengthHeader($length) {
85
-		\OC_Response::setContentLengthHeader($length);
86
-	}
79
+    /**
80
+     * Sets the content length header (with possible workarounds)
81
+     * @param string|int|float $length Length to be sent
82
+     * @since 8.1.0
83
+     */
84
+    static public function setContentLengthHeader($length) {
85
+        \OC_Response::setContentLengthHeader($length);
86
+    }
87 87
 
88
-	/**
89
-	 * Disable browser caching
90
-	 * @see enableCaching with cache_time = 0
91
-	 * @since 4.0.0
92
-	 */
93
-	static public function disableCaching() {
94
-		\OC_Response::disableCaching();
95
-	}
88
+    /**
89
+     * Disable browser caching
90
+     * @see enableCaching with cache_time = 0
91
+     * @since 4.0.0
92
+     */
93
+    static public function disableCaching() {
94
+        \OC_Response::disableCaching();
95
+    }
96 96
 
97
-	/**
98
-	 * Checks and set ETag header, when the request matches sends a
99
-	 * 'not modified' response
100
-	 * @param string $etag token to use for modification check
101
-	 * @since 4.0.0
102
-	 */
103
-	static public function setETagHeader( $etag ) {
104
-		\OC_Response::setETagHeader( $etag );
105
-	}
97
+    /**
98
+     * Checks and set ETag header, when the request matches sends a
99
+     * 'not modified' response
100
+     * @param string $etag token to use for modification check
101
+     * @since 4.0.0
102
+     */
103
+    static public function setETagHeader( $etag ) {
104
+        \OC_Response::setETagHeader( $etag );
105
+    }
106 106
 
107
-	/**
108
-	 * Send file as response, checking and setting caching headers
109
-	 * @param string $filepath of file to send
110
-	 * @since 4.0.0
111
-	 * @deprecated 8.1.0 - Use \OCP\AppFramework\Http\StreamResponse or another AppFramework controller instead
112
-	 */
113
-	static public function sendFile( $filepath ) {
114
-		\OC_Response::sendFile( $filepath );
115
-	}
107
+    /**
108
+     * Send file as response, checking and setting caching headers
109
+     * @param string $filepath of file to send
110
+     * @since 4.0.0
111
+     * @deprecated 8.1.0 - Use \OCP\AppFramework\Http\StreamResponse or another AppFramework controller instead
112
+     */
113
+    static public function sendFile( $filepath ) {
114
+        \OC_Response::sendFile( $filepath );
115
+    }
116 116
 
117
-	/**
118
-	 * Set response expire time
119
-	 * @param string|\DateTime $expires date-time when the response expires
120
-	 *  string for DateInterval from now
121
-	 *  DateTime object when to expire response
122
-	 * @since 4.0.0
123
-	 */
124
-	static public function setExpiresHeader( $expires ) {
125
-		\OC_Response::setExpiresHeader( $expires );
126
-	}
117
+    /**
118
+     * Set response expire time
119
+     * @param string|\DateTime $expires date-time when the response expires
120
+     *  string for DateInterval from now
121
+     *  DateTime object when to expire response
122
+     * @since 4.0.0
123
+     */
124
+    static public function setExpiresHeader( $expires ) {
125
+        \OC_Response::setExpiresHeader( $expires );
126
+    }
127 127
 
128
-	/**
129
-	 * Send redirect response
130
-	 * @param string $location to redirect to
131
-	 * @since 4.0.0
132
-	 */
133
-	static public function redirect( $location ) {
134
-		\OC_Response::redirect( $location );
135
-	}
128
+    /**
129
+     * Send redirect response
130
+     * @param string $location to redirect to
131
+     * @since 4.0.0
132
+     */
133
+    static public function redirect( $location ) {
134
+        \OC_Response::redirect( $location );
135
+    }
136 136
 }
Please login to merge, or discard this patch.
lib/public/Template.php 1 patch
Indentation   +94 added lines, -94 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
  * @deprecated 8.0.0 Use \OCP\Template::image_path() instead
51 51
  */
52 52
 function image_path( $app, $image ) {
53
-	return(\image_path( $app, $image ));
53
+    return(\image_path( $app, $image ));
54 54
 }
55 55
 
56 56
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
  * @deprecated 8.0.0 Use \OCP\Template::mimetype_icon() instead
62 62
  */
63 63
 function mimetype_icon( $mimetype ) {
64
-	return(\mimetype_icon( $mimetype ));
64
+    return(\mimetype_icon( $mimetype ));
65 65
 }
66 66
 
67 67
 /**
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
  * @deprecated 8.0.0 Use \OCP\Template::preview_icon() instead
72 72
  */
73 73
 function preview_icon( $path ) {
74
-	return(\preview_icon( $path ));
74
+    return(\preview_icon( $path ));
75 75
 }
76 76
 
77 77
 /**
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
  * @deprecated 8.0.0 Use \OCP\Template::publicPreview_icon() instead
84 84
  */
85 85
 function publicPreview_icon ( $path, $token ) {
86
-	return(\publicPreview_icon( $path, $token ));
86
+    return(\publicPreview_icon( $path, $token ));
87 87
 }
88 88
 
89 89
 /**
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
  * @deprecated 8.0.0 Use \OCP\Template::human_file_size() instead
95 95
  */
96 96
 function human_file_size( $bytes ) {
97
-	return(\human_file_size( $bytes ));
97
+    return(\human_file_size( $bytes ));
98 98
 }
99 99
 
100 100
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
  * @deprecated 8.0.0 Use \OCP\Template::relative_modified_date() instead
108 108
  */
109 109
 function relative_modified_date( $timestamp, $dateOnly = false ) {
110
-	return(\relative_modified_date($timestamp, null, $dateOnly));
110
+    return(\relative_modified_date($timestamp, null, $dateOnly));
111 111
 }
112 112
 
113 113
 
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
  * @deprecated 8.0.0 Use \OCP\Template::human_file_size() instead
119 119
  */
120 120
 function simple_file_size($bytes) {
121
-	return(\human_file_size($bytes));
121
+    return(\human_file_size($bytes));
122 122
 }
123 123
 
124 124
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
  * @deprecated 8.0.0 Use \OCP\Template::html_select_options() instead
132 132
  */
133 133
 function html_select_options($options, $selected, $params=array()) {
134
-	return(\html_select_options($options, $selected, $params));
134
+    return(\html_select_options($options, $selected, $params));
135 135
 }
136 136
 
137 137
 
@@ -142,90 +142,90 @@  discard block
 block discarded – undo
142 142
  * @since 8.0.0
143 143
  */
144 144
 class Template extends \OC_Template {
145
-	/**
146
-	 * Make OC_Helper::imagePath available as a simple function
147
-	 *
148
-	 * @see \OCP\IURLGenerator::imagePath
149
-	 *
150
-	 * @param string $app
151
-	 * @param string $image
152
-	 * @return string to the image
153
-	 * @since 8.0.0
154
-	 */
155
-	public static function image_path($app, $image) {
156
-		return \image_path($app, $image);
157
-	}
158
-
159
-
160
-	/**
161
-	 * Make OC_Helper::mimetypeIcon available as a simple function
162
-	 *
163
-	 * @param string $mimetype
164
-	 * @return string to the image of this file type.
165
-	 * @since 8.0.0
166
-	 */
167
-	public static function mimetype_icon($mimetype) {
168
-		return \mimetype_icon($mimetype);
169
-	}
170
-
171
-	/**
172
-	 * Make preview_icon available as a simple function
173
-	 *
174
-	 * @param string $path path to file
175
-	 * @return string to the preview of the image
176
-	 * @since 8.0.0
177
-	 */
178
-	public static function preview_icon($path) {
179
-		return \preview_icon($path);
180
-	}
181
-
182
-	/**
183
-	 * Make publicpreview_icon available as a simple function
184
-	 * Returns the path to the preview of the image.
185
-	 *
186
-	 * @param string $path of file
187
-	 * @param string $token
188
-	 * @return string link to the preview
189
-	 * @since 8.0.0
190
-	 */
191
-	public static function publicPreview_icon($path, $token) {
192
-		return \publicPreview_icon($path, $token);
193
-	}
194
-
195
-	/**
196
-	 * Make OC_Helper::humanFileSize available as a simple function
197
-	 * Example: 2048 to 2 kB.
198
-	 *
199
-	 * @param int $bytes in bytes
200
-	 * @return string size as string
201
-	 * @since 8.0.0
202
-	 */
203
-	public static function human_file_size($bytes) {
204
-		return \human_file_size($bytes);
205
-	}
206
-
207
-	/**
208
-	 * Return the relative date in relation to today. Returns something like "last hour" or "two month ago"
209
-	 *
210
-	 * @param int $timestamp unix timestamp
211
-	 * @param boolean $dateOnly
212
-	 * @return string human readable interpretation of the timestamp
213
-	 * @since 8.0.0
214
-	 */
215
-	public static function relative_modified_date($timestamp, $dateOnly = false) {
216
-		return \relative_modified_date($timestamp, null, $dateOnly);
217
-	}
218
-
219
-	/**
220
-	 * Generate html code for an options block.
221
-	 *
222
-	 * @param array $options the options
223
-	 * @param mixed $selected which one is selected?
224
-	 * @param array $params the parameters
225
-	 * @return string html options
226
-	 * @since 8.0.0
227
-	 */
228
-	public static function html_select_options($options, $selected, $params=array()) {
229
-		return \html_select_options($options, $selected, $params);
230
-	}
145
+    /**
146
+     * Make OC_Helper::imagePath available as a simple function
147
+     *
148
+     * @see \OCP\IURLGenerator::imagePath
149
+     *
150
+     * @param string $app
151
+     * @param string $image
152
+     * @return string to the image
153
+     * @since 8.0.0
154
+     */
155
+    public static function image_path($app, $image) {
156
+        return \image_path($app, $image);
157
+    }
158
+
159
+
160
+    /**
161
+     * Make OC_Helper::mimetypeIcon available as a simple function
162
+     *
163
+     * @param string $mimetype
164
+     * @return string to the image of this file type.
165
+     * @since 8.0.0
166
+     */
167
+    public static function mimetype_icon($mimetype) {
168
+        return \mimetype_icon($mimetype);
169
+    }
170
+
171
+    /**
172
+     * Make preview_icon available as a simple function
173
+     *
174
+     * @param string $path path to file
175
+     * @return string to the preview of the image
176
+     * @since 8.0.0
177
+     */
178
+    public static function preview_icon($path) {
179
+        return \preview_icon($path);
180
+    }
181
+
182
+    /**
183
+     * Make publicpreview_icon available as a simple function
184
+     * Returns the path to the preview of the image.
185
+     *
186
+     * @param string $path of file
187
+     * @param string $token
188
+     * @return string link to the preview
189
+     * @since 8.0.0
190
+     */
191
+    public static function publicPreview_icon($path, $token) {
192
+        return \publicPreview_icon($path, $token);
193
+    }
194
+
195
+    /**
196
+     * Make OC_Helper::humanFileSize available as a simple function
197
+     * Example: 2048 to 2 kB.
198
+     *
199
+     * @param int $bytes in bytes
200
+     * @return string size as string
201
+     * @since 8.0.0
202
+     */
203
+    public static function human_file_size($bytes) {
204
+        return \human_file_size($bytes);
205
+    }
206
+
207
+    /**
208
+     * Return the relative date in relation to today. Returns something like "last hour" or "two month ago"
209
+     *
210
+     * @param int $timestamp unix timestamp
211
+     * @param boolean $dateOnly
212
+     * @return string human readable interpretation of the timestamp
213
+     * @since 8.0.0
214
+     */
215
+    public static function relative_modified_date($timestamp, $dateOnly = false) {
216
+        return \relative_modified_date($timestamp, null, $dateOnly);
217
+    }
218
+
219
+    /**
220
+     * Generate html code for an options block.
221
+     *
222
+     * @param array $options the options
223
+     * @param mixed $selected which one is selected?
224
+     * @param array $params the parameters
225
+     * @return string html options
226
+     * @since 8.0.0
227
+     */
228
+    public static function html_select_options($options, $selected, $params=array()) {
229
+        return \html_select_options($options, $selected, $params);
230
+    }
231 231
 }
Please login to merge, or discard this patch.
lib/public/INavigationManager.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -39,22 +39,22 @@
 block discarded – undo
39 39
  * @since 6.0.0
40 40
  */
41 41
 interface INavigationManager {
42
-	/**
43
-	 * Creates a new navigation entry
44
-	 *
45
-	 * @param array|\Closure $entry Array containing: id, name, order, icon and href key
46
-	 *					The use of a closure is preferred, because it will avoid
47
-	 * 					loading the routing of your app, unless required.
48
-	 * @return void
49
-	 * @since 6.0.0
50
-	 */
51
-	public function add($entry);
42
+    /**
43
+     * Creates a new navigation entry
44
+     *
45
+     * @param array|\Closure $entry Array containing: id, name, order, icon and href key
46
+     *					The use of a closure is preferred, because it will avoid
47
+     * 					loading the routing of your app, unless required.
48
+     * @return void
49
+     * @since 6.0.0
50
+     */
51
+    public function add($entry);
52 52
 
53
-	/**
54
-	 * Sets the current navigation entry of the currently running app
55
-	 * @param string $appId id of the app entry to activate (from added $entry)
56
-	 * @return void
57
-	 * @since 6.0.0
58
-	 */
59
-	public function setActiveEntry($appId);
53
+    /**
54
+     * Sets the current navigation entry of the currently running app
55
+     * @param string $appId id of the app entry to activate (from added $entry)
56
+     * @return void
57
+     * @since 6.0.0
58
+     */
59
+    public function setActiveEntry($appId);
60 60
 }
Please login to merge, or discard this patch.
lib/public/IEventSource.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -33,20 +33,20 @@
 block discarded – undo
33 33
  * @since 8.0.0
34 34
  */
35 35
 interface IEventSource {
36
-	/**
37
-	 * send a message to the client
38
-	 *
39
-	 * @param string $type
40
-	 * @param mixed $data
41
-	 *
42
-	 * if only one parameter is given, a typeless message will be send with that parameter as data
43
-	 * @since 8.0.0
44
-	 */
45
-	public function send($type, $data = null);
36
+    /**
37
+     * send a message to the client
38
+     *
39
+     * @param string $type
40
+     * @param mixed $data
41
+     *
42
+     * if only one parameter is given, a typeless message will be send with that parameter as data
43
+     * @since 8.0.0
44
+     */
45
+    public function send($type, $data = null);
46 46
 
47
-	/**
48
-	 * close the connection of the event source
49
-	 * @since 8.0.0
50
-	 */
51
-	public function close();
47
+    /**
48
+     * close the connection of the event source
49
+     * @since 8.0.0
50
+     */
51
+    public function close();
52 52
 }
Please login to merge, or discard this patch.
lib/public/IUser.php 1 patch
Indentation   +166 added lines, -166 removed lines patch added patch discarded remove patch
@@ -34,170 +34,170 @@
 block discarded – undo
34 34
  */
35 35
 interface IUser {
36 36
 
37
-	/**
38
-	 * get the user id
39
-	 *
40
-	 * @return string
41
-	 * @since 8.0.0
42
-	 */
43
-	public function getUID();
44
-
45
-	/**
46
-	 * get the display name for the user, if no specific display name is set it will fallback to the user id
47
-	 *
48
-	 * @return string
49
-	 * @since 8.0.0
50
-	 */
51
-	public function getDisplayName();
52
-
53
-	/**
54
-	 * set the display name for the user
55
-	 *
56
-	 * @param string $displayName
57
-	 * @return bool
58
-	 * @since 8.0.0
59
-	 */
60
-	public function setDisplayName($displayName);
61
-
62
-	/**
63
-	 * returns the timestamp of the user's last login or 0 if the user did never
64
-	 * login
65
-	 *
66
-	 * @return int
67
-	 * @since 8.0.0
68
-	 */
69
-	public function getLastLogin();
70
-
71
-	/**
72
-	 * updates the timestamp of the most recent login of this user
73
-	 * @since 8.0.0
74
-	 */
75
-	public function updateLastLoginTimestamp();
76
-
77
-	/**
78
-	 * Delete the user
79
-	 *
80
-	 * @return bool
81
-	 * @since 8.0.0
82
-	 */
83
-	public function delete();
84
-
85
-	/**
86
-	 * Set the password of the user
87
-	 *
88
-	 * @param string $password
89
-	 * @param string $recoveryPassword for the encryption app to reset encryption keys
90
-	 * @return bool
91
-	 * @since 8.0.0
92
-	 */
93
-	public function setPassword($password, $recoveryPassword = null);
94
-
95
-	/**
96
-	 * get the users home folder to mount
97
-	 *
98
-	 * @return string
99
-	 * @since 8.0.0
100
-	 */
101
-	public function getHome();
102
-
103
-	/**
104
-	 * Get the name of the backend class the user is connected with
105
-	 *
106
-	 * @return string
107
-	 * @since 8.0.0
108
-	 */
109
-	public function getBackendClassName();
110
-
111
-	/**
112
-	 * check if the backend allows the user to change his avatar on Personal page
113
-	 *
114
-	 * @return bool
115
-	 * @since 8.0.0
116
-	 */
117
-	public function canChangeAvatar();
118
-
119
-	/**
120
-	 * check if the backend supports changing passwords
121
-	 *
122
-	 * @return bool
123
-	 * @since 8.0.0
124
-	 */
125
-	public function canChangePassword();
126
-
127
-	/**
128
-	 * check if the backend supports changing display names
129
-	 *
130
-	 * @return bool
131
-	 * @since 8.0.0
132
-	 */
133
-	public function canChangeDisplayName();
134
-
135
-	/**
136
-	 * check if the user is enabled
137
-	 *
138
-	 * @return bool
139
-	 * @since 8.0.0
140
-	 */
141
-	public function isEnabled();
142
-
143
-	/**
144
-	 * set the enabled status for the user
145
-	 *
146
-	 * @param bool $enabled
147
-	 * @since 8.0.0
148
-	 */
149
-	public function setEnabled($enabled);
150
-
151
-	/**
152
-	 * get the users email address
153
-	 *
154
-	 * @return string|null
155
-	 * @since 9.0.0
156
-	 */
157
-	public function getEMailAddress();
158
-
159
-	/**
160
-	 * get the avatar image if it exists
161
-	 *
162
-	 * @param int $size
163
-	 * @return IImage|null
164
-	 * @since 9.0.0
165
-	 */
166
-	public function getAvatarImage($size);
167
-
168
-	/**
169
-	 * get the federation cloud id
170
-	 *
171
-	 * @return string
172
-	 * @since 9.0.0
173
-	 */
174
-	public function getCloudId();
175
-
176
-	/**
177
-	 * set the email address of the user
178
-	 *
179
-	 * @param string|null $mailAddress
180
-	 * @return void
181
-	 * @since 9.0.0
182
-	 */
183
-	public function setEMailAddress($mailAddress);
184
-
185
-	/**
186
-	 * get the users' quota in human readable form. If a specific quota is not
187
-	 * set for the user, the default value is returned. If a default setting
188
-	 * was not set otherwise, it is return as 'none', i.e. quota is not limited.
189
-	 *
190
-	 * @return string
191
-	 * @since 9.0.0
192
-	 */
193
-	public function getQuota();
194
-
195
-	/**
196
-	 * set the users' quota
197
-	 *
198
-	 * @param string $quota
199
-	 * @return void
200
-	 * @since 9.0.0
201
-	 */
202
-	public function setQuota($quota);
37
+    /**
38
+     * get the user id
39
+     *
40
+     * @return string
41
+     * @since 8.0.0
42
+     */
43
+    public function getUID();
44
+
45
+    /**
46
+     * get the display name for the user, if no specific display name is set it will fallback to the user id
47
+     *
48
+     * @return string
49
+     * @since 8.0.0
50
+     */
51
+    public function getDisplayName();
52
+
53
+    /**
54
+     * set the display name for the user
55
+     *
56
+     * @param string $displayName
57
+     * @return bool
58
+     * @since 8.0.0
59
+     */
60
+    public function setDisplayName($displayName);
61
+
62
+    /**
63
+     * returns the timestamp of the user's last login or 0 if the user did never
64
+     * login
65
+     *
66
+     * @return int
67
+     * @since 8.0.0
68
+     */
69
+    public function getLastLogin();
70
+
71
+    /**
72
+     * updates the timestamp of the most recent login of this user
73
+     * @since 8.0.0
74
+     */
75
+    public function updateLastLoginTimestamp();
76
+
77
+    /**
78
+     * Delete the user
79
+     *
80
+     * @return bool
81
+     * @since 8.0.0
82
+     */
83
+    public function delete();
84
+
85
+    /**
86
+     * Set the password of the user
87
+     *
88
+     * @param string $password
89
+     * @param string $recoveryPassword for the encryption app to reset encryption keys
90
+     * @return bool
91
+     * @since 8.0.0
92
+     */
93
+    public function setPassword($password, $recoveryPassword = null);
94
+
95
+    /**
96
+     * get the users home folder to mount
97
+     *
98
+     * @return string
99
+     * @since 8.0.0
100
+     */
101
+    public function getHome();
102
+
103
+    /**
104
+     * Get the name of the backend class the user is connected with
105
+     *
106
+     * @return string
107
+     * @since 8.0.0
108
+     */
109
+    public function getBackendClassName();
110
+
111
+    /**
112
+     * check if the backend allows the user to change his avatar on Personal page
113
+     *
114
+     * @return bool
115
+     * @since 8.0.0
116
+     */
117
+    public function canChangeAvatar();
118
+
119
+    /**
120
+     * check if the backend supports changing passwords
121
+     *
122
+     * @return bool
123
+     * @since 8.0.0
124
+     */
125
+    public function canChangePassword();
126
+
127
+    /**
128
+     * check if the backend supports changing display names
129
+     *
130
+     * @return bool
131
+     * @since 8.0.0
132
+     */
133
+    public function canChangeDisplayName();
134
+
135
+    /**
136
+     * check if the user is enabled
137
+     *
138
+     * @return bool
139
+     * @since 8.0.0
140
+     */
141
+    public function isEnabled();
142
+
143
+    /**
144
+     * set the enabled status for the user
145
+     *
146
+     * @param bool $enabled
147
+     * @since 8.0.0
148
+     */
149
+    public function setEnabled($enabled);
150
+
151
+    /**
152
+     * get the users email address
153
+     *
154
+     * @return string|null
155
+     * @since 9.0.0
156
+     */
157
+    public function getEMailAddress();
158
+
159
+    /**
160
+     * get the avatar image if it exists
161
+     *
162
+     * @param int $size
163
+     * @return IImage|null
164
+     * @since 9.0.0
165
+     */
166
+    public function getAvatarImage($size);
167
+
168
+    /**
169
+     * get the federation cloud id
170
+     *
171
+     * @return string
172
+     * @since 9.0.0
173
+     */
174
+    public function getCloudId();
175
+
176
+    /**
177
+     * set the email address of the user
178
+     *
179
+     * @param string|null $mailAddress
180
+     * @return void
181
+     * @since 9.0.0
182
+     */
183
+    public function setEMailAddress($mailAddress);
184
+
185
+    /**
186
+     * get the users' quota in human readable form. If a specific quota is not
187
+     * set for the user, the default value is returned. If a default setting
188
+     * was not set otherwise, it is return as 'none', i.e. quota is not limited.
189
+     *
190
+     * @return string
191
+     * @since 9.0.0
192
+     */
193
+    public function getQuota();
194
+
195
+    /**
196
+     * set the users' quota
197
+     *
198
+     * @param string $quota
199
+     * @return void
200
+     * @since 9.0.0
201
+     */
202
+    public function setQuota($quota);
203 203
 }
Please login to merge, or discard this patch.
lib/public/Capabilities/ICapability.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -36,12 +36,12 @@
 block discarded – undo
36 36
  */
37 37
 interface ICapability {
38 38
 
39
-	/**
40
-	 * Function an app uses to return the capabilities
41
-	 *
42
-	 * @return array Array containing the apps capabilities
43
-	 * @since 8.2.0
44
-	 */
45
-	public function getCapabilities();
39
+    /**
40
+     * Function an app uses to return the capabilities
41
+     *
42
+     * @return array Array containing the apps capabilities
43
+     * @since 8.2.0
44
+     */
45
+    public function getCapabilities();
46 46
 }
47 47
 
Please login to merge, or discard this patch.