CardWidget   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 12
dl 0
loc 25
rs 10
c 2
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 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
    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