aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Search/SearchQuery.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Files/Search/SearchQuery.php')
-rw-r--r--lib/private/Files/Search/SearchQuery.php41
1 files changed, 12 insertions, 29 deletions
diff --git a/lib/private/Files/Search/SearchQuery.php b/lib/private/Files/Search/SearchQuery.php
index b7b8b801104..592749cf4a0 100644
--- a/lib/private/Files/Search/SearchQuery.php
+++ b/lib/private/Files/Search/SearchQuery.php
@@ -1,26 +1,9 @@
<?php
+
/**
- * @copyright Copyright (c) 2017 Robin Appelman <robin@icewind.nl>
- *
- * @author Robin Appelman <robin@icewind.nl>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
-
namespace OC\Files\Search;
use OCP\Files\Search\ISearchOperator;
@@ -29,15 +12,15 @@ use OCP\Files\Search\ISearchQuery;
use OCP\IUser;
class SearchQuery implements ISearchQuery {
- /** @var ISearchOperator */
+ /** @var ISearchOperator */
private $searchOperation;
- /** @var integer */
+ /** @var integer */
private $limit;
- /** @var integer */
+ /** @var integer */
private $offset;
- /** @var ISearchOrder[] */
+ /** @var ISearchOrder[] */
private $order;
- /** @var IUser */
+ /** @var ?IUser */
private $user;
private $limitToHome;
@@ -48,7 +31,7 @@ class SearchQuery implements ISearchQuery {
* @param int $limit
* @param int $offset
* @param array $order
- * @param IUser $user
+ * @param ?IUser $user
* @param bool $limitToHome
*/
public function __construct(
@@ -56,8 +39,8 @@ class SearchQuery implements ISearchQuery {
int $limit,
int $offset,
array $order,
- IUser $user,
- bool $limitToHome = false
+ ?IUser $user = null,
+ bool $limitToHome = false,
) {
$this->searchOperation = $searchOperation;
$this->limit = $limit;
@@ -96,7 +79,7 @@ class SearchQuery implements ISearchQuery {
}
/**
- * @return IUser
+ * @return ?IUser
*/
public function getUser() {
return $this->user;