Skip to content

Commit 107b329

Browse files
committed
add doc blocks
1 parent 6180f6b commit 107b329

File tree

1 file changed

+29
-4
lines changed

1 file changed

+29
-4
lines changed

remote.php

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,44 @@ public function __construct()
1616
$this->helper = plugin_load('helper', 'farmer');
1717
}
1818

19-
public function getHostname() {
19+
/**
20+
* Get the configured farm host
21+
*
22+
* @return string
23+
*/
24+
public function getFarmhost(): string
25+
{
2026
return $this->helper->getConfig()['base']['farmhost'];
2127
}
2228

23-
public function getBaseDomain() {
29+
/**
30+
* Get the configured base domain of the farmer
31+
* This could be an empty string, then farmhost will be used to determine an animal url
32+
*
33+
* @return string
34+
*/
35+
public function getBaseDomain(): string
36+
{
2437
return $this->helper->getConfig()['base']['basedomain'];
2538
}
2639

27-
public function listAnimals() {
40+
/**
41+
* Get a list of all animal names
42+
*
43+
* @return array
44+
*/
45+
public function listAnimals(): array
46+
{
2847
return $this->helper->getAllAnimals();
2948
}
3049

31-
public function listAnimalUrls() {
50+
/**
51+
* Get a list of all animal urls
52+
*
53+
* @return array
54+
*/
55+
public function listAnimalUrls(): array
56+
{
3257
foreach($this->helper->getAllAnimals() as $animal) {
3358
$animalUrls[] = $this->helper->getAnimalURL($animal);
3459
}

0 commit comments

Comments
 (0)