Skip to content

Commit

Permalink
Remove unused code, fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
samdark committed Jan 11, 2021
1 parent 7d58e58 commit a274952
Showing 1 changed file with 6 additions and 50 deletions.
56 changes: 6 additions & 50 deletions src/Toast.php
Expand Up @@ -51,10 +51,6 @@ final class Toast extends Widget
* @var string The title content in the toast.
*/
private string $title = '';
/**
* @var string The footer content in the toast.
*/
private string $footer = '';
/**
* @var string The date time the toast message references to.
* This will be formatted as relative time (via formatter component). It will be omitted if
Expand Down Expand Up @@ -111,12 +107,6 @@ final class Toast extends Widget
* @var array options
*/
private array $options = [];
/**
* @var array footer options
*
* @see Html::renderTagAttributes() for details on how attributes are being rendered.
*/
private array $footerOptions = [];

public function begin(): ?string
{
Expand Down Expand Up @@ -144,9 +134,9 @@ protected function run(): string
/**
* Renders the header HTML markup of the toast.
*
* @return string the rendering result
* @throws JsonException
*
* @return string the rendering result
*/
private function renderHeader(): string
{
Expand All @@ -169,9 +159,9 @@ private function renderHeader(): string
/**
* Renders the opening tag of the toast body.
*
* @return string the rendering result
* @throws JsonException
*
* @return string the rendering result
*/
private function renderBodyBegin(): string
{
Expand All @@ -192,9 +182,9 @@ private function renderBodyEnd(): string
/**
* Renders the close button.
*
* @return string the rendering result
* @throws JsonException
*
* @return string the rendering result
*/
private function renderCloseButton(): ?string
{
Expand Down Expand Up @@ -235,13 +225,9 @@ private function initOptions(): void
}

/**
* Body options.
*
* {@see Html::renderTagAttributes()} for details on how attributes are being rendered.
*
* @param array $value
*
* @return $this
* @param array $value Body options.
*/
public function bodyOptions(array $value): self
{
Expand Down Expand Up @@ -305,36 +291,6 @@ public function dateTimeOptions(array $value): self
return $this;
}

/**
* The footer content in the toast window.
*
* @param string|null $value
*
* @return $this
*/
public function footer(?string $value): self
{
$this->footer = $value;

return $this;
}

/**
* Additional footer options.
*
* @param array $value
*
* @return $this
*
* {@see Html::renderTagAttributes()} for details on how attributes are being rendered.
*/
public function footerOptions(array $value): self
{
$this->footerOptions = $value;

return $this;
}

/**
* Additional header options.
*
Expand Down Expand Up @@ -369,11 +325,11 @@ public function options(array $value): self
/**
* The title content in the toast window.
*
* @param string|null $value
* @param string $value
*
* @return $this
*/
public function title(?string $value): self
public function title(string $value): self
{
$this->title = $value;

Expand Down

0 comments on commit a274952

Please sign in to comment.