News   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getMutations() 0 4 1
1
<?php
2
3
namespace Blackmine\Model;
4
5
use Blackmine\Model\Project\Project;
6
use Blackmine\Model\User\User;
7
use Blackmine\Mutator\MutableInterface;
8
use Blackmine\Mutator\Mutation\RemoveKeyMutation;
9
use Carbon\CarbonImmutable;
10
11
/**
12
 * @method void setTitle(string $title)
13
 * @method void setSummary(string $summary)
14
 * @method void setDescription(string $description)
15
 * @method void setProject(Project $project)
16
 * @method void setAuthor(User $author)
17
 *
18
 * @method string getTitle()
19
 * @method string getSummary()
20
 * @method string getDescription()
21
 * @method Project getProject()
22
 * @method User getAuthor()
23
 * @method CarbonImmutable getCreatedOn()
24
 */
25
class News extends Identity implements FetchableInterface, MutableInterface
26
{
27
    public const ENTITY_NAME = "news";
28
29
    protected string $title;
30
    protected ?string $summary;
31
    protected string $description;
32
33
    protected Project $project;
34
    protected User $author;
35
36
    protected CarbonImmutable $created_on;
37
38
    public function getMutations(): array
39
    {
40
        return [
41
            "created_on" => [RemoveKeyMutation::class => []]
42
        ];
43
    }
44
}
45