Skip to content

Commit

Permalink
Fixed code style
Browse files Browse the repository at this point in the history
  • Loading branch information
tabuna authored and github-actions[bot] committed Apr 8, 2024
1 parent 3d13199 commit b6adddc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Screen/Cell.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,10 @@ protected function renderComponent(string $component, $value, array $params = []
*
* @param string $component The component to render.
* @param mixed ...$params Optional parameters for the component.
*
* @return $this
*/
public function component(string $component, ...$params): static
public function component(string $component, ...$params): static
{
/** Backward compatibility workaround.
*
Expand Down Expand Up @@ -167,7 +168,6 @@ public function usingComponent(string $component, ...$params): static
return $this->asComponent($component, $params);
}


/**
* @param Repository|Model $source
*
Expand Down
6 changes: 3 additions & 3 deletions src/Screen/Components/Cells/Text.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Text extends Component
*/
public function __construct(
protected mixed $value,
protected ?string $title = null,
protected ?string $title = null,
protected ?string $description = null,
protected ?int $words = 30,
protected ?int $clamp = 5,
Expand All @@ -36,8 +36,8 @@ public function render()
return Blade::render('<div class="text-balance line-clamp {{ $class }}">
@empty(!$title)<strong class="d-block">{{ $title }}</strong>@endempty
<span class="text-muted">{{ $description }}</span></div>', [
'class' => $this->clamp ? 'line-clamp-'.$this->clamp : '',
'title' => $this->title ? Str::of($this->value->getContent($this->title))->words($this->words) : '',
'class' => $this->clamp ? 'line-clamp-'.$this->clamp : '',
'title' => $this->title ? Str::of($this->value->getContent($this->title))->words($this->words) : '',
'description' => Str::of($this->value->getContent($this->description))->words($this->words),
]);
}
Expand Down

0 comments on commit b6adddc

Please sign in to comment.