Failed Conditions
Pull Request — master (#1)
by Jonathan
13:22 queued 10:46
created

LoadClassMetadataEventArgs::getClassMetadata()   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
dl 0
loc 3
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
crap 2
1
<?php
2
namespace Doctrine\Common\Persistence\Event;
3
4
use Doctrine\Common\EventArgs;
0 ignored issues
show
Bug introduced by
The type Doctrine\Common\EventArgs 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...
5
use Doctrine\Common\Persistence\Mapping\ClassMetadata;
6
use Doctrine\Common\Persistence\ObjectManager;
7
8
/**
9
 * Class that holds event arguments for a loadMetadata event.
10
 *
11
 * @author Jonathan H. Wage <[email protected]>
12
 * @since  2.2
13
 */
14
class LoadClassMetadataEventArgs extends EventArgs
15
{
16
    /**
17
     * @var ClassMetadata
18
     */
19
    private $classMetadata;
20
21
    /**
22
     * @var ObjectManager
23
     */
24
    private $objectManager;
25
26
    /**
27
     * Constructor.
28
     *
29
     * @param ClassMetadata $classMetadata
30
     * @param ObjectManager $objectManager
31
     */
32
    public function __construct(ClassMetadata $classMetadata, ObjectManager $objectManager)
33
    {
34
        $this->classMetadata = $classMetadata;
35
        $this->objectManager = $objectManager;
36
    }
37
38
    /**
39
     * Retrieves the associated ClassMetadata.
40
     *
41
     * @return ClassMetadata
42
     */
43
    public function getClassMetadata()
44
    {
45
        return $this->classMetadata;
46
    }
47
48
    /**
49
     * Retrieves the associated ObjectManager.
50
     *
51
     * @return ObjectManager
52
     */
53
    public function getObjectManager()
54
    {
55
        return $this->objectManager;
56
    }
57
}
58