Skip to content

Commit b2d514e

Browse files
committed
:octocat:
1 parent 97ef462 commit b2d514e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/MagicAPI/EndpointDocblock.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ public function create(string $returntype):string{
5151

5252
$str = '/**'.PHP_EOL;
5353

54-
foreach($this->endpointMap->toArray() as $methodName => $params){
54+
$ep = $this->endpointMap->toArray();
55+
ksort($ep);
56+
57+
foreach($ep as $methodName => $params){
5558

5659
if($methodName === 'API_BASE'){
5760
continue;
@@ -106,7 +109,10 @@ public function createInterface(string $name, string $returntype):bool{
106109
.'use \\'.$returntype.';'.PHP_EOL.PHP_EOL
107110
.'interface '.$interfaceName.'{'.PHP_EOL.PHP_EOL;
108111

109-
foreach($this->endpointMap->toArray() as $methodName => $params){
112+
$ep = $this->endpointMap->toArray();
113+
ksort($ep);
114+
115+
foreach($ep as $methodName => $params){
110116

111117
if($methodName === 'API_BASE'){
112118
continue;

0 commit comments

Comments
 (0)