summaryrefslogtreecommitdiffstats
path: root/generate-sample-gig-data.php
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2021-05-08 19:27:18 +0200
committerHarald Eilertsen <haraldei@anduin.net>2021-05-08 19:27:58 +0200
commit557e9f48fb59194f581c6760f484aacb80d5d13d (patch)
treed4db88d4743f84c35f41f4ccc20e13baf72315e0 /generate-sample-gig-data.php
parent4977a733b6f614de868fc405b820d5c66e5bf9b7 (diff)
downloadgigologadmin-557e9f48fb59194f581c6760f484aacb80d5d13d.tar.gz
gigologadmin-557e9f48fb59194f581c6760f484aacb80d5d13d.tar.bz2
gigologadmin-557e9f48fb59194f581c6760f484aacb80d5d13d.zip
Fix return types for abstract class GeneratorBase.
Diffstat (limited to 'generate-sample-gig-data.php')
-rw-r--r--generate-sample-gig-data.php16
1 files changed, 5 insertions, 11 deletions
diff --git a/generate-sample-gig-data.php b/generate-sample-gig-data.php
index bbc3e7d..cd18197 100644
--- a/generate-sample-gig-data.php
+++ b/generate-sample-gig-data.php
@@ -7,9 +7,9 @@
abstract class GeneratorBase
{
- abstract public function get();
+ abstract public function get() : string;
- function pick($arr)
+ function pick(array $arr) : string
{
return $arr[array_rand($arr)];
}
@@ -51,10 +51,7 @@ class BandNameGenerator extends GeneratorBase
"ed",
);
- /**
- * @return string
- */
- public function get()
+ public function get() : string
{
$parts = array(
$this->pick($this->prefixes),
@@ -94,10 +91,7 @@ class VenueGenerator extends GeneratorBase
"lighthouse"
);
- /**
- * @return string
- */
- public function get()
+ public function get() : string
{
$parts = array(
$this->pick($this->prefix1),
@@ -113,7 +107,7 @@ class LinkGenerator extends GeneratorBase
/**
* @return string
*/
- public function get()
+ public function get() : string
{
return 'https://example.com/' . bin2hex(random_bytes(8));
}