Completed
Pull Request — master (#4)
by Nate
03:04
created

ObjectConstructorAwareTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 19
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A setObjectConstructor() 0 4 1
1
<?php
2
/*
3
 * Copyright (c) Nate Brunette.
4
 * Distributed under the MIT License (http://opensource.org/licenses/MIT)
5
 */
6
7
namespace Tebru\Gson\Internal;
8
9
/**
10
 * Class ObjectConstructorAwareTrait
11
 *
12
 * @author Nate Brunette <[email protected]>
13
 */
14
trait ObjectConstructorAwareTrait
15
{
16
    /**
17
     * The object constructor instance
18
     *
19
     * @var ObjectConstructor
20
     */
21
    protected $objectConstructor;
22
23
    /**
24
     * Set the object constructor
25
     *
26
     * @param ObjectConstructor $objectConstructor
27
     */
28 3
    public function setObjectConstructor(ObjectConstructor $objectConstructor): void
29
    {
30 3
        $this->objectConstructor = $objectConstructor;
31 3
    }
32
}
33