Merge pull request #5 from icewind1991/scrutinizer-patch-1

Scrutinizer Auto-Fixes
This commit is contained in:
Robin Appelman 2018-03-22 17:07:21 +01:00 committed by GitHub
commit b3fde1c79b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -100,7 +100,7 @@ class SearchHandler {
* @return Query
*/
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])) {
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);
}, $xml->orderBy);
$select = array_map(function ($propName) use ($allProps) {
$select = array_map(function($propName) use ($allProps) {
if (!isset($allProps[$propName])) {
return;
}
@ -128,7 +128,7 @@ class SearchHandler {
}
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 (!isset($allProps[$argument])) {
throw new BadRequest('requested search property is not a valid property for this scope');