@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $offset = $arguments['offset']; |
72 | 72 | $stopAt = $arguments['stopAt']; |
73 | 73 | |
74 | - $this->logger->info('Building calendar index (' . $offset .'/' . $stopAt . ')'); |
|
74 | + $this->logger->info('Building calendar index ('.$offset.'/'.$stopAt.')'); |
|
75 | 75 | |
76 | 76 | $offset = $this->buildIndex($offset, $stopAt); |
77 | 77 | |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | 'offset' => $offset, |
83 | 83 | 'stopAt' => $stopAt |
84 | 84 | ]); |
85 | - $this->logger->info('New building calendar index job scheduled with offset ' . $offset); |
|
85 | + $this->logger->info('New building calendar index job scheduled with offset '.$offset); |
|
86 | 86 | } |
87 | 87 | } |
88 | 88 |
@@ -116,42 +116,42 @@ |
||
116 | 116 | * @return void |
117 | 117 | */ |
118 | 118 | public function xmlSerialize(Writer $writer) { |
119 | - $cs = '{' . Plugin::NS_OWNCLOUD . '}'; |
|
119 | + $cs = '{'.Plugin::NS_OWNCLOUD.'}'; |
|
120 | 120 | |
121 | 121 | if (!is_null($this->organizer)) { |
122 | - $writer->startElement($cs . 'organizer'); |
|
122 | + $writer->startElement($cs.'organizer'); |
|
123 | 123 | $writer->writeElement('{DAV:}href', $this->organizer['href']); |
124 | 124 | |
125 | 125 | if (isset($this->organizer['commonName']) && $this->organizer['commonName']) { |
126 | - $writer->writeElement($cs . 'common-name', $this->organizer['commonName']); |
|
126 | + $writer->writeElement($cs.'common-name', $this->organizer['commonName']); |
|
127 | 127 | } |
128 | 128 | if (isset($this->organizer['firstName']) && $this->organizer['firstName']) { |
129 | - $writer->writeElement($cs . 'first-name', $this->organizer['firstName']); |
|
129 | + $writer->writeElement($cs.'first-name', $this->organizer['firstName']); |
|
130 | 130 | } |
131 | 131 | if (isset($this->organizer['lastName']) && $this->organizer['lastName']) { |
132 | - $writer->writeElement($cs . 'last-name', $this->organizer['lastName']); |
|
132 | + $writer->writeElement($cs.'last-name', $this->organizer['lastName']); |
|
133 | 133 | } |
134 | 134 | $writer->endElement(); // organizer |
135 | 135 | } |
136 | 136 | |
137 | 137 | foreach ($this->users as $user) { |
138 | - $writer->startElement($cs . 'user'); |
|
138 | + $writer->startElement($cs.'user'); |
|
139 | 139 | $writer->writeElement('{DAV:}href', $user['href']); |
140 | 140 | if (isset($user['commonName']) && $user['commonName']) { |
141 | - $writer->writeElement($cs . 'common-name', $user['commonName']); |
|
141 | + $writer->writeElement($cs.'common-name', $user['commonName']); |
|
142 | 142 | } |
143 | - $writer->writeElement($cs . 'invite-accepted'); |
|
143 | + $writer->writeElement($cs.'invite-accepted'); |
|
144 | 144 | |
145 | - $writer->startElement($cs . 'access'); |
|
145 | + $writer->startElement($cs.'access'); |
|
146 | 146 | if ($user['readOnly']) { |
147 | - $writer->writeElement($cs . 'read'); |
|
147 | + $writer->writeElement($cs.'read'); |
|
148 | 148 | } else { |
149 | - $writer->writeElement($cs . 'read-write'); |
|
149 | + $writer->writeElement($cs.'read-write'); |
|
150 | 150 | } |
151 | 151 | $writer->endElement(); // access |
152 | 152 | |
153 | 153 | if (isset($user['summary']) && $user['summary']) { |
154 | - $writer->writeElement($cs . 'summary', $user['summary']); |
|
154 | + $writer->writeElement($cs.'summary', $user['summary']); |
|
155 | 155 | } |
156 | 156 | |
157 | 157 | $writer->endElement(); //user |
@@ -63,7 +63,7 @@ |
||
63 | 63 | private function setupUserFs($userId) { |
64 | 64 | \OC_Util::setupFS($userId); |
65 | 65 | $this->session->close(); |
66 | - return $this->principalPrefix . $userId; |
|
66 | + return $this->principalPrefix.$userId; |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | /** |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | return null; |
89 | 89 | } |
90 | 90 | foreach ($tree as $elem) { |
91 | - if ($elem['name'] === '{' . self::NS_OWNCLOUD . '}tag') { |
|
91 | + if ($elem['name'] === '{'.self::NS_OWNCLOUD.'}tag') { |
|
92 | 92 | $tags[] = $elem['value']; |
93 | 93 | } |
94 | 94 | } |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | */ |
117 | 117 | public function xmlSerialize(Writer $writer) { |
118 | 118 | foreach ($this->tags as $tag) { |
119 | - $writer->writeElement('{' . self::NS_OWNCLOUD . '}tag', $tag); |
|
119 | + $writer->writeElement('{'.self::NS_OWNCLOUD.'}tag', $tag); |
|
120 | 120 | } |
121 | 121 | } |
122 | 122 | } |
@@ -87,10 +87,10 @@ |
||
87 | 87 | * @return void |
88 | 88 | */ |
89 | 89 | public function propFind(PropFind $propFind, INode $node) { |
90 | - $propFind->handle('{DAV:}supportedlock', function () { |
|
90 | + $propFind->handle('{DAV:}supportedlock', function() { |
|
91 | 91 | return new SupportedLock(true); |
92 | 92 | }); |
93 | - $propFind->handle('{DAV:}lockdiscovery', function () use ($propFind) { |
|
93 | + $propFind->handle('{DAV:}lockdiscovery', function() use ($propFind) { |
|
94 | 94 | return new LockDiscovery([]); |
95 | 95 | }); |
96 | 96 | } |
@@ -64,7 +64,7 @@ |
||
64 | 64 | */ |
65 | 65 | public function xmlSerialize(Writer $writer) { |
66 | 66 | foreach ($this->checksums as $checksum) { |
67 | - $writer->writeElement('{' . self::NS_OWNCLOUD . '}checksum', $checksum); |
|
67 | + $writer->writeElement('{'.self::NS_OWNCLOUD.'}checksum', $checksum); |
|
68 | 68 | } |
69 | 69 | } |
70 | 70 | } |
@@ -71,8 +71,8 @@ discard block |
||
71 | 71 | return null; |
72 | 72 | } |
73 | 73 | foreach ($tree as $elem) { |
74 | - if ($elem['name'] === '{' . self::NS_OWNCLOUD . '}share-type') { |
|
75 | - $shareTypes[] = (int)$elem['value']; |
|
74 | + if ($elem['name'] === '{'.self::NS_OWNCLOUD.'}share-type') { |
|
75 | + $shareTypes[] = (int) $elem['value']; |
|
76 | 76 | } |
77 | 77 | } |
78 | 78 | return new self($shareTypes); |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | */ |
87 | 87 | public function xmlSerialize(Writer $writer) { |
88 | 88 | foreach ($this->shareTypes as $shareType) { |
89 | - $writer->writeElement('{' . self::NS_OWNCLOUD . '}share-type', $shareType); |
|
89 | + $writer->writeElement('{'.self::NS_OWNCLOUD.'}share-type', $shareType); |
|
90 | 90 | } |
91 | 91 | } |
92 | 92 | } |
@@ -35,7 +35,7 @@ |
||
35 | 35 | public static function xmlDeserialize(Reader $reader) { |
36 | 36 | $value = $reader->parseInnerTree(); |
37 | 37 | if (!is_string($value)) { |
38 | - throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}search-term has illegal value'); |
|
38 | + throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}search-term has illegal value'); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | return $value; |
@@ -94,15 +94,15 @@ discard block |
||
94 | 94 | $tags = $this->tagManager->getTagsByIds([$tagId]); |
95 | 95 | $tag = current($tags); |
96 | 96 | if (!$this->tagManager->canUserSeeTag($tag, $this->user)) { |
97 | - throw new PreconditionFailed('Tag with id ' . $tagId . ' does not exist, cannot assign'); |
|
97 | + throw new PreconditionFailed('Tag with id '.$tagId.' does not exist, cannot assign'); |
|
98 | 98 | } |
99 | 99 | if (!$this->tagManager->canUserAssignTag($tag, $this->user)) { |
100 | - throw new Forbidden('No permission to assign tag ' . $tagId); |
|
100 | + throw new Forbidden('No permission to assign tag '.$tagId); |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | $this->tagMapper->assignTags($this->objectId, $this->objectType, $tagId); |
104 | 104 | } catch (TagNotFoundException $e) { |
105 | - throw new PreconditionFailed('Tag with id ' . $tagId . ' does not exist, cannot assign'); |
|
105 | + throw new PreconditionFailed('Tag with id '.$tagId.' does not exist, cannot assign'); |
|
106 | 106 | } |
107 | 107 | } |
108 | 108 | |
@@ -119,11 +119,11 @@ discard block |
||
119 | 119 | return $this->makeNode($tag); |
120 | 120 | } |
121 | 121 | } |
122 | - throw new NotFound('Tag with id ' . $tagId . ' not present for object ' . $this->objectId); |
|
122 | + throw new NotFound('Tag with id '.$tagId.' not present for object '.$this->objectId); |
|
123 | 123 | } catch (\InvalidArgumentException $e) { |
124 | 124 | throw new BadRequest('Invalid tag id', 0, $e); |
125 | 125 | } catch (TagNotFoundException $e) { |
126 | - throw new NotFound('Tag with id ' . $tagId . ' not found', 0, $e); |
|
126 | + throw new NotFound('Tag with id '.$tagId.' not found', 0, $e); |
|
127 | 127 | } |
128 | 128 | } |
129 | 129 | |
@@ -135,11 +135,11 @@ discard block |
||
135 | 135 | $tags = $this->tagManager->getTagsByIds($tagIds); |
136 | 136 | |
137 | 137 | // filter out non-visible tags |
138 | - $tags = array_filter($tags, function ($tag) { |
|
138 | + $tags = array_filter($tags, function($tag) { |
|
139 | 139 | return $this->tagManager->canUserSeeTag($tag, $this->user); |
140 | 140 | }); |
141 | 141 | |
142 | - return array_values(array_map(function ($tag) { |
|
142 | + return array_values(array_map(function($tag) { |
|
143 | 143 | return $this->makeNode($tag); |
144 | 144 | }, $tags)); |
145 | 145 | } |