Skip to content

Commit

Permalink
Remove superfluous trait CaptionDisabled and its uses
Browse files Browse the repository at this point in the history
  • Loading branch information
sukhwinder33445 committed Dec 6, 2024
1 parent 9b2ac79 commit 2a6cf0e
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 65 deletions.
31 changes: 0 additions & 31 deletions library/Icingadb/Common/CaptionDisabled.php

This file was deleted.

6 changes: 1 addition & 5 deletions library/Icingadb/Common/ListItemCommonLayout.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

trait ListItemCommonLayout
{
use CaptionDisabled;

protected function assembleHeader(BaseHtmlElement $header): void
{
$header->addHtml($this->createTitle());
Expand All @@ -19,8 +17,6 @@ protected function assembleHeader(BaseHtmlElement $header): void
protected function assembleMain(BaseHtmlElement $main): void
{
$main->addHtml($this->createHeader());
if (!$this->isCaptionDisabled()) {
$main->addHtml($this->createCaption());
}
$main->addHtml($this->createCaption());
}
}
6 changes: 1 addition & 5 deletions library/Icingadb/Common/ListItemMinimalLayout.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,10 @@

trait ListItemMinimalLayout
{
use CaptionDisabled;

protected function assembleHeader(BaseHtmlElement $header): void
{
$header->add($this->createTitle());
if (! $this->isCaptionDisabled()) {
$header->add($this->createCaption());
}
$header->add($this->createCaption());
$header->add($this->createTimestamp());
}

Expand Down
1 change: 0 additions & 1 deletion library/Icingadb/Widget/ItemList/CommentList.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Icinga\Module\Icingadb\Widget\ItemList;

use Icinga\Module\Icingadb\Common\CaptionDisabled;
use Icinga\Module\Icingadb\Common\DetailActions;
use Icinga\Module\Icingadb\Common\Links;
use Icinga\Module\Icingadb\Common\NoSubjectLink;
Expand Down
1 change: 0 additions & 1 deletion library/Icingadb/Widget/ItemList/DowntimeList.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Icinga\Module\Icingadb\Widget\ItemList;

use Icinga\Module\Icingadb\Common\CaptionDisabled;
use Icinga\Module\Icingadb\Common\DetailActions;
use Icinga\Module\Icingadb\Common\Links;
use Icinga\Module\Icingadb\Common\NoSubjectLink;
Expand Down
2 changes: 0 additions & 2 deletions library/Icingadb/Widget/ItemList/HistoryList.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Icinga\Module\Icingadb\Widget\ItemList;

use Icinga\Module\Icingadb\Common\CaptionDisabled;
use Icinga\Module\Icingadb\Common\DetailActions;
use Icinga\Module\Icingadb\Common\LoadMore;
use Icinga\Module\Icingadb\Common\NoSubjectLink;
Expand All @@ -16,7 +15,6 @@

class HistoryList extends BaseItemList
{
use CaptionDisabled;
use NoSubjectLink;
use ViewMode;
use LoadMore;
Expand Down
9 changes: 0 additions & 9 deletions library/Icingadb/Widget/ItemList/HistoryListItemMinimal.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,6 @@ class HistoryListItemMinimal extends BaseHistoryListItem
{
use ListItemMinimalLayout;

protected function init(): void
{
parent::init();

if ($this->list->isCaptionDisabled()) {
$this->setCaptionDisabled();
}
}

protected function getStateBallSize(): string
{
return StateBall::SIZE_BIG;
Expand Down
2 changes: 0 additions & 2 deletions library/Icingadb/Widget/ItemList/NotificationList.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Icinga\Module\Icingadb\Widget\ItemList;

use Icinga\Module\Icingadb\Common\CaptionDisabled;
use Icinga\Module\Icingadb\Common\DetailActions;
use Icinga\Module\Icingadb\Common\LoadMore;
use Icinga\Module\Icingadb\Common\NoSubjectLink;
Expand All @@ -15,7 +14,6 @@

class NotificationList extends BaseItemList
{
use CaptionDisabled;
use NoSubjectLink;
use ViewMode;
use LoadMore;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,6 @@ class NotificationListItemMinimal extends BaseNotificationListItem
{
use ListItemMinimalLayout;

protected function init(): void
{
parent::init();

if ($this->list->isCaptionDisabled()) {
$this->setCaptionDisabled();
}
}

protected function getStateBallSize(): string
{
return StateBall::SIZE_BIG;
Expand Down

0 comments on commit 2a6cf0e

Please sign in to comment.