Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| DashboardContents | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| __toString | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | namespace Apie\LaravelApie\Wrappers\Cms; |
| 3 | |
| 4 | use Stringable; |
| 5 | |
| 6 | class DashboardContents implements Stringable |
| 7 | { |
| 8 | /** |
| 9 | * @param array<string, mixed> $templateParameters |
| 10 | */ |
| 11 | public function __construct( |
| 12 | private readonly string $template, |
| 13 | private readonly array $templateParameters |
| 14 | ) { |
| 15 | } |
| 16 | public function __toString(): string |
| 17 | { |
| 18 | return (string) view($this->template, $this->templateParameters); |
| 19 | } |
| 20 | } |