Skip to content

Commit fab4b51

Browse files
committed
return animals as list
1 parent 7a00106 commit fab4b51

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

remote.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,16 @@ public function listAnimalUrls(): array
6161
}
6262

6363
/**
64-
* Get configuration details of farmer plugin enriched by animal name and urls
64+
* Get configuration details of farmer plugin enriched by list of animals
6565
*
6666
* @return array
6767
*/
6868
public function getFarmerConfig(): array
6969
{
7070
$farmerConfig = $this->helper->getConfig();
71-
foreach($this->helper->getAllAnimals() as $animal) {
72-
$farmerConfig['animals'][$animal] = $this->helper->getAnimalURL($animal);
71+
foreach($this->helper->getAllAnimals() as $index=>$animal) {
72+
$farmerConfig['animals'][$index]["name"] =$animal;
73+
$farmerConfig['animals'][$index]["url"] = $this->helper->getAnimalURL($animal);
7374
}
7475
return $farmerConfig;
7576
}

0 commit comments

Comments
 (0)