| @@ -33,7 +33,7 @@ | ||
| 33 | 33 | * | 
| 34 | 34 | * @param string $href | 
| 35 | 35 | * @param BasicSearchSchema|null $schema | 
| 36 | - * @param null|int|string $httpStatus | |
| 36 | + * @param integer $httpStatus | |
| 37 | 37 | */ | 
| 38 | 38 |  	function __construct($href, BasicSearchSchema $schema = null, $httpStatus = null) { | 
| 39 | 39 | parent::__construct($href, [], $httpStatus); | 
| @@ -43,18 +43,18 @@ | ||
| 43 | 43 |  			'{DAV:}searchrequest' => Element\KeyValue::class, | 
| 44 | 44 |  			'{DAV:}query-schema-discovery' => Element\KeyValue::class, | 
| 45 | 45 |  			'{DAV:}basicsearch' => BasicSearch::class, | 
| 46 | -			'{DAV:}select' => function (Reader $reader) { | |
| 46 | +			'{DAV:}select' => function(Reader $reader) { | |
| 47 | 47 |  				return \Sabre\Xml\Deserializer\keyValue($reader, '{DAV:}scope')['{DAV:}prop']; | 
| 48 | 48 | }, | 
| 49 | -			'{DAV:}from' => function (Reader $reader) { | |
| 49 | +			'{DAV:}from' => function(Reader $reader) { | |
| 50 | 50 |  				return \Sabre\Xml\Deserializer\repeatingElements($reader, '{DAV:}scope'); | 
| 51 | 51 | }, | 
| 52 | -			'{DAV:}orderby' => function (Reader $reader) { | |
| 52 | +			'{DAV:}orderby' => function(Reader $reader) { | |
| 53 | 53 |  				return \Sabre\Xml\Deserializer\repeatingElements($reader, '{DAV:}order'); | 
| 54 | 54 | }, | 
| 55 | 55 |  			'{DAV:}scope' => Scope::class, | 
| 56 | -			'{DAV:}where' => function (Reader $reader) { | |
| 57 | -				$operators = array_map(function ($element) { | |
| 56 | +			'{DAV:}where' => function(Reader $reader) { | |
| 57 | +				$operators = array_map(function($element) { | |
| 58 | 58 | return $element['value']; | 
| 59 | 59 | }, $reader->parseGetElements()); | 
| 60 | 60 | return (isset($operators[0])) ? $operators[0] : null; | 
| @@ -48,7 +48,7 @@ | ||
| 48 | 48 |  		if ($this->selectable) { | 
| 49 | 49 |  			$data['{DAV:}selectable'] = null; | 
| 50 | 50 | } | 
| 51 | -		$writer->write(array_map(function ($propName) { | |
| 51 | +		$writer->write(array_map(function($propName) { | |
| 52 | 52 | return [ | 
| 53 | 53 |  				'name' => '{DAV:}prop', | 
| 54 | 54 | 'value' => $propName | 
| @@ -87,9 +87,9 @@ | ||
| 87 | 87 | * If a depth of 1 is requested child elements will also be returned. | 
| 88 | 88 | * | 
| 89 | 89 | * @param SearchResult[] $results | 
| 90 | - * @param array $propertyNames | |
| 90 | + * @param string[] $propertyNames | |
| 91 | 91 | * @param int $depth | 
| 92 | - * @return \Iterator | |
| 92 | + * @return \Traversable | |
| 93 | 93 | */ | 
| 94 | 94 |  	private function getPropertiesIteratorResults($results, $propertyNames = [], $depth = 0) { | 
| 95 | 95 | $propFindType = $propertyNames ? PropFind::NORMAL : PropFind::ALLPROPS; | 
| @@ -100,7 +100,7 @@ discard block | ||
| 100 | 100 | * @return Query | 
| 101 | 101 | */ | 
| 102 | 102 |  	private function getQueryForXML(BasicSearch $xml, array $allProps) { | 
| 103 | -		$orderBy = array_map(function (\SearchDAV\XML\Order $order) use ($allProps) { | |
| 103 | +		$orderBy = array_map(function(\SearchDAV\XML\Order $order) use ($allProps) { | |
| 104 | 104 |  			if (!isset($allProps[$order->property])) { | 
| 105 | 105 |  				throw new BadRequest('requested order by property is not a valid property for this scope'); | 
| 106 | 106 | } | 
| @@ -110,7 +110,7 @@ discard block | ||
| 110 | 110 | } | 
| 111 | 111 | return new Order($prop, $order->order); | 
| 112 | 112 | }, $xml->orderBy); | 
| 113 | -		$select = array_map(function ($propName) use ($allProps) { | |
| 113 | +		$select = array_map(function($propName) use ($allProps) { | |
| 114 | 114 |  			if (!isset($allProps[$propName])) { | 
| 115 | 115 |  				throw new BadRequest('requested property is not a valid property for this scope'); | 
| 116 | 116 | } | 
| @@ -120,7 +120,7 @@ discard block | ||
| 120 | 120 | } | 
| 121 | 121 | return $prop; | 
| 122 | 122 | }, $xml->select); | 
| 123 | -		$arguments = array_map(function ($argument) use ($allProps) { | |
| 123 | +		$arguments = array_map(function($argument) use ($allProps) { | |
| 124 | 124 |  			if (is_string($argument)) { | 
| 125 | 125 |  				if (!isset($allProps[$argument])) { | 
| 126 | 126 |  					throw new BadRequest('requested search property is not a valid property for this scope'); | 
| @@ -141,7 +141,7 @@ discard block | ||
| 141 | 141 | } | 
| 142 | 142 | |
| 143 | 143 |  	private function transformOperator(\SearchDAV\XML\Operator $operator, array $allProps) { | 
| 144 | -		$arguments = array_map(function ($argument) use ($allProps) { | |
| 144 | +		$arguments = array_map(function($argument) use ($allProps) { | |
| 145 | 145 |  			if (is_string($argument)) { | 
| 146 | 146 |  				if (!isset($allProps[$argument])) { | 
| 147 | 147 |  					throw new BadRequest('requested search property is not a valid property for this scope'); | 
| @@ -61,7 +61,7 @@ | ||
| 61 | 61 | /** @var BasicSearch $query */ | 
| 62 | 62 |  		$query = $xml['{DAV:}basicsearch']; | 
| 63 | 63 | $scopes = $query->from; | 
| 64 | -		$results = array_map(function (Scope $scope) { | |
| 64 | +		$results = array_map(function(Scope $scope) { | |
| 65 | 65 | $scope->path = $this->pathHelper->getPathFromUri($scope->href); | 
| 66 | 66 |  			if ($this->searchBackend->isValidScope($scope->href, $scope->depth, $scope->path)) { | 
| 67 | 67 | $searchProperties = $this->searchBackend->getPropertyDefinitionsForScope($scope->href, $scope->path); |