Completed
Pull Request — master (#10)
by alexfloppy
07:51
created

Schema   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 24
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getResourceType() 0 4 1
1
<?php
2
3
namespace App\JsonApi\Users;
4
5
use CloudCreativity\LaravelJsonApi\Schema\EloquentSchema;
6
7
class Schema extends EloquentSchema
8
{
9
    /**
10
     * @var string
11
     */
12
    const RESOURCE_TYPE = 'users';
13
14
    /**
15
     * @var array
16
     */
17
    protected $attributes = [
18
        'name',
19
        'email',
20
        'role',
21
    ];
22
23
    /**
24
     * @return string
25
     */
26
    public function getResourceType()
27
    {
28
        return self::RESOURCE_TYPE;
29
    }
30
}
31