CompaniesGroupsController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A onConstruct() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Canvas\Api\Controllers;
6
7
use Canvas\Models\CompaniesGroups;
8
use Canvas\Contracts\Controllers\ProcessOutputMapperTrait;
9
use Canvas\Dto\CompaniesGroups as CompaniesGroupsDto;
10
use Canvas\Mapper\CompaniesGroupsMapper;
11
12
/**
13
 * Class CompaniesGroupsController.
14
 *
15
 * @package Canvas\Api\Controllers
16
 *
17
 * @property Users $userData
18
 * @property Request $request
19
 * @property Config $config
20
 * @property Apps $app
21
 */
22
class CompaniesGroupsController extends BaseController
23
{
24
    use ProcessOutputMapperTrait;
25
    /*
26
     * fields we accept to create
27
     *
28
     * @var array
29
     */
30
    protected $createFields = [];
31
32
    /*
33
     * fields we accept to create
34
     *
35
     * @var array
36
     */
37
    protected $updateFields = [];
38
39
    /**
40
     * set objects.
41
     *
42
     * @return void
43
     */
44
    public function onConstruct()
45
    {
46
        $this->model = new CompaniesGroups();
0 ignored issues
show
Bug Best Practice introduced by
The property model does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
47
        $this->dto = CompaniesGroupsDto::class;
48
        $this->dtoMapper = new CompaniesGroupsMapper();
49
    }
50
}
51