Permalink
Browse files

Strict function declarations defined by webtrees abstracttheme.

  • Loading branch information...
JustCarmen committed Sep 9, 2018
1 parent 6c68b69 commit 0054c722da3306f22ac7e78514dab2775614a0b3
Showing with 7 additions and 7 deletions.
  1. +2 −2 app/Theme/JustBaseTheme.php
  2. +5 −5 app/Theme/JustBlackTheme.php
@@ -92,7 +92,7 @@ public function getThemeGlobalClass() {
*
* @return string
*/
public function individualBox(Individual $individual) {
public function individualBox(Individual $individual): string {
$personBoxClass = array_search($individual->getSex(), ['person_box' => 'M', 'person_boxF' => 'F', 'person_boxNN' => 'U']);
if ($individual->canShow() && $individual->getTree()->getPreference('SHOW_HIGHLIGHT_IMAGES')) {
$thumbnail = $individual->displayImage(40, 50, 'crop', []);
@@ -131,7 +131,7 @@ public function individualBox(Individual $individual) {
}
/** {@inheritdoc} */
public function logoPoweredBy() {
public function logoPoweredBy():string {
return '<a href="' . WT_WEBTREES_URL . '" class="wt-powered-by-webtrees" title="' . WT_WEBTREES_URL . '" dir="ltr"></a>';
}
@@ -90,7 +90,7 @@ public function formatTreeTitle() {
}
/** {@inheritdoc} */
protected function headerContent() {
protected function headerContent():string {
return
$this->accessibilityLinks() .
'<div class="d-flex col-12 order-2">' .
@@ -103,7 +103,7 @@ protected function headerContent() {
}
/** {@inheritdoc} */
public function hookHeaderExtraContent() {
public function hookHeaderExtraContent():string {
$html = '';
if ($this->themeOption('css')) {
$html .= '<link rel="stylesheet" type="text/css" href="' . $this->themeOption('css') . '">';
@@ -137,7 +137,7 @@ public function parameter($parameter_name) {
}
/** (@inheritdoc) */
public function secondaryMenu() {
public function secondaryMenu():array {
return array_filter([
$this->menuPendingChanges(),
$this->menuMyPages(),
@@ -160,15 +160,15 @@ protected function setFluidClass() {
}
/** @inheritdoc} */
public function stylesheets() {
public function stylesheets():array {
return array_merge(
parent::stylesheets(),
[self::STYLESHEET]
);
}
/** {@inheritdoc} */
public function themeName() {
public function themeName():string {
return /* I18N: Name of a theme. */ I18N::translate(self::THEME_NAME);
}
}

0 comments on commit 0054c72

Please sign in to comment.