NameableTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setName() 0 5 1
A getName() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace DiscordWebhook\Embed\Traits;
5
6
/**
7
 * Trait NamableTrait
8
 *
9
 * @package DiscordWebhook\Embed\Traits
10
 * @author Scrummer <[email protected]>
11
 */
12
trait NameableTrait
13
{
14
    /**
15
     * @var string|null
16
     */
17
    private $name;
18
19
    /**
20
     * @return string|null
21
     */
22
    public function getName(): ?string
23
    {
24
        return $this->name;
25
    }
26
27
    /**
28
     * @param string|null $name
29
     *
30
     * @return self
31
     */
32
    public function setName(?string $name): self
33
    {
34
        $this->name = $name;
35
36
        return $this;
37
    }
38
}
39