Nullable+void typehint

This commit is contained in:
Dennis Eichhorn 2018-03-13 20:55:24 +01:00
parent cd9aeaaee4
commit 7fcbaf1161
5 changed files with 18 additions and 18 deletions

View File

@ -36,7 +36,7 @@ class Navigation
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function install(string $path = null, DatabasePool $dbPool = null) /* : void */ public static function install(string $path = null, DatabasePool $dbPool = null) : void
{ {
$navData = json_decode(file_get_contents(__DIR__ . '/Navigation.install.json'), true); $navData = json_decode(file_get_contents(__DIR__ . '/Navigation.install.json'), true);

View File

@ -53,7 +53,7 @@ class QAAnswer implements \JsonSerializable
return $this->answer; return $this->answer;
} }
public function setAnswer(string $answer) /* : void */ public function setAnswer(string $answer) : void
{ {
$this->answer = $answer; $this->answer = $answer;
} }
@ -63,7 +63,7 @@ class QAAnswer implements \JsonSerializable
return $this->question; return $this->question;
} }
public function setQuestion(int $question) /* : void */ public function setQuestion(int $question) : void
{ {
$this->question = $question; $this->question = $question;
} }
@ -73,12 +73,12 @@ class QAAnswer implements \JsonSerializable
return $this->status; return $this->status;
} }
public function setStatus(int $status) /* : void */ public function setStatus(int $status) : void
{ {
$this->status = $status; $this->status = $status;
} }
public function setAccepted(bool $accepted) /* : void */ public function setAccepted(bool $accepted) : void
{ {
$this->isAccepted = $accepted; $this->isAccepted = $accepted;
} }
@ -93,7 +93,7 @@ class QAAnswer implements \JsonSerializable
return $this->createdBy; return $this->createdBy;
} }
public function setCreatedBy(int $id) /* : void */ public function setCreatedBy(int $id) : void
{ {
$this->createdBy = $id; $this->createdBy = $id;
} }

View File

@ -42,7 +42,7 @@ class QABadge implements \JsonSerializable
return $this->name; return $this->name;
} }
public function setName(string $name) /* : void */ public function setName(string $name) : void
{ {
$this->name = $name; $this->name = $name;
} }

View File

@ -44,17 +44,17 @@ class QACategory implements \JsonSerializable
return $this->name; return $this->name;
} }
public function setName(string $name) /* : void */ public function setName(string $name) : void
{ {
$this->name = $name; $this->name = $name;
} }
public function getParent() /* : ?int */ public function getParent() : ?int
{ {
return $this->parent; return $this->parent;
} }
public function setParent(int $parent) /* : void */ public function setParent(int $parent) : void
{ {
$this->parent = $parent; $this->parent = $parent;
} }

View File

@ -70,7 +70,7 @@ class QAQuestion implements \JsonSerializable
return $this->language; return $this->language;
} }
public function setLanguage(string $language) /* : void */ public function setLanguage(string $language) : void
{ {
$this->language = $language; $this->language = $language;
} }
@ -91,7 +91,7 @@ class QAQuestion implements \JsonSerializable
return $this->name; return $this->name;
} }
public function setName(string $name) /* : void */ public function setName(string $name) : void
{ {
$this->name = $name; $this->name = $name;
} }
@ -101,7 +101,7 @@ class QAQuestion implements \JsonSerializable
return $this->question; return $this->question;
} }
public function setQuestion(string $question) /* : void */ public function setQuestion(string $question) : void
{ {
$this->question = $question; $this->question = $question;
} }
@ -111,7 +111,7 @@ class QAQuestion implements \JsonSerializable
return $this->status; return $this->status;
} }
public function setStatus(int $status) /* : void */ public function setStatus(int $status) : void
{ {
$this->status = $status; $this->status = $status;
} }
@ -121,7 +121,7 @@ class QAQuestion implements \JsonSerializable
return $this->category; return $this->category;
} }
public function setCategory(int $category) /* : void */ public function setCategory(int $category) : void
{ {
$this->category = $category; $this->category = $category;
} }
@ -131,7 +131,7 @@ class QAQuestion implements \JsonSerializable
return $this->createdBy; return $this->createdBy;
} }
public function setCreatedBy(int $id) /* : void */ public function setCreatedBy(int $id) : void
{ {
$this->createdBy = $id; $this->createdBy = $id;
} }
@ -146,7 +146,7 @@ class QAQuestion implements \JsonSerializable
return $this->badges; return $this->badges;
} }
public function addBadge($badge) /* : void */ public function addBadge($badge) : void
{ {
$this->badges[] = $badge; $this->badges[] = $badge;
} }
@ -156,7 +156,7 @@ class QAQuestion implements \JsonSerializable
return $this->answers; return $this->answers;
} }
public function addAnswer($answer) /* : void */ public function addAnswer($answer) : void
{ {
$this->answers[] = $answer; $this->answers[] = $answer;
} }