Passed
Push — master ( ac7162...0cc260 )
by Aleksandr
02:52
created

SingletonsTrait::makeGroupModel()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php
2
/**
3
 * This file is part of the eav package.
4
 * @author    Aleksandr Drobotik <[email protected]>
5
 * @copyright 2023 Aleksandr Drobotik
6
 * @license   https://opensource.org/license/mit  The MIT License
7
 */
8
declare(strict_types=1);
9
10
namespace Drobotik\Eav\Trait;
11
12
use Drobotik\Eav\AttributeContainer;
13
use Drobotik\Eav\AttributeSet;
14
use Drobotik\Eav\Factory\EavFactory;
15
use Drobotik\Eav\Model\AttributeGroupModel;
16
use Drobotik\Eav\Model\AttributeSetModel;
17
use Drobotik\Eav\Model\DomainModel;
18
use Drobotik\Eav\Model\EntityModel;
19
use Drobotik\Eav\Value\ValueParser;
20
use Faker\Factory;
21
use Faker\Generator;
22
23
trait SingletonsTrait
24
{
25
    public function makeAttributeSetModel() : AttributeSetModel
26
    {
27
        return new AttributeSetModel;
28
    }
29
30
    public function makeAttributeContainer() : AttributeContainer
31
    {
32
        return new AttributeContainer;
33
    }
34
35
    public function makeEntityModel() : EntityModel
36
    {
37
        return new EntityModel();
38
    }
39
40
    public function makeAttributeSet() : AttributeSet
41
    {
42
        return new AttributeSet();
43
    }
44
45
    public function makeDomainModel() : DomainModel
46
    {
47
        return new DomainModel();
48
    }
49
50
    public function makeGroupModel() : AttributeGroupModel
51
    {
52
        return new AttributeGroupModel();
53
    }
54
55
    public function makeEavFactory(): EavFactory
56
    {
57
        return new EavFactory();
58
    }
59
60
    public function makeValueParser(): ValueParser
61
    {
62
        return new ValueParser();
63
    }
64
65
    public function makeFakerGenerator(): Generator
66
    {
67
        return Factory::create();
68
    }
69
70
}