Passed
Push — master ( 177093...90a55c )
by Gabriel
02:35
created

HasManagerTrait::hasManager()   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
eloc 1
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace ByTIC\Models\SmartProperties\Properties\AbstractProperty\Traits;
4
5
use ByTIC\Common\Records\Traits\I18n\RecordsTrait as RecordsTranslated;
0 ignored issues
show
Bug introduced by
The type ByTIC\Common\Records\Traits\I18n\RecordsTrait was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use ByTIC\Common\Records\Traits\AbstractTrait\RecordsTrait;
0 ignored issues
show
Bug introduced by
The type ByTIC\Common\Records\Tra...tractTrait\RecordsTrait was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
use ByTIC\Common\Records\Traits\HasTypes\RecordsTrait as HasTypesRecords;
0 ignored issues
show
Bug introduced by
The type ByTIC\Common\Records\Traits\HasTypes\RecordsTrait was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
use Nip\Records\RecordManager as Records;
9
10
/**
11
 * Trait HasManagerTrait
12
 * @package ByTIC\Models\SmartProperties\Properties\AbstractProperty\Traits
13
 */
14
trait HasManagerTrait
15
{
16
    /**
17
     * @var null|Records|RecordsTranslated|HasTypesRecords
18
     */
19
    protected $manager;
20
21
22
    /**
23
     * @return Records|RecordsTranslated|HasTypesRecords
24
     */
25
    public function getManager()
26
    {
27
        return $this->manager;
28
    }
29
30
    /**
31
     * @param Records|RecordsTrait $manager
32
     * @return $this
33
     */
34 14
    public function setManager($manager)
35
    {
36 14
        $this->manager = $manager;
37
38 14
        return $this;
39
    }
40
41
    /**
42
     * @return bool
43
     */
44
    public function hasManager()
45
    {
46
        return $this->manager instanceof Records;
47
    }
48
}
49