Passed
Push — main ( bb1b57...8a5486 )
by Roman
04:07 queued 01:58
created

CardWidget::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 0
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 2
rs 10
1
<?php
2
3
namespace KielD01\LaravelMaterialDashboardPro\View\Components\Widgets;
4
5
use KielD01\LaravelMaterialDashboardPro\Providers\CoreServiceProvider;
6
7
class CardWidget extends Component
8
{
9
10
    protected static string $name = 'card-widget';
11
12
    public function __construct(public string $title, public string $description)
13
    {
14
    }
15
16
    /**
17
     * @inheritDoc
18
     */
19
    public function render(): string
20
    {
21
        return view(
22
            sprintf(
23
                '%s::%s',
24
                CoreServiceProvider::VIEWS_NAMESPACE,
25
                'elements.widgets.simple-card'
26
            )
27
        )
28
            ->render();
29
    }
30
}