DetectedNewFiles   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 53
ccs 11
cts 11
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getStorage() 0 4 1
A getFile() 0 4 1
A getName() 0 4 1
1
<?php
2
/**
3
 * AnimeDb package.
4
 *
5
 * @author    Peter Gribanov <[email protected]>
6
 * @copyright Copyright (c) 2011, Peter Gribanov
7
 * @license   http://opensource.org/licenses/GPL-3.0 GPL v3
8
 */
9
10
namespace AnimeDb\Bundle\CatalogBundle\Event\Storage;
11
12
use Symfony\Component\EventDispatcher\Event;
13
use AnimeDb\Bundle\CatalogBundle\Entity\Storage;
14
use Symfony\Component\Finder\SplFileInfo;
15
16
/**
17
 * Event thrown when a new item files is detected.
18
 *
19
 * @author  Peter Gribanov <[email protected]>
20
 */
21
class DetectedNewFiles extends Event
22
{
23
    /**
24
     * @var Storage
25
     */
26
    protected $storage;
27
28
    /**
29
     * @var SplFileInfo
30
     */
31
    protected $file;
32
33
    /**
34
     * @var string
35
     */
36
    protected $name;
37
38
    /**
39
     * @param Storage $storage
40
     * @param SplFileInfo $file
41
     * @param string $name
42
     */
43 3
    public function __construct(Storage $storage, SplFileInfo $file, $name)
44
    {
45 3
        $this->storage = $storage;
46 3
        $this->file = $file;
47 3
        $this->name = $name;
48 3
    }
49
50
    /**
51
     * @return Storage
52
     */
53 1
    public function getStorage()
54
    {
55 1
        return $this->storage;
56
    }
57
58
    /**
59
     * @return SplFileInfo
60
     */
61 1
    public function getFile()
62
    {
63 1
        return $this->file;
64
    }
65
66
    /**
67
     * @return string
68
     */
69 1
    public function getName()
70
    {
71 1
        return $this->name;
72
    }
73
}
74