diff options
Diffstat (limited to 'lib/public')
96 files changed, 159 insertions, 199 deletions
diff --git a/lib/public/Accounts/PropertyDoesNotExistException.php b/lib/public/Accounts/PropertyDoesNotExistException.php index 0aa5b4c394c..e9e57dd8779 100644 --- a/lib/public/Accounts/PropertyDoesNotExistException.php +++ b/lib/public/Accounts/PropertyDoesNotExistException.php @@ -37,7 +37,7 @@ class PropertyDoesNotExistException extends \Exception { * @param string $msg the error message * @since 15.0.0 */ - public function __construct($property){ + public function __construct($property) { parent::__construct('Property ' . $property . ' does not exist.'); } diff --git a/lib/public/Activity/IEventMerger.php b/lib/public/Activity/IEventMerger.php index a8f75875c6f..90d9cecb756 100644 --- a/lib/public/Activity/IEventMerger.php +++ b/lib/public/Activity/IEventMerger.php @@ -23,7 +23,6 @@ namespace OCP\Activity; - /** * Interface EventMerger * diff --git a/lib/public/App.php b/lib/public/App.php index 9b30ef4cf93..8e4a983c6bf 100644 --- a/lib/public/App.php +++ b/lib/public/App.php @@ -55,9 +55,9 @@ class App { * @return void * @since 4.0.0 * @deprecated 14.0.0 Use settings section in appinfo.xml to register personal admin sections - */ - public static function registerPersonal( $app, $page ) { - \OC_App::registerPersonal( $app, $page ); + */ + public static function registerPersonal($app, $page) { + \OC_App::registerPersonal($app, $page); } /** @@ -68,8 +68,8 @@ class App { * @since 4.0.0 * @deprecated 14.0.0 Use settings section in appinfo.xml to register admin sections */ - public static function registerAdmin( $app, $page ) { - \OC_App::registerAdmin( $app, $page ); + public static function registerAdmin($app, $page) { + \OC_App::registerAdmin($app, $page); } /** @@ -79,9 +79,9 @@ class App { * @return array|null * @deprecated 14.0.0 ise \OC::$server->getAppManager()->getAppInfo($appId) * @since 4.0.0 - */ - public static function getAppInfo( $app, $path=false ) { - return \OC_App::getAppInfo( $app, $path); + */ + public static function getAppInfo($app, $path=false) { + return \OC_App::getAppInfo($app, $path); } /** @@ -93,8 +93,8 @@ class App { * @since 4.0.0 * @deprecated 13.0.0 use \OC::$server->getAppManager()->isEnabledForUser($appId) */ - public static function isEnabled( $app ) { - return \OC::$server->getAppManager()->isEnabledForUser( $app ); + public static function isEnabled($app) { + return \OC::$server->getAppManager()->isEnabledForUser($app); } /** @@ -104,7 +104,7 @@ class App { * @since 4.0.0 * @deprecated 14.0.0 use \OC::$server->getAppManager()->getAppVersion($appId) */ - public static function getAppVersion( $app ) { + public static function getAppVersion($app) { return \OC::$server->getAppManager()->getAppVersion($app); } } diff --git a/lib/public/AppFramework/ApiController.php b/lib/public/AppFramework/ApiController.php index d09a2d5c290..feae56fc2c0 100644 --- a/lib/public/AppFramework/ApiController.php +++ b/lib/public/AppFramework/ApiController.php @@ -39,60 +39,60 @@ use OCP\IRequest; */ abstract class ApiController extends Controller { - private $corsMethods; - private $corsAllowedHeaders; - private $corsMaxAge; + private $corsMethods; + private $corsAllowedHeaders; + private $corsMaxAge; - /** - * constructor of the controller - * @param string $appName the name of the app - * @param IRequest $request an instance of the request - * @param string $corsMethods comma separated string of HTTP verbs which - * should be allowed for websites or webapps when calling your API, defaults to - * 'PUT, POST, GET, DELETE, PATCH' - * @param string $corsAllowedHeaders comma separated string of HTTP headers - * which should be allowed for websites or webapps when calling your API, - * defaults to 'Authorization, Content-Type, Accept' - * @param int $corsMaxAge number in seconds how long a preflighted OPTIONS - * request should be cached, defaults to 1728000 seconds + /** + * constructor of the controller + * @param string $appName the name of the app + * @param IRequest $request an instance of the request + * @param string $corsMethods comma separated string of HTTP verbs which + * should be allowed for websites or webapps when calling your API, defaults to + * 'PUT, POST, GET, DELETE, PATCH' + * @param string $corsAllowedHeaders comma separated string of HTTP headers + * which should be allowed for websites or webapps when calling your API, + * defaults to 'Authorization, Content-Type, Accept' + * @param int $corsMaxAge number in seconds how long a preflighted OPTIONS + * request should be cached, defaults to 1728000 seconds * @since 7.0.0 - */ - public function __construct($appName, - IRequest $request, - $corsMethods='PUT, POST, GET, DELETE, PATCH', - $corsAllowedHeaders='Authorization, Content-Type, Accept', - $corsMaxAge=1728000){ - parent::__construct($appName, $request); - $this->corsMethods = $corsMethods; - $this->corsAllowedHeaders = $corsAllowedHeaders; - $this->corsMaxAge = $corsMaxAge; - } + */ + public function __construct($appName, + IRequest $request, + $corsMethods='PUT, POST, GET, DELETE, PATCH', + $corsAllowedHeaders='Authorization, Content-Type, Accept', + $corsMaxAge=1728000) { + parent::__construct($appName, $request); + $this->corsMethods = $corsMethods; + $this->corsAllowedHeaders = $corsAllowedHeaders; + $this->corsMaxAge = $corsMaxAge; + } - /** - * This method implements a preflighted cors response for you that you can - * link to for the options request - * - * @NoAdminRequired - * @NoCSRFRequired - * @PublicPage + /** + * This method implements a preflighted cors response for you that you can + * link to for the options request + * + * @NoAdminRequired + * @NoCSRFRequired + * @PublicPage * @since 7.0.0 - */ - public function preflightedCors() { - if(isset($this->request->server['HTTP_ORIGIN'])) { - $origin = $this->request->server['HTTP_ORIGIN']; - } else { - $origin = '*'; - } + */ + public function preflightedCors() { + if(isset($this->request->server['HTTP_ORIGIN'])) { + $origin = $this->request->server['HTTP_ORIGIN']; + } else { + $origin = '*'; + } - $response = new Response(); - $response->addHeader('Access-Control-Allow-Origin', $origin); - $response->addHeader('Access-Control-Allow-Methods', $this->corsMethods); - $response->addHeader('Access-Control-Max-Age', (string)$this->corsMaxAge); - $response->addHeader('Access-Control-Allow-Headers', $this->corsAllowedHeaders); - $response->addHeader('Access-Control-Allow-Credentials', 'false'); - return $response; - } + $response = new Response(); + $response->addHeader('Access-Control-Allow-Origin', $origin); + $response->addHeader('Access-Control-Allow-Methods', $this->corsMethods); + $response->addHeader('Access-Control-Max-Age', (string)$this->corsMaxAge); + $response->addHeader('Access-Control-Allow-Headers', $this->corsAllowedHeaders); + $response->addHeader('Access-Control-Allow-Credentials', 'false'); + return $response; + } } diff --git a/lib/public/AppFramework/App.php b/lib/public/AppFramework/App.php index d6bf23e4afe..7bf9e72637b 100644 --- a/lib/public/AppFramework/App.php +++ b/lib/public/AppFramework/App.php @@ -37,6 +37,7 @@ declare(strict_types=1); */ namespace OCP\AppFramework; + use OC\AppFramework\Routing\RouteConfig; use OC\ServerContainer; use OCP\Route\IRouter; diff --git a/lib/public/AppFramework/Controller.php b/lib/public/AppFramework/Controller.php index 2e442c49768..487b6a854fe 100644 --- a/lib/public/AppFramework/Controller.php +++ b/lib/public/AppFramework/Controller.php @@ -73,7 +73,7 @@ abstract class Controller { * @since 6.0.0 - parameter $appName was added in 7.0.0 - parameter $app was removed in 7.0.0 */ public function __construct($appName, - IRequest $request) { + IRequest $request) { $this->appName = $appName; $this->request = $request; diff --git a/lib/public/AppFramework/Db/DoesNotExistException.php b/lib/public/AppFramework/Db/DoesNotExistException.php index 45008473c21..36cab24db76 100644 --- a/lib/public/AppFramework/Db/DoesNotExistException.php +++ b/lib/public/AppFramework/Db/DoesNotExistException.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OCP\AppFramework\Db; - /** * This is returned or should be returned when a find request does not find an * entry in the database @@ -40,7 +39,7 @@ class DoesNotExistException extends \Exception implements IMapperException { * @param string $msg the error message * @since 7.0.0 */ - public function __construct($msg){ + public function __construct($msg) { parent::__construct($msg); } diff --git a/lib/public/AppFramework/Db/Entity.php b/lib/public/AppFramework/Db/Entity.php index 7340df55fc4..6221f96b375 100644 --- a/lib/public/AppFramework/Db/Entity.php +++ b/lib/public/AppFramework/Db/Entity.php @@ -25,7 +25,6 @@ namespace OCP\AppFramework\Db; - use function lcfirst; use function substr; @@ -66,7 +65,7 @@ abstract class Entity { * @param array $row the row to map onto the entity * @since 7.0.0 */ - public static function fromRow(array $row){ + public static function fromRow(array $row) { $instance = new static(); foreach($row as $key => $value){ @@ -94,7 +93,7 @@ abstract class Entity { * Marks the entity as clean needed for setting the id after the insertion * @since 7.0.0 */ - public function resetUpdatedFields(){ + public function resetUpdatedFields() { $this->_updatedFields = []; } @@ -176,7 +175,7 @@ abstract class Entity { * @param string $attribute the name of the attribute * @since 7.0.0 */ - protected function markFieldUpdated($attribute){ + protected function markFieldUpdated($attribute) { $this->_updatedFields[$attribute] = true; } @@ -187,7 +186,7 @@ abstract class Entity { * @return string the property name * @since 7.0.0 */ - public function columnToProperty($columnName){ + public function columnToProperty($columnName) { $parts = explode('_', $columnName); $property = null; @@ -209,7 +208,7 @@ abstract class Entity { * @return string the column name * @since 7.0.0 */ - public function propertyToColumn($property){ + public function propertyToColumn($property) { $parts = preg_split('/(?=[A-Z])/', $property); $column = null; @@ -229,7 +228,7 @@ abstract class Entity { * @return array array of updated fields for update query * @since 7.0.0 */ - public function getUpdatedFields(){ + public function getUpdatedFields() { return $this->_updatedFields; } @@ -241,7 +240,7 @@ abstract class Entity { * @param string $type the type which will be used to call settype() * @since 7.0.0 */ - protected function addType($fieldName, $type){ + protected function addType($fieldName, $type) { $this->_fieldTypes[$fieldName] = $type; } @@ -253,7 +252,7 @@ abstract class Entity { * @return string slugified value * @since 7.0.0 */ - public function slugify($attributeName){ + public function slugify($attributeName) { // toSlug should only work for existing attributes if(property_exists($this, $attributeName)){ $value = $this->$attributeName; diff --git a/lib/public/AppFramework/Db/Mapper.php b/lib/public/AppFramework/Db/Mapper.php index 7dcc4a4bade..289ac1d684d 100644 --- a/lib/public/AppFramework/Db/Mapper.php +++ b/lib/public/AppFramework/Db/Mapper.php @@ -49,7 +49,7 @@ abstract class Mapper { * @since 7.0.0 * @deprecated 14.0.0 Move over to QBMapper */ - public function __construct(IDBConnection $db, $tableName, $entityClass=null){ + public function __construct(IDBConnection $db, $tableName, $entityClass=null) { $this->db = $db; $this->tableName = '*PREFIX*' . $tableName; @@ -68,7 +68,7 @@ abstract class Mapper { * @since 7.0.0 * @deprecated 14.0.0 Move over to QBMapper */ - public function getTableName(){ + public function getTableName() { return $this->tableName; } @@ -80,7 +80,7 @@ abstract class Mapper { * @since 7.0.0 - return value added in 8.1.0 * @deprecated 14.0.0 Move over to QBMapper */ - public function delete(Entity $entity){ + public function delete(Entity $entity) { $sql = 'DELETE FROM `' . $this->tableName . '` WHERE `id` = ?'; $stmt = $this->execute($sql, [$entity->getId()]); $stmt->closeCursor(); @@ -95,7 +95,7 @@ abstract class Mapper { * @since 7.0.0 * @deprecated 14.0.0 Move over to QBMapper */ - public function insert(Entity $entity){ + public function insert(Entity $entity) { // get updated fields to save, fields have to be set using a setter to // be saved $properties = $entity->getUpdatedFields(); @@ -145,7 +145,7 @@ abstract class Mapper { * @since 7.0.0 - return value was added in 8.0.0 * @deprecated 14.0.0 Move over to QBMapper */ - public function update(Entity $entity){ + public function update(Entity $entity) { // if entity wasn't changed it makes no sense to run a db query $properties = $entity->getUpdatedFields(); if(count($properties) === 0) { @@ -235,7 +235,7 @@ abstract class Mapper { * @since 7.0.0 * @deprecated 14.0.0 Move over to QBMapper */ - protected function execute($sql, array $params=[], $limit=null, $offset=null){ + protected function execute($sql, array $params=[], $limit=null, $offset=null) { $query = $this->db->prepare($sql, $limit, $offset); if ($this->isAssocArray($params)) { @@ -271,7 +271,7 @@ abstract class Mapper { * @since 7.0.0 * @deprecated 14.0.0 Move over to QBMapper */ - protected function findOneQuery($sql, array $params=[], $limit=null, $offset=null){ + protected function findOneQuery($sql, array $params=[], $limit=null, $offset=null) { $stmt = $this->execute($sql, $params, $limit, $offset); $row = $stmt->fetch(); @@ -285,7 +285,7 @@ abstract class Mapper { $row2 = $stmt->fetch(); $stmt->closeCursor(); //MDB2 returns null, PDO and doctrine false when no row is available - if( ! ($row2 === false || $row2 === null )) { + if(! ($row2 === false || $row2 === null)) { $msg = $this->buildDebugMessage( 'Did not expect more than one result when executing', $sql, $params, $limit, $offset ); @@ -367,7 +367,7 @@ abstract class Mapper { * @since 7.0.0 * @deprecated 14.0.0 Move over to QBMapper */ - protected function findEntity($sql, array $params=[], $limit=null, $offset=null){ + protected function findEntity($sql, array $params=[], $limit=null, $offset=null) { return $this->mapRowToEntity($this->findOneQuery($sql, $params, $limit, $offset)); } diff --git a/lib/public/AppFramework/Db/MultipleObjectsReturnedException.php b/lib/public/AppFramework/Db/MultipleObjectsReturnedException.php index 0f37d16cffc..a3f211194c4 100644 --- a/lib/public/AppFramework/Db/MultipleObjectsReturnedException.php +++ b/lib/public/AppFramework/Db/MultipleObjectsReturnedException.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OCP\AppFramework\Db; - /** * This is returned or should be returned when a find request finds more than one * row @@ -40,7 +39,7 @@ class MultipleObjectsReturnedException extends \Exception implements IMapperExce * @param string $msg the error message * @since 7.0.0 */ - public function __construct($msg){ + public function __construct($msg) { parent::__construct($msg); } diff --git a/lib/public/AppFramework/Db/QBMapper.php b/lib/public/AppFramework/Db/QBMapper.php index 487128b7305..c7b4b877651 100644 --- a/lib/public/AppFramework/Db/QBMapper.php +++ b/lib/public/AppFramework/Db/QBMapper.php @@ -58,7 +58,7 @@ abstract class QBMapper { * mapped to queries without using sql * @since 14.0.0 */ - public function __construct(IDBConnection $db, string $tableName, string $entityClass=null){ + public function __construct(IDBConnection $db, string $tableName, string $entityClass=null) { $this->db = $db; $this->tableName = $tableName; @@ -261,7 +261,7 @@ abstract class QBMapper { $row2 = $cursor->fetch(); $cursor->closeCursor(); - if($row2 !== false ) { + if($row2 !== false) { $msg = $this->buildDebugMessage( 'Did not expect more than one result when executing', $query ); diff --git a/lib/public/AppFramework/Http/DataDisplayResponse.php b/lib/public/AppFramework/Http/DataDisplayResponse.php index 512e52ee9fc..8e14b231522 100644 --- a/lib/public/AppFramework/Http/DataDisplayResponse.php +++ b/lib/public/AppFramework/Http/DataDisplayResponse.php @@ -48,7 +48,7 @@ class DataDisplayResponse extends Response { * @since 8.1.0 */ public function __construct($data='', $statusCode=Http::STATUS_OK, - $headers=[]) { + $headers=[]) { parent::__construct(); $this->data = $data; @@ -73,7 +73,7 @@ class DataDisplayResponse extends Response { * @return DataDisplayResponse Reference to this object * @since 8.1.0 */ - public function setData($data){ + public function setData($data) { $this->data = $data; return $this; @@ -85,7 +85,7 @@ class DataDisplayResponse extends Response { * @return string the data * @since 8.1.0 */ - public function getData(){ + public function getData() { return $this->data; } diff --git a/lib/public/AppFramework/Http/DataResponse.php b/lib/public/AppFramework/Http/DataResponse.php index 700fe1f418b..a978df49010 100644 --- a/lib/public/AppFramework/Http/DataResponse.php +++ b/lib/public/AppFramework/Http/DataResponse.php @@ -53,7 +53,7 @@ class DataResponse extends Response { * @since 8.0.0 */ public function __construct($data=[], $statusCode=Http::STATUS_OK, - array $headers=[]) { + array $headers=[]) { parent::__construct(); $this->data = $data; @@ -68,7 +68,7 @@ class DataResponse extends Response { * @return DataResponse Reference to this object * @since 8.0.0 */ - public function setData($data){ + public function setData($data) { $this->data = $data; return $this; @@ -80,7 +80,7 @@ class DataResponse extends Response { * @return array the data * @since 8.0.0 */ - public function getData(){ + public function getData() { return $this->data; } diff --git a/lib/public/AppFramework/Http/DownloadResponse.php b/lib/public/AppFramework/Http/DownloadResponse.php index 2f808ff156c..c28550a0bbd 100644 --- a/lib/public/AppFramework/Http/DownloadResponse.php +++ b/lib/public/AppFramework/Http/DownloadResponse.php @@ -25,7 +25,6 @@ namespace OCP\AppFramework\Http; - /** * Prompts the user to download the a file * @since 7.0.0 diff --git a/lib/public/AppFramework/Http/ICallbackResponse.php b/lib/public/AppFramework/Http/ICallbackResponse.php index f12a406120a..ca2f5f424ff 100644 --- a/lib/public/AppFramework/Http/ICallbackResponse.php +++ b/lib/public/AppFramework/Http/ICallbackResponse.php @@ -25,7 +25,6 @@ namespace OCP\AppFramework\Http; - /** * Interface ICallbackResponse * diff --git a/lib/public/AppFramework/Http/IOutput.php b/lib/public/AppFramework/Http/IOutput.php index 082e5e40046..83d65857c16 100644 --- a/lib/public/AppFramework/Http/IOutput.php +++ b/lib/public/AppFramework/Http/IOutput.php @@ -26,7 +26,6 @@ namespace OCP\AppFramework\Http; - /** * Very thin wrapper class to make output testable * @since 8.1.0 diff --git a/lib/public/AppFramework/Http/JSONResponse.php b/lib/public/AppFramework/Http/JSONResponse.php index 9451ef6677e..1d7a626d5cd 100644 --- a/lib/public/AppFramework/Http/JSONResponse.php +++ b/lib/public/AppFramework/Http/JSONResponse.php @@ -86,7 +86,7 @@ class JSONResponse extends Response { * @return JSONResponse Reference to this object * @since 6.0.0 - return value was added in 7.0.0 */ - public function setData($data){ + public function setData($data) { $this->data = $data; return $this; @@ -98,7 +98,7 @@ class JSONResponse extends Response { * @return array the data * @since 6.0.0 */ - public function getData(){ + public function getData() { return $this->data; } diff --git a/lib/public/AppFramework/Http/RedirectToDefaultAppResponse.php b/lib/public/AppFramework/Http/RedirectToDefaultAppResponse.php index b34ede45dfd..9072ca8a059 100644 --- a/lib/public/AppFramework/Http/RedirectToDefaultAppResponse.php +++ b/lib/public/AppFramework/Http/RedirectToDefaultAppResponse.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OCP\AppFramework\Http; - /** * Redirects to the default app * @since 16.0.0 diff --git a/lib/public/AppFramework/Http/Response.php b/lib/public/AppFramework/Http/Response.php index 2fc985aabfb..0aacc2f3a58 100644 --- a/lib/public/AppFramework/Http/Response.php +++ b/lib/public/AppFramework/Http/Response.php @@ -198,8 +198,8 @@ class Response { */ public function addHeader($name, $value) { $name = trim($name); // always remove leading and trailing whitespace - // to be able to reliably check for security - // headers + // to be able to reliably check for security + // headers if(is_null($value)) { unset($this->headers[$name]); diff --git a/lib/public/AppFramework/Http/StreamResponse.php b/lib/public/AppFramework/Http/StreamResponse.php index 80985ae7527..a228ed5566c 100644 --- a/lib/public/AppFramework/Http/StreamResponse.php +++ b/lib/public/AppFramework/Http/StreamResponse.php @@ -42,7 +42,7 @@ class StreamResponse extends Response implements ICallbackResponse { * @param string|resource $filePath the path to the file or a file handle which should be streamed * @since 8.1.0 */ - public function __construct ($filePath) { + public function __construct($filePath) { parent::__construct(); $this->filePath = $filePath; @@ -55,7 +55,7 @@ class StreamResponse extends Response implements ICallbackResponse { * @param IOutput $output a small wrapper that handles output * @since 8.1.0 */ - public function callback (IOutput $output) { + public function callback(IOutput $output) { // handle caching if ($output->getHttpResponseCode() !== Http::STATUS_NOT_MODIFIED) { if (!(is_resource($this->filePath) || file_exists($this->filePath))) { diff --git a/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php b/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php index 9965ca6bd33..67fe6165eef 100644 --- a/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php +++ b/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php @@ -98,7 +98,7 @@ class PublicTemplateResponse extends TemplateResponse { } $this->headerActions[] = $action; } - usort($this->headerActions, function(IMenuAction $a, IMenuAction $b) { + usort($this->headerActions, function (IMenuAction $a, IMenuAction $b) { return $a->getPriority() > $b->getPriority(); }); } diff --git a/lib/public/AppFramework/Http/TemplateResponse.php b/lib/public/AppFramework/Http/TemplateResponse.php index 4a77d4844ed..504b4af93ff 100644 --- a/lib/public/AppFramework/Http/TemplateResponse.php +++ b/lib/public/AppFramework/Http/TemplateResponse.php @@ -33,7 +33,6 @@ namespace OCP\AppFramework\Http; - /** * Response for a normal template * @since 6.0.0 @@ -77,7 +76,7 @@ class TemplateResponse extends Response { * @since 6.0.0 - parameters $params and $renderAs were added in 7.0.0 */ public function __construct($appName, $templateName, array $params=[], - $renderAs='user') { + $renderAs='user') { parent::__construct(); $this->templateName = $templateName; @@ -97,7 +96,7 @@ class TemplateResponse extends Response { * @return TemplateResponse Reference to this object * @since 6.0.0 - return value was added in 7.0.0 */ - public function setParams(array $params){ + public function setParams(array $params) { $this->params = $params; return $this; @@ -109,7 +108,7 @@ class TemplateResponse extends Response { * @return array the params * @since 6.0.0 */ - public function getParams(){ + public function getParams() { return $this->params; } @@ -119,7 +118,7 @@ class TemplateResponse extends Response { * @return string the name of the used template * @since 6.0.0 */ - public function getTemplateName(){ + public function getTemplateName() { return $this->templateName; } @@ -133,7 +132,7 @@ class TemplateResponse extends Response { * @return TemplateResponse Reference to this object * @since 6.0.0 - return value was added in 7.0.0 */ - public function renderAs($renderAs){ + public function renderAs($renderAs) { $this->renderAs = $renderAs; return $this; @@ -145,7 +144,7 @@ class TemplateResponse extends Response { * @return string the renderAs value * @since 6.0.0 */ - public function getRenderAs(){ + public function getRenderAs() { return $this->renderAs; } @@ -155,7 +154,7 @@ class TemplateResponse extends Response { * @return string the rendered html * @since 6.0.0 */ - public function render(){ + public function render() { // \OCP\Template needs an empty string instead of 'blank' for an unwrapped response $renderAs = $this->renderAs === 'blank' ? '' : $this->renderAs; diff --git a/lib/public/AppFramework/Middleware.php b/lib/public/AppFramework/Middleware.php index 5df8a919efe..2cf27fc14fd 100644 --- a/lib/public/AppFramework/Middleware.php +++ b/lib/public/AppFramework/Middleware.php @@ -52,7 +52,7 @@ abstract class Middleware { * the controller * @since 6.0.0 */ - public function beforeController($controller, $methodName){ + public function beforeController($controller, $methodName) { } @@ -72,7 +72,7 @@ abstract class Middleware { * @return Response a Response object in case that the exception was handled * @since 6.0.0 */ - public function afterException($controller, $methodName, \Exception $exception){ + public function afterException($controller, $methodName, \Exception $exception) { throw $exception; } @@ -88,7 +88,7 @@ abstract class Middleware { * @return Response a Response object * @since 6.0.0 */ - public function afterController($controller, $methodName, Response $response){ + public function afterController($controller, $methodName, Response $response) { return $response; } @@ -104,7 +104,7 @@ abstract class Middleware { * @return string the output that should be printed * @since 6.0.0 */ - public function beforeOutput($controller, $methodName, $output){ + public function beforeOutput($controller, $methodName, $output) { return $output; } diff --git a/lib/public/AppFramework/OCSController.php b/lib/public/AppFramework/OCSController.php index 4a3fa882577..d7243bb4d68 100644 --- a/lib/public/AppFramework/OCSController.php +++ b/lib/public/AppFramework/OCSController.php @@ -63,7 +63,7 @@ abstract class OCSController extends ApiController { IRequest $request, $corsMethods='PUT, POST, GET, DELETE, PATCH', $corsAllowedHeaders='Authorization, Content-Type, Accept', - $corsMaxAge=1728000){ + $corsMaxAge=1728000) { parent::__construct($appName, $request, $corsMethods, $corsAllowedHeaders, $corsMaxAge); $this->registerResponder('json', function ($data) { diff --git a/lib/public/AppFramework/Utility/ITimeFactory.php b/lib/public/AppFramework/Utility/ITimeFactory.php index 08266ec775d..2ab10986f19 100644 --- a/lib/public/AppFramework/Utility/ITimeFactory.php +++ b/lib/public/AppFramework/Utility/ITimeFactory.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OCP\AppFramework\Utility; - /** * Needed to mock calls to time() * @since 8.0.0 diff --git a/lib/public/Authentication/Events/LoginFailedEvent.php b/lib/public/Authentication/Events/LoginFailedEvent.php index 15c8fb31bce..ba5a54efb45 100644 --- a/lib/public/Authentication/Events/LoginFailedEvent.php +++ b/lib/public/Authentication/Events/LoginFailedEvent.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @copyright Copyright (c) 2020, Roeland Jago Douma <roeland@famdouma.nl> diff --git a/lib/public/Authentication/TwoFactorAuth/IRegistry.php b/lib/public/Authentication/TwoFactorAuth/IRegistry.php index 9c10e86b5f8..70026ca1dad 100644 --- a/lib/public/Authentication/TwoFactorAuth/IRegistry.php +++ b/lib/public/Authentication/TwoFactorAuth/IRegistry.php @@ -31,7 +31,7 @@ use OCP\IUser; /** * Nextcloud 2FA provider registry for stateful 2FA providers - * + * * This service keeps track of which providers are currently active for a specific * user. Stateful 2FA providers (IStatefulProvider) must use this service to save * their enabled/disabled state. diff --git a/lib/public/BackgroundJob/IJob.php b/lib/public/BackgroundJob/IJob.php index 719d0ea013a..d1d763fd5e4 100644 --- a/lib/public/BackgroundJob/IJob.php +++ b/lib/public/BackgroundJob/IJob.php @@ -24,6 +24,7 @@ */ namespace OCP\BackgroundJob; + use OCP\ILogger; /** diff --git a/lib/public/BackgroundJob/Job.php b/lib/public/BackgroundJob/Job.php index b5b920338df..803a06ae176 100644 --- a/lib/public/BackgroundJob/Job.php +++ b/lib/public/BackgroundJob/Job.php @@ -60,7 +60,7 @@ abstract class Job implements IJob { /** * The function to prepare the execution of the job. - + * * * @param IJobList $jobList * @param ILogger|null $logger diff --git a/lib/public/Calendar/Resource/IBackend.php b/lib/public/Calendar/Resource/IBackend.php index 416643919ec..474d5f902ee 100644 --- a/lib/public/Calendar/Resource/IBackend.php +++ b/lib/public/Calendar/Resource/IBackend.php @@ -22,6 +22,7 @@ */ namespace OCP\Calendar\Resource; + use OCP\Calendar\BackendTemporarilyUnavailableException; /** diff --git a/lib/public/Calendar/Room/IBackend.php b/lib/public/Calendar/Room/IBackend.php index 00f8b64a41e..d0d3e70dc17 100644 --- a/lib/public/Calendar/Room/IBackend.php +++ b/lib/public/Calendar/Room/IBackend.php @@ -22,6 +22,7 @@ */ namespace OCP\Calendar\Room; + use OCP\Calendar\BackendTemporarilyUnavailableException; /** diff --git a/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php b/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php index cd711ea20b2..6b46d9157de 100644 --- a/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php +++ b/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\Collaboration\AutoComplete; - use Symfony\Component\EventDispatcher\GenericEvent; /** diff --git a/lib/public/Collaboration/Resources/ResourceException.php b/lib/public/Collaboration/Resources/ResourceException.php index 81bace8f085..8aa72447c95 100644 --- a/lib/public/Collaboration/Resources/ResourceException.php +++ b/lib/public/Collaboration/Resources/ResourceException.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\Collaboration\Resources; - /** * @since 16.0.0 */ diff --git a/lib/public/Contacts/IManager.php b/lib/public/Contacts/IManager.php index 45baa127eee..dcb4c7ddbb3 100644 --- a/lib/public/Contacts/IManager.php +++ b/lib/public/Contacts/IManager.php @@ -160,7 +160,7 @@ interface IManager { /** * Return a list of the user's addressbooks display names - * + * * @return array * @since 6.0.0 * @deprecated 16.0.0 - Use `$this->getUserAddressBooks()` instead @@ -169,7 +169,7 @@ interface IManager { /** * Return a list of the user's addressbooks - * + * * @return IAddressBook[] * @since 16.0.0 */ @@ -177,7 +177,7 @@ interface IManager { /** * removes all registered address book instances - * + * * @return void * @since 6.0.0 */ diff --git a/lib/public/DB/QueryBuilder/IExpressionBuilder.php b/lib/public/DB/QueryBuilder/IExpressionBuilder.php index 1db98ba98f4..5f17585a131 100644 --- a/lib/public/DB/QueryBuilder/IExpressionBuilder.php +++ b/lib/public/DB/QueryBuilder/IExpressionBuilder.php @@ -25,7 +25,6 @@ namespace OCP\DB\QueryBuilder; - use Doctrine\DBAL\Query\Expression\ExpressionBuilder; /** diff --git a/lib/public/DB/QueryBuilder/IQueryBuilder.php b/lib/public/DB/QueryBuilder/IQueryBuilder.php index ece5d36c3eb..d65872388f9 100644 --- a/lib/public/DB/QueryBuilder/IQueryBuilder.php +++ b/lib/public/DB/QueryBuilder/IQueryBuilder.php @@ -26,7 +26,6 @@ namespace OCP\DB\QueryBuilder; - use Doctrine\DBAL\Connection; /** diff --git a/lib/public/Dashboard/IDashboardManager.php b/lib/public/Dashboard/IDashboardManager.php index 683ead5512e..7805bc236e8 100644 --- a/lib/public/Dashboard/IDashboardManager.php +++ b/lib/public/Dashboard/IDashboardManager.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\Dashboard; - use OCP\Dashboard\Exceptions\DashboardAppNotAvailableException; use OCP\Dashboard\Model\IWidgetConfig; use OCP\Dashboard\Service\IEventsService; diff --git a/lib/public/Dashboard/IDashboardWidget.php b/lib/public/Dashboard/IDashboardWidget.php index 8532a8700a1..9010845355a 100644 --- a/lib/public/Dashboard/IDashboardWidget.php +++ b/lib/public/Dashboard/IDashboardWidget.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OCP\Dashboard; - use OCP\Dashboard\Model\IWidgetConfig; use OCP\Dashboard\Model\IWidgetRequest; use OCP\Dashboard\Model\WidgetSetup; diff --git a/lib/public/Dashboard/Model/IWidgetConfig.php b/lib/public/Dashboard/Model/IWidgetConfig.php index 7d3d88f3241..bc33b37f544 100644 --- a/lib/public/Dashboard/Model/IWidgetConfig.php +++ b/lib/public/Dashboard/Model/IWidgetConfig.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\Dashboard\Model; - use OCP\Dashboard\IDashboardWidget; /** diff --git a/lib/public/Dashboard/Model/IWidgetRequest.php b/lib/public/Dashboard/Model/IWidgetRequest.php index 0a49e34ab30..b646935978a 100644 --- a/lib/public/Dashboard/Model/IWidgetRequest.php +++ b/lib/public/Dashboard/Model/IWidgetRequest.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\Dashboard\Model; - use OCP\Dashboard\IDashboardWidget; /** diff --git a/lib/public/Dashboard/Model/WidgetSetting.php b/lib/public/Dashboard/Model/WidgetSetting.php index 29744c56fac..b20d8d68b38 100644 --- a/lib/public/Dashboard/Model/WidgetSetting.php +++ b/lib/public/Dashboard/Model/WidgetSetting.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\Dashboard\Model; - use JsonSerializable; /** diff --git a/lib/public/Dashboard/Model/WidgetSetup.php b/lib/public/Dashboard/Model/WidgetSetup.php index 4d9884fd470..80885705633 100644 --- a/lib/public/Dashboard/Model/WidgetSetup.php +++ b/lib/public/Dashboard/Model/WidgetSetup.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\Dashboard\Model; - use JsonSerializable; /** diff --git a/lib/public/Dashboard/Model/WidgetTemplate.php b/lib/public/Dashboard/Model/WidgetTemplate.php index ba4447638a1..979a49a342d 100644 --- a/lib/public/Dashboard/Model/WidgetTemplate.php +++ b/lib/public/Dashboard/Model/WidgetTemplate.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\Dashboard\Model; - use JsonSerializable; /** diff --git a/lib/public/Dashboard/Service/IEventsService.php b/lib/public/Dashboard/Service/IEventsService.php index a036149599c..a9898f578e6 100644 --- a/lib/public/Dashboard/Service/IEventsService.php +++ b/lib/public/Dashboard/Service/IEventsService.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\Dashboard\Service; - use OCP\Dashboard\IDashboardManager; /** diff --git a/lib/public/Dashboard/Service/IWidgetsService.php b/lib/public/Dashboard/Service/IWidgetsService.php index 73a0bd7b171..dfa89ec1f59 100644 --- a/lib/public/Dashboard/Service/IWidgetsService.php +++ b/lib/public/Dashboard/Service/IWidgetsService.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\Dashboard\Service; - use OCP\Dashboard\Model\IWidgetConfig; /** diff --git a/lib/public/Diagnostics/IQueryLogger.php b/lib/public/Diagnostics/IQueryLogger.php index 14628c5688f..5a5656a6bca 100644 --- a/lib/public/Diagnostics/IQueryLogger.php +++ b/lib/public/Diagnostics/IQueryLogger.php @@ -35,10 +35,10 @@ use Doctrine\DBAL\Logging\SQLLogger; */ interface IQueryLogger extends SQLLogger { /** - * Mark the start of a query providing query SQL statement, its parameters and types. - * This method should be called as close to the DB as possible and after - * query is finished finalized with stopQuery() method. - * + * Mark the start of a query providing query SQL statement, its parameters and types. + * This method should be called as close to the DB as possible and after + * query is finished finalized with stopQuery() method. + * * @param string $sql * @param array|null $params * @param array|null $types @@ -49,7 +49,7 @@ interface IQueryLogger extends SQLLogger { /** * Mark the end of the current active query. Ending query should store \OCP\Diagnostics\IQuery to * be returned with getQueries() method. - * + * * @return mixed * @since 8.0.0 */ @@ -58,7 +58,7 @@ interface IQueryLogger extends SQLLogger { /** * This method should return all \OCP\Diagnostics\IQuery objects stored using * startQuery()/stopQuery() methods. - * + * * @return \OCP\Diagnostics\IQuery[] * @since 8.0.0 */ @@ -67,8 +67,8 @@ interface IQueryLogger extends SQLLogger { /** * Activate the module for the duration of the request. Deactivated module * does not create and store \OCP\Diagnostics\IQuery objects. - * Only activated module should create and store objects to be - * returned with getQueries() call. + * Only activated module should create and store objects to be + * returned with getQueries() call. * * @since 12.0.0 */ diff --git a/lib/public/DirectEditing/ACreateEmpty.php b/lib/public/DirectEditing/ACreateEmpty.php index 022bccf9516..71a18c94e23 100644 --- a/lib/public/DirectEditing/ACreateEmpty.php +++ b/lib/public/DirectEditing/ACreateEmpty.php @@ -23,7 +23,6 @@ namespace OCP\DirectEditing; - use OCP\Files\File; /** diff --git a/lib/public/DirectEditing/IEditor.php b/lib/public/DirectEditing/IEditor.php index 5b376ba2ad5..22ec130aee0 100644 --- a/lib/public/DirectEditing/IEditor.php +++ b/lib/public/DirectEditing/IEditor.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\DirectEditing; - use OCP\AppFramework\Http\Response; /** diff --git a/lib/public/DirectEditing/IManager.php b/lib/public/DirectEditing/IManager.php index 33d4716fc60..e9548a91e7a 100644 --- a/lib/public/DirectEditing/IManager.php +++ b/lib/public/DirectEditing/IManager.php @@ -87,4 +87,3 @@ interface IManager { public function cleanup(): int; } - diff --git a/lib/public/DirectEditing/IToken.php b/lib/public/DirectEditing/IToken.php index 416b2ccb807..46c423053fe 100644 --- a/lib/public/DirectEditing/IToken.php +++ b/lib/public/DirectEditing/IToken.php @@ -23,7 +23,6 @@ namespace OCP\DirectEditing; - use OCP\Files\File; use OCP\Files\NotFoundException; diff --git a/lib/public/Encryption/Exceptions/GenericEncryptionException.php b/lib/public/Encryption/Exceptions/GenericEncryptionException.php index 938e6662a79..2124e5effea 100644 --- a/lib/public/Encryption/Exceptions/GenericEncryptionException.php +++ b/lib/public/Encryption/Exceptions/GenericEncryptionException.php @@ -25,6 +25,7 @@ */ namespace OCP\Encryption\Exceptions; + use OC\HintException; /** diff --git a/lib/public/Encryption/IEncryptionModule.php b/lib/public/Encryption/IEncryptionModule.php index 90d427d4a1a..9646fb90e93 100644 --- a/lib/public/Encryption/IEncryptionModule.php +++ b/lib/public/Encryption/IEncryptionModule.php @@ -25,6 +25,7 @@ */ namespace OCP\Encryption; + use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; diff --git a/lib/public/Files.php b/lib/public/Files.php index 1e6e9d48e03..a1ff8a6d5a9 100644 --- a/lib/public/Files.php +++ b/lib/public/Files.php @@ -54,8 +54,8 @@ class Files { * @since 5.0.0 * @deprecated 14.0.0 */ - static public function rmdirr( $dir ) { - return \OC_Helper::rmdirr( $dir ); + static public function rmdirr($dir) { + return \OC_Helper::rmdirr($dir); } /** @@ -66,7 +66,7 @@ class Files { * @since 5.0.0 * @deprecated 14.0.0 */ - static public function getMimeType( $path ) { + static public function getMimeType($path) { return \OC::$server->getMimeTypeDetector()->detect($path); } @@ -89,8 +89,8 @@ class Files { * @since 5.0.0 * @deprecated 14.0.0 */ - public static function streamCopy( $source, $target ) { - list($count, ) = \OC_Helper::streamCopy( $source, $target ); + public static function streamCopy($source, $target) { + list($count, ) = \OC_Helper::streamCopy($source, $target); return $count; } @@ -115,6 +115,6 @@ class Files { * @deprecated 14.0.0 use IAppData instead */ public static function getStorage($app) { - return \OC_App::getStorage( $app ); + return \OC_App::getStorage($app); } } diff --git a/lib/public/Files/Cache/ICache.php b/lib/public/Files/Cache/ICache.php index a4c9bfe3e45..d1388f02b1d 100644 --- a/lib/public/Files/Cache/ICache.php +++ b/lib/public/Files/Cache/ICache.php @@ -21,6 +21,7 @@ */ namespace OCP\Files\Cache; + use OCP\Files\Search\ISearchQuery; /** diff --git a/lib/public/Files/Folder.php b/lib/public/Files/Folder.php index a78a9ca8f78..4c05b0fb490 100644 --- a/lib/public/Files/Folder.php +++ b/lib/public/Files/Folder.php @@ -32,6 +32,7 @@ // This means that they should be used by apps instead of the internal ownCloud classes namespace OCP\Files; + use OCP\Files\Search\ISearchQuery; /** diff --git a/lib/public/Files/IMimeTypeDetector.php b/lib/public/Files/IMimeTypeDetector.php index ec80b3480d1..bb75ce742c5 100644 --- a/lib/public/Files/IMimeTypeDetector.php +++ b/lib/public/Files/IMimeTypeDetector.php @@ -26,7 +26,6 @@ namespace OCP\Files; - /** * Interface IMimeTypeDetector * @package OCP\Files diff --git a/lib/public/Files/Storage/IStorageFactory.php b/lib/public/Files/Storage/IStorageFactory.php index e5a94de34f9..e9550fdaa29 100644 --- a/lib/public/Files/Storage/IStorageFactory.php +++ b/lib/public/Files/Storage/IStorageFactory.php @@ -23,6 +23,7 @@ */ namespace OCP\Files\Storage; + use OCP\Files\Mount\IMountPoint; /** diff --git a/lib/public/Files/StorageNotAvailableException.php b/lib/public/Files/StorageNotAvailableException.php index 0b1defaded8..052a6b5ad78 100644 --- a/lib/public/Files/StorageNotAvailableException.php +++ b/lib/public/Files/StorageNotAvailableException.php @@ -36,6 +36,7 @@ // This means that they should be used by apps instead of the internal ownCloud classes namespace OCP\Files; + use OC\HintException; /** diff --git a/lib/public/Files_FullTextSearch/Model/AFilesDocument.php b/lib/public/Files_FullTextSearch/Model/AFilesDocument.php index 24c14089bcc..1ca6bff98c9 100644 --- a/lib/public/Files_FullTextSearch/Model/AFilesDocument.php +++ b/lib/public/Files_FullTextSearch/Model/AFilesDocument.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\Files_FullTextSearch\Model; - use OC\FullTextSearch\Model\IndexDocument; use OCP\FullTextSearch\Model\IIndexDocument; diff --git a/lib/public/FullTextSearch/IFullTextSearchManager.php b/lib/public/FullTextSearch/IFullTextSearchManager.php index 8730a344ded..e420e91f3a1 100644 --- a/lib/public/FullTextSearch/IFullTextSearchManager.php +++ b/lib/public/FullTextSearch/IFullTextSearchManager.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\FullTextSearch; - use OCP\FullTextSearch\Model\IIndex; use OCP\FullTextSearch\Model\ISearchResult; use OCP\FullTextSearch\Service\IIndexService; diff --git a/lib/public/FullTextSearch/IFullTextSearchPlatform.php b/lib/public/FullTextSearch/IFullTextSearchPlatform.php index a22e6930383..797c179082e 100644 --- a/lib/public/FullTextSearch/IFullTextSearchPlatform.php +++ b/lib/public/FullTextSearch/IFullTextSearchPlatform.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\FullTextSearch; - use OCP\FullTextSearch\Model\IDocumentAccess; use OCP\FullTextSearch\Model\IIndex; use OCP\FullTextSearch\Model\IIndexDocument; diff --git a/lib/public/FullTextSearch/IFullTextSearchProvider.php b/lib/public/FullTextSearch/IFullTextSearchProvider.php index f9a56b40e85..4a37001754a 100644 --- a/lib/public/FullTextSearch/IFullTextSearchProvider.php +++ b/lib/public/FullTextSearch/IFullTextSearchProvider.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OCP\FullTextSearch; - use OCP\FullTextSearch\Model\IIndex; use OCP\FullTextSearch\Model\IIndexDocument; use OCP\FullTextSearch\Model\IIndexOptions; diff --git a/lib/public/FullTextSearch/Model/IDocumentAccess.php b/lib/public/FullTextSearch/Model/IDocumentAccess.php index 713a018e661..478072593aa 100644 --- a/lib/public/FullTextSearch/Model/IDocumentAccess.php +++ b/lib/public/FullTextSearch/Model/IDocumentAccess.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\FullTextSearch\Model; - /** * Interface IDocumentAccess * diff --git a/lib/public/FullTextSearch/Model/IIndex.php b/lib/public/FullTextSearch/Model/IIndex.php index 0f3f718d7ba..7078962d99e 100644 --- a/lib/public/FullTextSearch/Model/IIndex.php +++ b/lib/public/FullTextSearch/Model/IIndex.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OCP\FullTextSearch\Model; - /** * Interface IIndex * diff --git a/lib/public/FullTextSearch/Model/IIndexDocument.php b/lib/public/FullTextSearch/Model/IIndexDocument.php index e86582b9234..667d2c15c7f 100644 --- a/lib/public/FullTextSearch/Model/IIndexDocument.php +++ b/lib/public/FullTextSearch/Model/IIndexDocument.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\FullTextSearch\Model; - /** * Class IIndexDocument * diff --git a/lib/public/FullTextSearch/Model/IIndexOptions.php b/lib/public/FullTextSearch/Model/IIndexOptions.php index daa8f5a0c7a..8719289d746 100644 --- a/lib/public/FullTextSearch/Model/IIndexOptions.php +++ b/lib/public/FullTextSearch/Model/IIndexOptions.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\FullTextSearch\Model; - /** * Interface IIndexOptions * diff --git a/lib/public/FullTextSearch/Model/IRunner.php b/lib/public/FullTextSearch/Model/IRunner.php index c4eecfa4894..d92eb789d64 100644 --- a/lib/public/FullTextSearch/Model/IRunner.php +++ b/lib/public/FullTextSearch/Model/IRunner.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\FullTextSearch\Model; - /** * Interface IRunner * diff --git a/lib/public/FullTextSearch/Model/ISearchOption.php b/lib/public/FullTextSearch/Model/ISearchOption.php index bbd2ac4827a..3f893c516d9 100644 --- a/lib/public/FullTextSearch/Model/ISearchOption.php +++ b/lib/public/FullTextSearch/Model/ISearchOption.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\FullTextSearch\Model; - /** * @since 16.0.0 * diff --git a/lib/public/FullTextSearch/Model/ISearchRequest.php b/lib/public/FullTextSearch/Model/ISearchRequest.php index 2453c1e871c..d48b74288fd 100644 --- a/lib/public/FullTextSearch/Model/ISearchRequest.php +++ b/lib/public/FullTextSearch/Model/ISearchRequest.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\FullTextSearch\Model; - /** * Interface ISearchRequest * diff --git a/lib/public/FullTextSearch/Model/ISearchRequestSimpleQuery.php b/lib/public/FullTextSearch/Model/ISearchRequestSimpleQuery.php index ca11b0c9317..c72d15a6930 100644 --- a/lib/public/FullTextSearch/Model/ISearchRequestSimpleQuery.php +++ b/lib/public/FullTextSearch/Model/ISearchRequestSimpleQuery.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\FullTextSearch\Model; - /** * Interface ISearchRequestSimpleQuery * diff --git a/lib/public/FullTextSearch/Model/ISearchResult.php b/lib/public/FullTextSearch/Model/ISearchResult.php index 775c4314bb1..1d8cb5d8037 100644 --- a/lib/public/FullTextSearch/Model/ISearchResult.php +++ b/lib/public/FullTextSearch/Model/ISearchResult.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\FullTextSearch\Model; - use OCP\FullTextSearch\IFullTextSearchProvider; /** diff --git a/lib/public/FullTextSearch/Model/ISearchTemplate.php b/lib/public/FullTextSearch/Model/ISearchTemplate.php index 43d1a586a1d..b63bae43a0a 100644 --- a/lib/public/FullTextSearch/Model/ISearchTemplate.php +++ b/lib/public/FullTextSearch/Model/ISearchTemplate.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\FullTextSearch\Model; - use OCP\FullTextSearch\IFullTextSearchProvider; /** diff --git a/lib/public/FullTextSearch/Service/IIndexService.php b/lib/public/FullTextSearch/Service/IIndexService.php index 3c3bd4bbe1f..f660909c9ca 100644 --- a/lib/public/FullTextSearch/Service/IIndexService.php +++ b/lib/public/FullTextSearch/Service/IIndexService.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\FullTextSearch\Service; - use OCP\FullTextSearch\Model\IIndex; /** diff --git a/lib/public/FullTextSearch/Service/IProviderService.php b/lib/public/FullTextSearch/Service/IProviderService.php index 8d4b68e4136..50c32649357 100644 --- a/lib/public/FullTextSearch/Service/IProviderService.php +++ b/lib/public/FullTextSearch/Service/IProviderService.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\FullTextSearch\Service; - /** * Interface IProviderService * diff --git a/lib/public/FullTextSearch/Service/ISearchService.php b/lib/public/FullTextSearch/Service/ISearchService.php index 8c2152855a1..89fa1a444e2 100644 --- a/lib/public/FullTextSearch/Service/ISearchService.php +++ b/lib/public/FullTextSearch/Service/ISearchService.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\FullTextSearch\Service; - use OCP\FullTextSearch\Model\ISearchRequest; use OCP\FullTextSearch\Model\ISearchResult; diff --git a/lib/public/IDBConnection.php b/lib/public/IDBConnection.php index a7aa9d448f1..405b4ba1b04 100644 --- a/lib/public/IDBConnection.php +++ b/lib/public/IDBConnection.php @@ -38,6 +38,7 @@ // This means that they should be used by apps instead of the internal ownCloud classes namespace OCP; + use Doctrine\DBAL\Schema\Schema; use OCP\DB\QueryBuilder\IQueryBuilder; diff --git a/lib/public/ISearch.php b/lib/public/ISearch.php index bdfe8431f13..fa6fc49c976 100644 --- a/lib/public/ISearch.php +++ b/lib/public/ISearch.php @@ -27,7 +27,6 @@ namespace OCP; - /** * Small Interface for Search * @since 7.0.0 diff --git a/lib/public/IServerContainer.php b/lib/public/IServerContainer.php index 7443f32bfe3..40f8d93f350 100644 --- a/lib/public/IServerContainer.php +++ b/lib/public/IServerContainer.php @@ -47,6 +47,7 @@ // This means that they should be used by apps instead of the internal ownCloud classes namespace OCP; + use OCP\Federation\ICloudFederationFactory; use OCP\Federation\ICloudFederationProviderManager; use OCP\Log\ILogFactory; diff --git a/lib/public/ITagManager.php b/lib/public/ITagManager.php index 960ae6f2f3b..46e1ba06297 100644 --- a/lib/public/ITagManager.php +++ b/lib/public/ITagManager.php @@ -59,6 +59,6 @@ interface ITagManager { * logged in user * @return \OCP\ITags * @since 6.0.0 - parameter $includeShared and $userId were added in 8.0.0 - */ + */ public function load($type, $defaultTags = [], $includeShared = false, $userId = null); } diff --git a/lib/public/IUser.php b/lib/public/IUser.php index a5e94bf8ac4..910c1a06d9d 100644 --- a/lib/public/IUser.php +++ b/lib/public/IUser.php @@ -28,7 +28,6 @@ namespace OCP; - /** * Interface IUser * diff --git a/lib/public/IUserManager.php b/lib/public/IUserManager.php index 7985c1bd6f4..a8df1a1af7e 100644 --- a/lib/public/IUserManager.php +++ b/lib/public/IUserManager.php @@ -30,7 +30,6 @@ namespace OCP; - /** * Class Manager * @@ -50,11 +49,11 @@ namespace OCP; */ interface IUserManager { /** - * register a user backend - * - * @param \OCP\UserInterface $backend - * @since 8.0.0 - */ + * register a user backend + * + * @param \OCP\UserInterface $backend + * @since 8.0.0 + */ public function registerBackend($backend); /** diff --git a/lib/public/LDAP/ILDAPProvider.php b/lib/public/LDAP/ILDAPProvider.php index 25127987eef..491906e5556 100644 --- a/lib/public/LDAP/ILDAPProvider.php +++ b/lib/public/LDAP/ILDAPProvider.php @@ -76,7 +76,7 @@ interface ILDAPProvider { public function sanitizeDN($dn); /** - * Return a new LDAP connection resource for the specified user. + * Return a new LDAP connection resource for the specified user. * @param string $uid user id * @return resource of the LDAP connection * @since 11.0.0 diff --git a/lib/public/Lock/ManuallyLockedException.php b/lib/public/Lock/ManuallyLockedException.php index 12567456e18..1609727f4e8 100644 --- a/lib/public/Lock/ManuallyLockedException.php +++ b/lib/public/Lock/ManuallyLockedException.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OCP\Lock; - /** * Class ManuallyLockedException * diff --git a/lib/public/Notification/AlreadyProcessedException.php b/lib/public/Notification/AlreadyProcessedException.php index 2cb1fc92765..251221004c9 100644 --- a/lib/public/Notification/AlreadyProcessedException.php +++ b/lib/public/Notification/AlreadyProcessedException.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OCP\Notification; - /** * @since 17.0.0 */ diff --git a/lib/public/RichObjectStrings/Definitions.php b/lib/public/RichObjectStrings/Definitions.php index a4cf4dac725..6b293dfff6d 100644 --- a/lib/public/RichObjectStrings/Definitions.php +++ b/lib/public/RichObjectStrings/Definitions.php @@ -26,7 +26,6 @@ namespace OCP\RichObjectStrings; - /** * Class Definitions * diff --git a/lib/public/SabrePluginEvent.php b/lib/public/SabrePluginEvent.php index b04ca420e32..c9f80d184c2 100644 --- a/lib/public/SabrePluginEvent.php +++ b/lib/public/SabrePluginEvent.php @@ -25,7 +25,6 @@ namespace OCP; - use OCP\AppFramework\Http; use OCP\EventDispatcher\Event; use Sabre\DAV\Server; diff --git a/lib/public/SabrePluginException.php b/lib/public/SabrePluginException.php index 3f46885a11a..7d2220999e5 100644 --- a/lib/public/SabrePluginException.php +++ b/lib/public/SabrePluginException.php @@ -22,7 +22,6 @@ namespace OCP; - use Sabre\DAV\Exception; /** diff --git a/lib/public/Search/Result.php b/lib/public/Search/Result.php index 0cbeb114af6..8d9a4e5d237 100644 --- a/lib/public/Search/Result.php +++ b/lib/public/Search/Result.php @@ -56,7 +56,7 @@ class Result { /** * The type of search result returned; for consistency, name this the same - * as the class name (e.g. \OC\Search\File -> 'file') in lowercase. + * as the class name (e.g. \OC\Search\File -> 'file') in lowercase. * @var string * @since 7.0.0 */ diff --git a/lib/public/Security/IContentSecurityPolicyManager.php b/lib/public/Security/IContentSecurityPolicyManager.php index bd579703cad..465a8c317f6 100644 --- a/lib/public/Security/IContentSecurityPolicyManager.php +++ b/lib/public/Security/IContentSecurityPolicyManager.php @@ -22,6 +22,7 @@ */ namespace OCP\Security; + use OCP\AppFramework\Http\EmptyContentSecurityPolicy; /** diff --git a/lib/public/Security/ISecureRandom.php b/lib/public/Security/ISecureRandom.php index c2d149feaf8..3fbc6c8ee10 100644 --- a/lib/public/Security/ISecureRandom.php +++ b/lib/public/Security/ISecureRandom.php @@ -51,7 +51,7 @@ interface ISecureRandom { /** * Characters that can be used for <code>generate($length, $characters)</code>, to - * generate human readable random strings. Lower- and upper-case characters and digits + * generate human readable random strings. Lower- and upper-case characters and digits * are included. Characters which are ambiguous are excluded, such as I, l, and 1 and so on. */ const CHAR_HUMAN_READABLE = 'abcdefgijkmnopqrstwxyzABCDEFGHJKLMNPQRSTWXYZ23456789'; diff --git a/lib/public/Share.php b/lib/public/Share.php index 25e255f35ba..622a6718924 100644 --- a/lib/public/Share.php +++ b/lib/public/Share.php @@ -121,7 +121,7 @@ class Share extends \OC\Share\Constants { * @deprecated 17.0.0 */ public static function getItemShared($itemType, $itemSource, $format = self::FORMAT_NONE, - $parameters = null, $includeCollections = false) { + $parameters = null, $includeCollections = false) { return \OC\Share\Share::getItemShared($itemType, $itemSource, $format, $parameters, $includeCollections); } diff --git a/lib/public/Share/Exceptions/GenericShareException.php b/lib/public/Share/Exceptions/GenericShareException.php index b9c134b8d00..3714edbfc33 100644 --- a/lib/public/Share/Exceptions/GenericShareException.php +++ b/lib/public/Share/Exceptions/GenericShareException.php @@ -23,6 +23,7 @@ */ namespace OCP\Share\Exceptions; + use OC\HintException; /** diff --git a/lib/public/User/Backend/ABackend.php b/lib/public/User/Backend/ABackend.php index 6c691ef1fce..a57a561369b 100644 --- a/lib/public/User/Backend/ABackend.php +++ b/lib/public/User/Backend/ABackend.php @@ -3,7 +3,7 @@ declare(strict_types=1); /** -* @copyright Copyright (c) 2018 Roeland Jago Douma <roeland@famdouma.nl> + * @copyright Copyright (c) 2018 Roeland Jago Douma <roeland@famdouma.nl> * * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Roeland Jago Douma <roeland@famdouma.nl> diff --git a/lib/public/User/Events/BeforeUserLoggedInEvent.php b/lib/public/User/Events/BeforeUserLoggedInEvent.php index dca5c16518b..3f64bf7ce3d 100644 --- a/lib/public/User/Events/BeforeUserLoggedInEvent.php +++ b/lib/public/User/Events/BeforeUserLoggedInEvent.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OCP\User\Events; use OCP\EventDispatcher\Event; -use OCP\IUser; /** * @since 18.0.0 diff --git a/lib/public/Util.php b/lib/public/Util.php index f1008ad77c9..4427e39b24b 100644 --- a/lib/public/Util.php +++ b/lib/public/Util.php @@ -128,7 +128,7 @@ class Util { * @since 4.0.0 * @deprecated 13.0.0 use log of \OCP\ILogger */ - public static function writeLog( $app, $message, $level ) { + public static function writeLog($app, $message, $level) { $context = ['app' => $app]; \OC::$server->getLogger()->log($level, $message, $context); } @@ -170,8 +170,8 @@ class Util { * @param string $file * @since 4.0.0 */ - public static function addStyle( $application, $file = null ) { - \OC_Util::addStyle( $application, $file ); + public static function addStyle($application, $file = null) { + \OC_Util::addStyle($application, $file); } /** @@ -180,8 +180,8 @@ class Util { * @param string $file * @since 4.0.0 */ - public static function addScript( $application, $file = null ) { - \OC_Util::addScript( $application, $file ); + public static function addScript($application, $file = null) { + \OC_Util::addScript($application, $file); } /** @@ -216,7 +216,7 @@ class Util { * @return string the url * @since 4.0.0 - parameter $args was added in 4.5.0 */ - public static function linkToAbsolute( $app, $file, $args = [] ) { + public static function linkToAbsolute($app, $file, $args = []) { $urlGenerator = \OC::$server->getURLGenerator(); return $urlGenerator->getAbsoluteURL( $urlGenerator->linkTo($app, $file, $args) @@ -229,7 +229,7 @@ class Util { * @return string the url * @since 4.0.0 */ - public static function linkToRemote( $service ) { + public static function linkToRemote($service) { $urlGenerator = \OC::$server->getURLGenerator(); $remoteBase = $urlGenerator->linkTo('', 'remote.php') . '/' . $service; return $urlGenerator->getAbsoluteURL( diff --git a/lib/public/WorkflowEngine/IFileCheck.php b/lib/public/WorkflowEngine/IFileCheck.php index b94f3e512d3..d11a5011367 100644 --- a/lib/public/WorkflowEngine/IFileCheck.php +++ b/lib/public/WorkflowEngine/IFileCheck.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OCP\WorkflowEngine; - use OCP\Files\Storage\IStorage; /** |