Skip to content

Commit b3827c3

Browse files
committed
chore feat(capabilities): run cs:fix
Signed-off-by: Florian Wagner <f.wagner81@gmail.com>
1 parent a73273b commit b3827c3

2 files changed

Lines changed: 30 additions & 31 deletions

File tree

lib/Capabilities.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function __construct(
9898
private IAppManager $appManager,
9999
private ?string $userId,
100100
private IURLGenerator $urlGenerator,
101-
private DiscoveryService $discoveryService,
101+
private DiscoveryService $discoveryService,
102102
) {
103103
}
104104

lib/Service/DiscoveryService.php

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -128,34 +128,33 @@ private function getParsed(): SimpleXMLElement {
128128
}
129129
}
130130

131-
/**
132-
* Dynamically get all supported mime types out of the discovery XML
133-
* @todo Currently no categories given from endpoint
134-
*
135-
* @return array
136-
* @throws \Exception
137-
*/
138-
public function getSupportedMimeTypes(): array
139-
{
140-
$mimeTypes = [];
141-
142-
try {
143-
$parsed = $this->getParsed();
144-
} catch (\Exception $e) {
145-
// @todo fallback to a default set instead of empty array
146-
return $mimeTypes;
147-
}
148-
149-
foreach ($parsed->xpath('//net-zone/app') as $app) {
150-
$mimeTypeName = (string)$app['name']; // (e.g. "application/pdf")
151-
152-
// Filter (Settings, Capabilities, etc.)
153-
if (!str_contains($mimeTypeName, '/')) {
154-
continue;
155-
}
156-
$mimeTypes[] = $mimeTypeName;
157-
}
158-
159-
return array_values(array_unique($mimeTypes));
160-
}
131+
/**
132+
* Dynamically get all supported mime types out of the discovery XML
133+
* @todo Currently no categories given from endpoint
134+
*
135+
* @return array
136+
* @throws \Exception
137+
*/
138+
public function getSupportedMimeTypes(): array {
139+
$mimeTypes = [];
140+
141+
try {
142+
$parsed = $this->getParsed();
143+
} catch (\Exception $e) {
144+
// @todo fallback to a default set instead of empty array
145+
return $mimeTypes;
146+
}
147+
148+
foreach ($parsed->xpath('//net-zone/app') as $app) {
149+
$mimeTypeName = (string)$app['name']; // (e.g. "application/pdf")
150+
151+
// Filter (Settings, Capabilities, etc.)
152+
if (!str_contains($mimeTypeName, '/')) {
153+
continue;
154+
}
155+
$mimeTypes[] = $mimeTypeName;
156+
}
157+
158+
return array_values(array_unique($mimeTypes));
159+
}
161160
}

0 commit comments

Comments
 (0)