Passed
Push — master ( 4a2070...aab48a )
by Evgenii
01:11
created

ExampleBlock   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A fields() 0 6 1
1
<?php
2
3
use Carbon_Fields\Field;
4
use Helick\Blocks\Block;
5
6
final class ExampleBlock extends Block
7
{
8
    /**
9
     * The block's display name.
10
     *
11
     * @var string
12
     */
13
    protected $name = 'Example';
14
15
    /**
16
     * The block's description.
17
     *
18
     * @var string
19
     */
20
    protected $description = 'This is an example block';
21
22
    /**
23
     * The block's template.
24
     *
25
     * @var string|string[]
26
     */
27
    protected $template = 'partials/blocks/example.php';
28
29
    /**
30
     * Fields to be attached to the block.
31
     *
32
     * @return array
33
     */
34
    public function fields(): array
35
    {
36
        return [
37
            Field::make('text', 'heading', 'Heading'),
38
            Field::make('image', 'image', 'Image'),
39
            Field::make('rich_text', 'content', 'Content'),
40
        ];
41
    }
42
}
43