aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Search/QueryOptimizer/FlattenSingleArgumentBinaryOperation.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Files/Search/QueryOptimizer/FlattenSingleArgumentBinaryOperation.php')
-rw-r--r--lib/private/Files/Search/QueryOptimizer/FlattenSingleArgumentBinaryOperation.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/private/Files/Search/QueryOptimizer/FlattenSingleArgumentBinaryOperation.php b/lib/private/Files/Search/QueryOptimizer/FlattenSingleArgumentBinaryOperation.php
index 2c32f2e0174..7e99c04f197 100644
--- a/lib/private/Files/Search/QueryOptimizer/FlattenSingleArgumentBinaryOperation.php
+++ b/lib/private/Files/Search/QueryOptimizer/FlattenSingleArgumentBinaryOperation.php
@@ -1,5 +1,9 @@
<?php
+/**
+ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
namespace OC\Files\Search\QueryOptimizer;
use OCP\Files\Search\ISearchBinaryOperator;
@@ -12,11 +16,11 @@ class FlattenSingleArgumentBinaryOperation extends ReplacingOptimizerStep {
public function processOperator(ISearchOperator &$operator): bool {
parent::processOperator($operator);
if (
- $operator instanceof ISearchBinaryOperator &&
- count($operator->getArguments()) === 1 &&
- (
- $operator->getType() === ISearchBinaryOperator::OPERATOR_OR ||
- $operator->getType() === ISearchBinaryOperator::OPERATOR_AND
+ $operator instanceof ISearchBinaryOperator
+ && count($operator->getArguments()) === 1
+ && (
+ $operator->getType() === ISearchBinaryOperator::OPERATOR_OR
+ || $operator->getType() === ISearchBinaryOperator::OPERATOR_AND
)
) {
$operator = $operator->getArguments()[0];