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

CardWidget   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 22
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 2 1
A render() 0 10 1
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
}