Completed
Branch master (50b56d)
by Robin
07:28
created
src/DAV/SearchPlugin.php 3 patches
Doc Comments   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,6 +71,9 @@  discard block
 block discarded – undo
71 71
 		}
72 72
 	}
73 73
 
74
+	/**
75
+	 * @param string $uri
76
+	 */
74 77
 	private function getPathFromUri($uri) {
75 78
 		if (strpos($uri, '://') === false) {
76 79
 			return $uri;
@@ -170,9 +173,9 @@  discard block
 block discarded – undo
170 173
 	 * If a depth of 1 is requested child elements will also be returned.
171 174
 	 *
172 175
 	 * @param SearchResult[] $results
173
-	 * @param array $propertyNames
176
+	 * @param string[] $propertyNames
174 177
 	 * @param int $depth
175
-	 * @return \Iterator
178
+	 * @return \Traversable
176 179
 	 */
177 180
 	function getPropertiesIteratorResults($results, $propertyNames = [], $depth = 0) {
178 181
 		$propFindType = $propertyNames ? PropFind::NORMAL : PropFind::ALLPROPS;
Please login to merge, or discard this patch.
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -24,15 +24,12 @@
 block discarded – undo
24 24
 use Sabre\DAV\Exception\BadRequest;
25 25
 use Sabre\DAV\Exception\Forbidden;
26 26
 use Sabre\DAV\INode;
27
-use Sabre\DAV\Node;
28 27
 use Sabre\DAV\PropFind;
29 28
 use Sabre\DAV\Server;
30 29
 use Sabre\DAV\ServerPlugin;
31
-use Sabre\DAV\Xml\Element\Response;
32 30
 use Sabre\DAV\Xml\Response\MultiStatus;
33 31
 use Sabre\HTTP\RequestInterface;
34 32
 use Sabre\HTTP\ResponseInterface;
35
-use Sabre\Xml\Writer;
36 33
 use SearchDAV\Backend\ISearchBackend;
37 34
 use SearchDAV\Backend\SearchPropertyDefinition;
38 35
 use SearchDAV\Backend\SearchResult;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@
 block discarded – undo
140 140
 				/** @var BasicSearch $query */
141 141
 				$query = $xml['{DAV:}basicsearch'];
142 142
 				$scopes = $query->from;
143
-				$results = array_map(function (Scope $scope) {
143
+				$results = array_map(function(Scope $scope) {
144 144
 					$scope->path = $this->getPathFromUri($scope->href);
145 145
 					if ($this->searchBackend->isValidScope($scope->href, $scope->depth, $scope->path)) {
146 146
 						$searchProperties = $this->searchBackend->getPropertyDefinitionsForScope($scope->href, $scope->path);
Please login to merge, or discard this patch.
src/XML/QueryDiscoverResponse.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/XML/Scope.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
 
53 53
 	/**
54 54
 	 * @param string $href
55
-	 * @param int|string $depth
55
+	 * @param integer $depth
56 56
 	 */
57 57
 	public function __construct($href = '', $depth = 1) {
58 58
 		$this->href = $href;
Please login to merge, or discard this patch.
src/DAV/QueryParser.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -43,18 +43,18 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/XML/PropDesc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.