Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit 043f33f

Browse files
authored
fix: detailed endpoint format when spaced in EndpointMapToArray
when there are spaces in the endpoint list, use the detailed format with index numbers instead of the simple array
1 parent 780b04f commit 043f33f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/transformers/EndpointMapToArray.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,12 @@ private function getEndpointsArray($endpointMap)
6565
}
6666
$endpointMap = $fullBindingNames;
6767

68-
// if all endpoints use the default binding
69-
if (count($endpointMap) === 1 && isset($endpointMap[$this->defaultBinding])) {
68+
// if all endpoints use the default binding and there are no spaces
69+
if (count($endpointMap) === 1 && isset($endpointMap[$this->defaultBinding])
70+
&& strpos(
71+
$endpointMap[$this->defaultBinding],
72+
self::MAPLIST_SEPARATOR . self::MAPLIST_SEPARATOR
73+
) === false) {
7074
$result = explode(self::MAPLIST_SEPARATOR, $endpointMap[$this->defaultBinding]);
7175
return count($result) === 1 ? $result[0] : $result;
7276
}

0 commit comments

Comments
 (0)