Passed
Push — master ( 1ffd02...b93f0b )
by Bertrand
06:21
created

WikiUserRole   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A toArray() 0 4 1
A __construct() 0 3 1
1
<?php
2
3
4
namespace App\Src\UseCases\Domain\Users\Dto;
5
6
7
use Illuminate\Contracts\Support\Arrayable;
8
9
class WikiUserRole implements Role, Arrayable
10
{
11
    public $role;
12
13
    public function __construct(string $role)
14
    {
15
        $this->role = $role;
16
    }
17
18
    public function toArray()
19
    {
20
        return [
21
            'role' => $this->role
22
        ];
23
    }
24
}
25