NovaTextCard   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 21
ccs 7
cts 7
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A jsonSerialize() 0 5 1
A content() 0 5 1
1
<?php
2
3
namespace NovaTextCard;
4
5
use Laravel\Nova\Card;
6
7
class NovaTextCard extends Card
8
{
9
10
    public $component = 'nova-text-card';
11
12
    public $content = '';
13
14 1
    public function content(string $content): static
15
    {
16 1
        $this->content = $content;
17
18 1
        return $this;
19
    }
20
21
22
23 1
    public function jsonSerialize(): array
24
    {
25 1
        return array_merge([
26 1
            'content' => $this->content,
27 1
        ], parent::jsonSerialize());
28
    }
29
}
30