NameableTrait::setName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
c 0
b 0
f 0
dl 0
loc 5
rs 10
cc 1
nc 1
nop 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