Passed
Push — release/v1 ( cc1231...b6ec48 )
by Jérémy
02:55
created

Subject   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 5
dl 0
loc 17
ccs 7
cts 7
cp 1
rs 10
c 1
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getDataModelType() 0 3 1
A __construct() 0 3 1
A getDataModel() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Thunder micro CLI framework.
7
 * (c) Jérémy Marodon <[email protected]>
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace RxThunder\Core;
13
14
use RxThunder\Core\Model\DataModel;
15
16
class Subject extends \Rx\Subject\Subject
17
{
18
    protected DataModel $data_model;
19
20 1
    public function __construct(DataModel $data_model)
21
    {
22 1
        $this->data_model = $data_model;
23 1
    }
24
25 1
    public function getDataModel(): DataModel
26
    {
27 1
        return $this->data_model;
28
    }
29
30 1
    public function getDataModelType(): string
31
    {
32 1
        return $this->data_model->getType();
33
    }
34
}
35