Completed
Push — master ( 3de66b...11beb8 )
by Rafał
08:38
created

MetaEvent::setResult()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of the Superdesk Web Publisher Templates System.
5
 *
6
 * Copyright 2019 Sourcefabric z.ú. and contributors.
7
 *
8
 * For the full copyright and license information, please see the
9
 * AUTHORS and LICENSE files distributed with this source code.
10
 *
11
 * @copyright 2019 Sourcefabric z.ú
12
 * @license http://www.superdesk.org/license
13
 */
14
15
namespace SWP\Component\TemplatesSystem\Gimme\Event;
16
17
use Symfony\Component\EventDispatcher\Event;
18
19
final class MetaEvent extends Event
0 ignored issues
show
Deprecated Code introduced by
The class Symfony\Component\EventDispatcher\Event has been deprecated with message: since Symfony 4.3, use "Symfony\Contracts\EventDispatcher\Event" instead

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
20
{
21
    private $isResultSet = false;
22
23
    private $result;
24
25
    private $data;
26
27
    private $propertyName;
28
29
    public function __construct($data, string $propertyName)
30
    {
31
        $this->data = $data;
32
        $this->propertyName = $propertyName;
33
    }
34
35
    public function getData()
36
    {
37
        return $this->data;
38
    }
39
40
    public function getPropertyName(): string
41
    {
42
        return $this->propertyName;
43
    }
44
45
    public function isResultSet(): bool
46
    {
47
        return $this->isResultSet;
48
    }
49
50
    public function setResult($result): void
51
    {
52
        $this->isResultSet = true;
53
        $this->result = $result;
54
    }
55
56
    public function getResult()
57
    {
58
        return $this->result;
59
    }
60
}
61