@@ -29,15 +29,15 @@ |
||
| 29 | 29 | */ |
| 30 | 30 | interface ILinkAction extends IAction { |
| 31 | 31 | |
| 32 | - /** |
|
| 33 | - * @since 12.0 |
|
| 34 | - * @param string $href the target URL of the action |
|
| 35 | - */ |
|
| 36 | - public function setHref($href); |
|
| 32 | + /** |
|
| 33 | + * @since 12.0 |
|
| 34 | + * @param string $href the target URL of the action |
|
| 35 | + */ |
|
| 36 | + public function setHref($href); |
|
| 37 | 37 | |
| 38 | - /** |
|
| 39 | - * @since 12.0 |
|
| 40 | - * @return string |
|
| 41 | - */ |
|
| 42 | - public function getHref(); |
|
| 38 | + /** |
|
| 39 | + * @since 12.0 |
|
| 40 | + * @return string |
|
| 41 | + */ |
|
| 42 | + public function getHref(); |
|
| 43 | 43 | } |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | use OC\DB\QueryBuilder\QueryFunction; |
| 25 | 25 | |
| 26 | 26 | class OCIFunctionBuilder extends FunctionBuilder { |
| 27 | - public function md5($input) { |
|
| 28 | - return new QueryFunction('LOWER(DBMS_OBFUSCATION_TOOLKIT.md5 (input => UTL_RAW.cast_to_raw(' . $this->helper->quoteColumnName($input) .')))'); |
|
| 29 | - } |
|
| 27 | + public function md5($input) { |
|
| 28 | + return new QueryFunction('LOWER(DBMS_OBFUSCATION_TOOLKIT.md5 (input => UTL_RAW.cast_to_raw(' . $this->helper->quoteColumnName($input) .')))'); |
|
| 29 | + } |
|
| 30 | 30 | } |
@@ -25,6 +25,6 @@ |
||
| 25 | 25 | |
| 26 | 26 | class OCIFunctionBuilder extends FunctionBuilder { |
| 27 | 27 | public function md5($input) { |
| 28 | - return new QueryFunction('LOWER(DBMS_OBFUSCATION_TOOLKIT.md5 (input => UTL_RAW.cast_to_raw(' . $this->helper->quoteColumnName($input) .')))'); |
|
| 28 | + return new QueryFunction('LOWER(DBMS_OBFUSCATION_TOOLKIT.md5 (input => UTL_RAW.cast_to_raw('.$this->helper->quoteColumnName($input).')))'); |
|
| 29 | 29 | } |
| 30 | 30 | } |
@@ -42,10 +42,10 @@ discard block |
||
| 42 | 42 | |
| 43 | 43 | public function fixupStatement($statement) { |
| 44 | 44 | $statement = preg_replace('/`(\w+)` ILIKE \?/', 'LOWER($1) LIKE LOWER(?)', $statement); |
| 45 | - $statement = str_replace( '`', '"', $statement ); |
|
| 46 | - $statement = str_ireplace( 'NOW()', 'datetime(\'now\')', $statement ); |
|
| 45 | + $statement = str_replace('`', '"', $statement); |
|
| 46 | + $statement = str_ireplace('NOW()', 'datetime(\'now\')', $statement); |
|
| 47 | 47 | $statement = str_ireplace('GREATEST(', 'MAX(', $statement); |
| 48 | - $statement = str_ireplace( 'UNIX_TIMESTAMP()', 'strftime(\'%s\',\'now\')', $statement ); |
|
| 48 | + $statement = str_ireplace('UNIX_TIMESTAMP()', 'strftime(\'%s\',\'now\')', $statement); |
|
| 49 | 49 | return $statement; |
| 50 | 50 | } |
| 51 | 51 | |
@@ -64,14 +64,14 @@ discard block |
||
| 64 | 64 | if (empty($compare)) { |
| 65 | 65 | $compare = array_keys($input); |
| 66 | 66 | } |
| 67 | - $fieldList = '`' . implode('`,`', array_keys($input)) . '`'; |
|
| 67 | + $fieldList = '`'.implode('`,`', array_keys($input)).'`'; |
|
| 68 | 68 | $query = "INSERT INTO `$table` ($fieldList) SELECT " |
| 69 | - . str_repeat('?,', count($input)-1).'? ' |
|
| 69 | + . str_repeat('?,', count($input) - 1).'? ' |
|
| 70 | 70 | . " WHERE NOT EXISTS (SELECT 1 FROM `$table` WHERE "; |
| 71 | 71 | |
| 72 | 72 | $inserts = array_values($input); |
| 73 | - foreach($compare as $key) { |
|
| 74 | - $query .= '`' . $key . '`'; |
|
| 73 | + foreach ($compare as $key) { |
|
| 74 | + $query .= '`'.$key.'`'; |
|
| 75 | 75 | if (is_null($input[$key])) { |
| 76 | 76 | $query .= ' IS NULL AND '; |
| 77 | 77 | } else { |
@@ -31,70 +31,70 @@ |
||
| 31 | 31 | |
| 32 | 32 | class AdapterSqlite extends Adapter { |
| 33 | 33 | |
| 34 | - /** |
|
| 35 | - * @param string $tableName |
|
| 36 | - */ |
|
| 37 | - public function lockTable($tableName) { |
|
| 38 | - $this->conn->executeUpdate('BEGIN EXCLUSIVE TRANSACTION'); |
|
| 39 | - } |
|
| 34 | + /** |
|
| 35 | + * @param string $tableName |
|
| 36 | + */ |
|
| 37 | + public function lockTable($tableName) { |
|
| 38 | + $this->conn->executeUpdate('BEGIN EXCLUSIVE TRANSACTION'); |
|
| 39 | + } |
|
| 40 | 40 | |
| 41 | - public function unlockTable() { |
|
| 42 | - $this->conn->executeUpdate('COMMIT TRANSACTION'); |
|
| 43 | - } |
|
| 41 | + public function unlockTable() { |
|
| 42 | + $this->conn->executeUpdate('COMMIT TRANSACTION'); |
|
| 43 | + } |
|
| 44 | 44 | |
| 45 | - public function fixupStatement($statement) { |
|
| 46 | - $statement = preg_replace('/`(\w+)` ILIKE \?/', 'LOWER($1) LIKE LOWER(?)', $statement); |
|
| 47 | - $statement = str_replace( '`', '"', $statement ); |
|
| 48 | - $statement = str_ireplace( 'NOW()', 'datetime(\'now\')', $statement ); |
|
| 49 | - $statement = str_ireplace('GREATEST(', 'MAX(', $statement); |
|
| 50 | - $statement = str_ireplace( 'UNIX_TIMESTAMP()', 'strftime(\'%s\',\'now\')', $statement ); |
|
| 51 | - return $statement; |
|
| 52 | - } |
|
| 45 | + public function fixupStatement($statement) { |
|
| 46 | + $statement = preg_replace('/`(\w+)` ILIKE \?/', 'LOWER($1) LIKE LOWER(?)', $statement); |
|
| 47 | + $statement = str_replace( '`', '"', $statement ); |
|
| 48 | + $statement = str_ireplace( 'NOW()', 'datetime(\'now\')', $statement ); |
|
| 49 | + $statement = str_ireplace('GREATEST(', 'MAX(', $statement); |
|
| 50 | + $statement = str_ireplace( 'UNIX_TIMESTAMP()', 'strftime(\'%s\',\'now\')', $statement ); |
|
| 51 | + return $statement; |
|
| 52 | + } |
|
| 53 | 53 | |
| 54 | - /** |
|
| 55 | - * Insert a row if the matching row does not exists. To accomplish proper race condition avoidance |
|
| 56 | - * it is needed that there is also a unique constraint on the values. Then this method will |
|
| 57 | - * catch the exception and return 0. |
|
| 58 | - * |
|
| 59 | - * @param string $table The table name (will replace *PREFIX* with the actual prefix) |
|
| 60 | - * @param array $input data that should be inserted into the table (column name => value) |
|
| 61 | - * @param array|null $compare List of values that should be checked for "if not exists" |
|
| 62 | - * If this is null or an empty array, all keys of $input will be compared |
|
| 63 | - * Please note: text fields (clob) must not be used in the compare array |
|
| 64 | - * @return int number of inserted rows |
|
| 65 | - * @throws \Doctrine\DBAL\DBALException |
|
| 66 | - * @deprecated 15.0.0 - use unique index and "try { $db->insert() } catch (UniqueConstraintViolationException $e) {}" instead, because it is more reliable and does not have the risk for deadlocks - see https://github.com/nextcloud/server/pull/12371 |
|
| 67 | - */ |
|
| 68 | - public function insertIfNotExist($table, $input, array $compare = null) { |
|
| 69 | - if (empty($compare)) { |
|
| 70 | - $compare = array_keys($input); |
|
| 71 | - } |
|
| 72 | - $fieldList = '`' . implode('`,`', array_keys($input)) . '`'; |
|
| 73 | - $query = "INSERT INTO `$table` ($fieldList) SELECT " |
|
| 74 | - . str_repeat('?,', count($input)-1).'? ' |
|
| 75 | - . " WHERE NOT EXISTS (SELECT 1 FROM `$table` WHERE "; |
|
| 54 | + /** |
|
| 55 | + * Insert a row if the matching row does not exists. To accomplish proper race condition avoidance |
|
| 56 | + * it is needed that there is also a unique constraint on the values. Then this method will |
|
| 57 | + * catch the exception and return 0. |
|
| 58 | + * |
|
| 59 | + * @param string $table The table name (will replace *PREFIX* with the actual prefix) |
|
| 60 | + * @param array $input data that should be inserted into the table (column name => value) |
|
| 61 | + * @param array|null $compare List of values that should be checked for "if not exists" |
|
| 62 | + * If this is null or an empty array, all keys of $input will be compared |
|
| 63 | + * Please note: text fields (clob) must not be used in the compare array |
|
| 64 | + * @return int number of inserted rows |
|
| 65 | + * @throws \Doctrine\DBAL\DBALException |
|
| 66 | + * @deprecated 15.0.0 - use unique index and "try { $db->insert() } catch (UniqueConstraintViolationException $e) {}" instead, because it is more reliable and does not have the risk for deadlocks - see https://github.com/nextcloud/server/pull/12371 |
|
| 67 | + */ |
|
| 68 | + public function insertIfNotExist($table, $input, array $compare = null) { |
|
| 69 | + if (empty($compare)) { |
|
| 70 | + $compare = array_keys($input); |
|
| 71 | + } |
|
| 72 | + $fieldList = '`' . implode('`,`', array_keys($input)) . '`'; |
|
| 73 | + $query = "INSERT INTO `$table` ($fieldList) SELECT " |
|
| 74 | + . str_repeat('?,', count($input)-1).'? ' |
|
| 75 | + . " WHERE NOT EXISTS (SELECT 1 FROM `$table` WHERE "; |
|
| 76 | 76 | |
| 77 | - $inserts = array_values($input); |
|
| 78 | - foreach($compare as $key) { |
|
| 79 | - $query .= '`' . $key . '`'; |
|
| 80 | - if (is_null($input[$key])) { |
|
| 81 | - $query .= ' IS NULL AND '; |
|
| 82 | - } else { |
|
| 83 | - $inserts[] = $input[$key]; |
|
| 84 | - $query .= ' = ? AND '; |
|
| 85 | - } |
|
| 86 | - } |
|
| 87 | - $query = substr($query, 0, -5); |
|
| 88 | - $query .= ')'; |
|
| 77 | + $inserts = array_values($input); |
|
| 78 | + foreach($compare as $key) { |
|
| 79 | + $query .= '`' . $key . '`'; |
|
| 80 | + if (is_null($input[$key])) { |
|
| 81 | + $query .= ' IS NULL AND '; |
|
| 82 | + } else { |
|
| 83 | + $inserts[] = $input[$key]; |
|
| 84 | + $query .= ' = ? AND '; |
|
| 85 | + } |
|
| 86 | + } |
|
| 87 | + $query = substr($query, 0, -5); |
|
| 88 | + $query .= ')'; |
|
| 89 | 89 | |
| 90 | - try { |
|
| 91 | - return $this->conn->executeUpdate($query, $inserts); |
|
| 92 | - } catch (UniqueConstraintViolationException $e) { |
|
| 93 | - // if this is thrown then a concurrent insert happened between the insert and the sub-select in the insert, that should have avoided it |
|
| 94 | - // it's fine to ignore this then |
|
| 95 | - // |
|
| 96 | - // more discussions about this can be found at https://github.com/nextcloud/server/pull/12315 |
|
| 97 | - return 0; |
|
| 98 | - } |
|
| 99 | - } |
|
| 90 | + try { |
|
| 91 | + return $this->conn->executeUpdate($query, $inserts); |
|
| 92 | + } catch (UniqueConstraintViolationException $e) { |
|
| 93 | + // if this is thrown then a concurrent insert happened between the insert and the sub-select in the insert, that should have avoided it |
|
| 94 | + // it's fine to ignore this then |
|
| 95 | + // |
|
| 96 | + // more discussions about this can be found at https://github.com/nextcloud/server/pull/12315 |
|
| 97 | + return 0; |
|
| 98 | + } |
|
| 99 | + } |
|
| 100 | 100 | } |
@@ -25,22 +25,22 @@ |
||
| 25 | 25 | * @since 12.0.0 |
| 26 | 26 | */ |
| 27 | 27 | interface ISearchOrder { |
| 28 | - const DIRECTION_ASCENDING = 'asc'; |
|
| 29 | - const DIRECTION_DESCENDING = 'desc'; |
|
| 28 | + const DIRECTION_ASCENDING = 'asc'; |
|
| 29 | + const DIRECTION_DESCENDING = 'desc'; |
|
| 30 | 30 | |
| 31 | - /** |
|
| 32 | - * The direction to sort in, either ISearchOrder::DIRECTION_ASCENDING or ISearchOrder::DIRECTION_DESCENDING |
|
| 33 | - * |
|
| 34 | - * @return string |
|
| 35 | - * @since 12.0.0 |
|
| 36 | - */ |
|
| 37 | - public function getDirection(); |
|
| 31 | + /** |
|
| 32 | + * The direction to sort in, either ISearchOrder::DIRECTION_ASCENDING or ISearchOrder::DIRECTION_DESCENDING |
|
| 33 | + * |
|
| 34 | + * @return string |
|
| 35 | + * @since 12.0.0 |
|
| 36 | + */ |
|
| 37 | + public function getDirection(); |
|
| 38 | 38 | |
| 39 | - /** |
|
| 40 | - * The field to sort on |
|
| 41 | - * |
|
| 42 | - * @return string |
|
| 43 | - * @since 12.0.0 |
|
| 44 | - */ |
|
| 45 | - public function getField(); |
|
| 39 | + /** |
|
| 40 | + * The field to sort on |
|
| 41 | + * |
|
| 42 | + * @return string |
|
| 43 | + * @since 12.0.0 |
|
| 44 | + */ |
|
| 45 | + public function getField(); |
|
| 46 | 46 | } |
@@ -25,36 +25,36 @@ |
||
| 25 | 25 | * @since 12.0.0 |
| 26 | 26 | */ |
| 27 | 27 | interface ISearchComparison extends ISearchOperator { |
| 28 | - const COMPARE_EQUAL = 'eq'; |
|
| 29 | - const COMPARE_GREATER_THAN = 'gt'; |
|
| 30 | - const COMPARE_GREATER_THAN_EQUAL = 'gte'; |
|
| 31 | - const COMPARE_LESS_THAN = 'lt'; |
|
| 32 | - const COMPARE_LESS_THAN_EQUAL = 'lte'; |
|
| 33 | - const COMPARE_LIKE = 'like'; |
|
| 28 | + const COMPARE_EQUAL = 'eq'; |
|
| 29 | + const COMPARE_GREATER_THAN = 'gt'; |
|
| 30 | + const COMPARE_GREATER_THAN_EQUAL = 'gte'; |
|
| 31 | + const COMPARE_LESS_THAN = 'lt'; |
|
| 32 | + const COMPARE_LESS_THAN_EQUAL = 'lte'; |
|
| 33 | + const COMPARE_LIKE = 'like'; |
|
| 34 | 34 | |
| 35 | - /** |
|
| 36 | - * Get the type of comparison, one of the ISearchComparison::COMPARE_* constants |
|
| 37 | - * |
|
| 38 | - * @return string |
|
| 39 | - * @since 12.0.0 |
|
| 40 | - */ |
|
| 41 | - public function getType(); |
|
| 35 | + /** |
|
| 36 | + * Get the type of comparison, one of the ISearchComparison::COMPARE_* constants |
|
| 37 | + * |
|
| 38 | + * @return string |
|
| 39 | + * @since 12.0.0 |
|
| 40 | + */ |
|
| 41 | + public function getType(); |
|
| 42 | 42 | |
| 43 | - /** |
|
| 44 | - * Get the name of the field to compare with |
|
| 45 | - * |
|
| 46 | - * i.e. 'size', 'name' or 'mimetype' |
|
| 47 | - * |
|
| 48 | - * @return string |
|
| 49 | - * @since 12.0.0 |
|
| 50 | - */ |
|
| 51 | - public function getField(); |
|
| 43 | + /** |
|
| 44 | + * Get the name of the field to compare with |
|
| 45 | + * |
|
| 46 | + * i.e. 'size', 'name' or 'mimetype' |
|
| 47 | + * |
|
| 48 | + * @return string |
|
| 49 | + * @since 12.0.0 |
|
| 50 | + */ |
|
| 51 | + public function getField(); |
|
| 52 | 52 | |
| 53 | - /** |
|
| 54 | - * Get the value to compare the field with |
|
| 55 | - * |
|
| 56 | - * @return string|integer|\DateTime |
|
| 57 | - * @since 12.0.0 |
|
| 58 | - */ |
|
| 59 | - public function getValue(); |
|
| 53 | + /** |
|
| 54 | + * Get the value to compare the field with |
|
| 55 | + * |
|
| 56 | + * @return string|integer|\DateTime |
|
| 57 | + * @since 12.0.0 |
|
| 58 | + */ |
|
| 59 | + public function getValue(); |
|
| 60 | 60 | } |
@@ -25,27 +25,27 @@ |
||
| 25 | 25 | * @since 12.0.0 |
| 26 | 26 | */ |
| 27 | 27 | interface ISearchBinaryOperator extends ISearchOperator { |
| 28 | - const OPERATOR_AND = 'and'; |
|
| 29 | - const OPERATOR_OR = 'or'; |
|
| 30 | - const OPERATOR_NOT = 'not'; |
|
| 28 | + const OPERATOR_AND = 'and'; |
|
| 29 | + const OPERATOR_OR = 'or'; |
|
| 30 | + const OPERATOR_NOT = 'not'; |
|
| 31 | 31 | |
| 32 | - /** |
|
| 33 | - * The type of binary operator |
|
| 34 | - * |
|
| 35 | - * One of the ISearchBinaryOperator::OPERATOR_* constants |
|
| 36 | - * |
|
| 37 | - * @return string |
|
| 38 | - * @since 12.0.0 |
|
| 39 | - */ |
|
| 40 | - public function getType(); |
|
| 32 | + /** |
|
| 33 | + * The type of binary operator |
|
| 34 | + * |
|
| 35 | + * One of the ISearchBinaryOperator::OPERATOR_* constants |
|
| 36 | + * |
|
| 37 | + * @return string |
|
| 38 | + * @since 12.0.0 |
|
| 39 | + */ |
|
| 40 | + public function getType(); |
|
| 41 | 41 | |
| 42 | - /** |
|
| 43 | - * The arguments for the binary operator |
|
| 44 | - * |
|
| 45 | - * One argument for the 'not' operator and two for 'and' and 'or' |
|
| 46 | - * |
|
| 47 | - * @return ISearchOperator[] |
|
| 48 | - * @since 12.0.0 |
|
| 49 | - */ |
|
| 50 | - public function getArguments(); |
|
| 42 | + /** |
|
| 43 | + * The arguments for the binary operator |
|
| 44 | + * |
|
| 45 | + * One argument for the 'not' operator and two for 'and' and 'or' |
|
| 46 | + * |
|
| 47 | + * @return ISearchOperator[] |
|
| 48 | + * @since 12.0.0 |
|
| 49 | + */ |
|
| 50 | + public function getArguments(); |
|
| 51 | 51 | } |
@@ -24,44 +24,44 @@ |
||
| 24 | 24 | use OCP\Files\Search\ISearchComparison; |
| 25 | 25 | |
| 26 | 26 | class SearchComparison implements ISearchComparison { |
| 27 | - /** @var string */ |
|
| 28 | - private $type; |
|
| 29 | - /** @var string */ |
|
| 30 | - private $field; |
|
| 31 | - /** @var string|integer|\DateTime */ |
|
| 32 | - private $value; |
|
| 27 | + /** @var string */ |
|
| 28 | + private $type; |
|
| 29 | + /** @var string */ |
|
| 30 | + private $field; |
|
| 31 | + /** @var string|integer|\DateTime */ |
|
| 32 | + private $value; |
|
| 33 | 33 | |
| 34 | - /** |
|
| 35 | - * SearchComparison constructor. |
|
| 36 | - * |
|
| 37 | - * @param string $type |
|
| 38 | - * @param string $field |
|
| 39 | - * @param \DateTime|int|string $value |
|
| 40 | - */ |
|
| 41 | - public function __construct($type, $field, $value) { |
|
| 42 | - $this->type = $type; |
|
| 43 | - $this->field = $field; |
|
| 44 | - $this->value = $value; |
|
| 45 | - } |
|
| 34 | + /** |
|
| 35 | + * SearchComparison constructor. |
|
| 36 | + * |
|
| 37 | + * @param string $type |
|
| 38 | + * @param string $field |
|
| 39 | + * @param \DateTime|int|string $value |
|
| 40 | + */ |
|
| 41 | + public function __construct($type, $field, $value) { |
|
| 42 | + $this->type = $type; |
|
| 43 | + $this->field = $field; |
|
| 44 | + $this->value = $value; |
|
| 45 | + } |
|
| 46 | 46 | |
| 47 | - /** |
|
| 48 | - * @return string |
|
| 49 | - */ |
|
| 50 | - public function getType() { |
|
| 51 | - return $this->type; |
|
| 52 | - } |
|
| 47 | + /** |
|
| 48 | + * @return string |
|
| 49 | + */ |
|
| 50 | + public function getType() { |
|
| 51 | + return $this->type; |
|
| 52 | + } |
|
| 53 | 53 | |
| 54 | - /** |
|
| 55 | - * @return string |
|
| 56 | - */ |
|
| 57 | - public function getField() { |
|
| 58 | - return $this->field; |
|
| 59 | - } |
|
| 54 | + /** |
|
| 55 | + * @return string |
|
| 56 | + */ |
|
| 57 | + public function getField() { |
|
| 58 | + return $this->field; |
|
| 59 | + } |
|
| 60 | 60 | |
| 61 | - /** |
|
| 62 | - * @return \DateTime|int|string |
|
| 63 | - */ |
|
| 64 | - public function getValue() { |
|
| 65 | - return $this->value; |
|
| 66 | - } |
|
| 61 | + /** |
|
| 62 | + * @return \DateTime|int|string |
|
| 63 | + */ |
|
| 64 | + public function getValue() { |
|
| 65 | + return $this->value; |
|
| 66 | + } |
|
| 67 | 67 | } |
@@ -25,33 +25,33 @@ |
||
| 25 | 25 | use OCP\Files\Search\ISearchOrder; |
| 26 | 26 | |
| 27 | 27 | class SearchOrder implements ISearchOrder { |
| 28 | - /** @var string */ |
|
| 29 | - private $direction; |
|
| 30 | - /** @var string */ |
|
| 31 | - private $field; |
|
| 28 | + /** @var string */ |
|
| 29 | + private $direction; |
|
| 30 | + /** @var string */ |
|
| 31 | + private $field; |
|
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * SearchOrder constructor. |
|
| 35 | - * |
|
| 36 | - * @param string $direction |
|
| 37 | - * @param string $field |
|
| 38 | - */ |
|
| 39 | - public function __construct($direction, $field) { |
|
| 40 | - $this->direction = $direction; |
|
| 41 | - $this->field = $field; |
|
| 42 | - } |
|
| 33 | + /** |
|
| 34 | + * SearchOrder constructor. |
|
| 35 | + * |
|
| 36 | + * @param string $direction |
|
| 37 | + * @param string $field |
|
| 38 | + */ |
|
| 39 | + public function __construct($direction, $field) { |
|
| 40 | + $this->direction = $direction; |
|
| 41 | + $this->field = $field; |
|
| 42 | + } |
|
| 43 | 43 | |
| 44 | - /** |
|
| 45 | - * @return string |
|
| 46 | - */ |
|
| 47 | - public function getDirection() { |
|
| 48 | - return $this->direction; |
|
| 49 | - } |
|
| 44 | + /** |
|
| 45 | + * @return string |
|
| 46 | + */ |
|
| 47 | + public function getDirection() { |
|
| 48 | + return $this->direction; |
|
| 49 | + } |
|
| 50 | 50 | |
| 51 | - /** |
|
| 52 | - * @return string |
|
| 53 | - */ |
|
| 54 | - public function getField() { |
|
| 55 | - return $this->field; |
|
| 56 | - } |
|
| 51 | + /** |
|
| 52 | + * @return string |
|
| 53 | + */ |
|
| 54 | + public function getField() { |
|
| 55 | + return $this->field; |
|
| 56 | + } |
|
| 57 | 57 | } |
@@ -25,33 +25,33 @@ |
||
| 25 | 25 | use OCP\Files\Search\ISearchOperator; |
| 26 | 26 | |
| 27 | 27 | class SearchBinaryOperator implements ISearchBinaryOperator { |
| 28 | - /** @var string */ |
|
| 29 | - private $type; |
|
| 30 | - /** @var ISearchOperator[] */ |
|
| 31 | - private $arguments; |
|
| 28 | + /** @var string */ |
|
| 29 | + private $type; |
|
| 30 | + /** @var ISearchOperator[] */ |
|
| 31 | + private $arguments; |
|
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * SearchBinaryOperator constructor. |
|
| 35 | - * |
|
| 36 | - * @param string $type |
|
| 37 | - * @param ISearchOperator[] $arguments |
|
| 38 | - */ |
|
| 39 | - public function __construct($type, array $arguments) { |
|
| 40 | - $this->type = $type; |
|
| 41 | - $this->arguments = $arguments; |
|
| 42 | - } |
|
| 33 | + /** |
|
| 34 | + * SearchBinaryOperator constructor. |
|
| 35 | + * |
|
| 36 | + * @param string $type |
|
| 37 | + * @param ISearchOperator[] $arguments |
|
| 38 | + */ |
|
| 39 | + public function __construct($type, array $arguments) { |
|
| 40 | + $this->type = $type; |
|
| 41 | + $this->arguments = $arguments; |
|
| 42 | + } |
|
| 43 | 43 | |
| 44 | - /** |
|
| 45 | - * @return string |
|
| 46 | - */ |
|
| 47 | - public function getType() { |
|
| 48 | - return $this->type; |
|
| 49 | - } |
|
| 44 | + /** |
|
| 45 | + * @return string |
|
| 46 | + */ |
|
| 47 | + public function getType() { |
|
| 48 | + return $this->type; |
|
| 49 | + } |
|
| 50 | 50 | |
| 51 | - /** |
|
| 52 | - * @return ISearchOperator[] |
|
| 53 | - */ |
|
| 54 | - public function getArguments() { |
|
| 55 | - return $this->arguments; |
|
| 56 | - } |
|
| 51 | + /** |
|
| 52 | + * @return ISearchOperator[] |
|
| 53 | + */ |
|
| 54 | + public function getArguments() { |
|
| 55 | + return $this->arguments; |
|
| 56 | + } |
|
| 57 | 57 | } |