@@ -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