mirror of
https://codeberg.org/icewind/SearchDAV.git
synced 2026-06-03 09:34:08 +02:00
Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
This commit is contained in:
parent
aa91e9c193
commit
6d421fc4ec
1 changed files with 3 additions and 3 deletions
|
|
@ -100,7 +100,7 @@ class SearchHandler {
|
||||||
* @return Query
|
* @return Query
|
||||||
*/
|
*/
|
||||||
private function getQueryForXML(BasicSearch $xml, array $allProps) {
|
private function getQueryForXML(BasicSearch $xml, array $allProps) {
|
||||||
$orderBy = array_map(function (\SearchDAV\XML\Order $order) use ($allProps) {
|
$orderBy = array_map(function(\SearchDAV\XML\Order $order) use ($allProps) {
|
||||||
if (!isset($allProps[$order->property])) {
|
if (!isset($allProps[$order->property])) {
|
||||||
throw new BadRequest('requested order by property is not a valid property for this scope');
|
throw new BadRequest('requested order by property is not a valid property for this scope');
|
||||||
}
|
}
|
||||||
|
|
@ -110,7 +110,7 @@ class SearchHandler {
|
||||||
}
|
}
|
||||||
return new Order($prop, $order->order);
|
return new Order($prop, $order->order);
|
||||||
}, $xml->orderBy);
|
}, $xml->orderBy);
|
||||||
$select = array_map(function ($propName) use ($allProps) {
|
$select = array_map(function($propName) use ($allProps) {
|
||||||
if (!isset($allProps[$propName])) {
|
if (!isset($allProps[$propName])) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -128,7 +128,7 @@ class SearchHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
private function transformOperator(\SearchDAV\XML\Operator $operator, array $allProps) {
|
private function transformOperator(\SearchDAV\XML\Operator $operator, array $allProps) {
|
||||||
$arguments = array_map(function ($argument) use ($allProps) {
|
$arguments = array_map(function($argument) use ($allProps) {
|
||||||
if (is_string($argument)) {
|
if (is_string($argument)) {
|
||||||
if (!isset($allProps[$argument])) {
|
if (!isset($allProps[$argument])) {
|
||||||
throw new BadRequest('requested search property is not a valid property for this scope');
|
throw new BadRequest('requested search property is not a valid property for this scope');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue