StyledImagesEvent::getImage()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * This file is part of the IrishDan\ResponsiveImageBundle package.
4
 *
5
 * (c) Daniel Byrne <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE file that was distributed with this source
8
 * code.
9
 */
10
11
namespace IrishDan\ResponsiveImageBundle\Event;
12
13
use IrishDan\ResponsiveImageBundle\ResponsiveImageInterface;
14
use Symfony\Component\EventDispatcher\Event;
15
16
/**
17
 * Class StyledImagesEvent
18
 *
19
 * @package IrishDan\ResponsiveImageBundle\Event
20
 */
21
class StyledImagesEvent extends Event
22
{
23
    /**
24
     * @var ResponsiveImageInterface
25
     */
26
    protected $image;
27
    /**
28
     * @var array
29
     */
30
    protected $styleImageLocationArray = [];
31
32
    /**
33
     * StyledImagesEvent constructor.
34
     *
35
     * @param ResponsiveImageInterface|null $image
36
     * @param array                         $styleImageLocationArray
37
     */
38
    public function __construct(ResponsiveImageInterface $image = null, array $styleImageLocationArray = [])
39
    {
40
        $this->image                   = $image;
41
        $this->styleImageLocationArray = $styleImageLocationArray;
42
    }
43
44
    /**
45
     * @return array
46
     */
47
    public function getStyleImageLocationArray()
48
    {
49
        return $this->styleImageLocationArray;
50
    }
51
52
    /**
53
     * @return ResponsiveImageInterface|null
54
     */
55
    public function getImage()
56
    {
57
        return $this->image;
58
    }
59
}