diff options
Diffstat (limited to 'lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php')
-rw-r--r-- | lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php | 60 |
1 files changed, 7 insertions, 53 deletions
diff --git a/lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php b/lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php index c58d55b9b55..5b075daf7e6 100644 --- a/lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php +++ b/lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php @@ -1,28 +1,9 @@ <?php declare(strict_types=1); - /** - * @copyright 2018 - * - * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author Maxence Lange <maxence@artificial-owl.com> - * - * @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: 2019 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ namespace OC\FullTextSearch\Model; @@ -37,34 +18,24 @@ use OCP\FullTextSearch\Model\ISearchRequestSimpleQuery; * @package OC\FullTextSearch\Model */ final class SearchRequestSimpleQuery implements ISearchRequestSimpleQuery, JsonSerializable { - /** @var int */ - private $type = 0; - - /** @var string */ - private $field = ''; - - /** @var array */ - private $values = []; + private array $values = []; /** * SearchRequestQuery constructor. * - * @param $type - * @param $field - * * @since 17.0.0 */ - public function __construct(string $field, int $type) { - $this->field = $field; - $this->type = $type; + public function __construct( + private string $field, + private int $type, + ) { } /** * Get the compare type of the query * - * @return int * @since 17.0.0 */ public function getType(): int { @@ -75,7 +46,6 @@ final class SearchRequestSimpleQuery implements ISearchRequestSimpleQuery, JsonS /** * Get the field to apply query * - * @return string * @since 17.0.0 */ public function getField(): string { @@ -85,9 +55,6 @@ final class SearchRequestSimpleQuery implements ISearchRequestSimpleQuery, JsonS /** * Set the field to apply query * - * @param string $field - * - * @return ISearchRequestSimpleQuery * @since 17.0.0 */ public function setField(string $field): ISearchRequestSimpleQuery { @@ -100,7 +67,6 @@ final class SearchRequestSimpleQuery implements ISearchRequestSimpleQuery, JsonS /** * Get the value to compare (string) * - * @return array * @since 17.0.0 */ public function getValues(): array { @@ -111,9 +77,6 @@ final class SearchRequestSimpleQuery implements ISearchRequestSimpleQuery, JsonS /** * Add value to compare (string) * - * @param string $value - * - * @return ISearchRequestSimpleQuery * @since 17.0.0 */ public function addValue(string $value): ISearchRequestSimpleQuery { @@ -125,9 +88,6 @@ final class SearchRequestSimpleQuery implements ISearchRequestSimpleQuery, JsonS /** * Add value to compare (int) * - * @param int $value - * - * @return ISearchRequestSimpleQuery * @since 17.0.0 */ public function addValueInt(int $value): ISearchRequestSimpleQuery { @@ -139,9 +99,6 @@ final class SearchRequestSimpleQuery implements ISearchRequestSimpleQuery, JsonS /** * Add value to compare (array) * - * @param array $value - * - * @return ISearchRequestSimpleQuery * @since 17.0.0 */ public function addValueArray(array $value): ISearchRequestSimpleQuery { @@ -153,9 +110,6 @@ final class SearchRequestSimpleQuery implements ISearchRequestSimpleQuery, JsonS /** * Add value to compare (bool) * - * @param bool $value - * - * @return ISearchRequestSimpleQuery * @since 17.0.0 */ public function addValueBool(bool $value): ISearchRequestSimpleQuery { |