CardWidget::render()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 6
nc 1
nop 0
dl 0
loc 10
rs 10
c 2
b 0
f 0
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
    protected static ?string $name = 'card-widget';
10
    public string $title;
11
    public string $description;
12
13
    public function __construct($title, $description)
14
    {
15
        $this->title = $title;
16
        $this->description = $description;
17
    }
18
19
    /**
20
     * @inheritDoc
21
     */
22
    public function render(): string
23
    {
24
        return view(
25
            sprintf(
26
                '%s::%s',
27
                CoreServiceProvider::VIEWS_NAMESPACE,
28
                'elements.widgets.simple-card'
29
            )
30
        )
31
            ->render();
32
    }
33
}
34