Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
44.44% covered (danger)
44.44%
4 / 9
16.67% covered (danger)
16.67%
1 / 6
CRAP
0.00% covered (danger)
0.00%
0 / 1
DeliveryExecutionTimerAdjusted
44.44% covered (danger)
44.44%
4 / 9
16.67% covered (danger)
16.67%
1 / 6
12.17
0.00% covered (danger)
0.00%
0 / 1
 __construct
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
1 / 1
1
 getName
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getDeliveryExecution
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getReason
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getProctor
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getSeconds
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3/**
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; under version 2
7 * of the License (non-upgradable).
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
17 *
18 * Copyright (c) 2020  (original work) Open Assessment Technologies SA;
19 */
20
21declare(strict_types=1);
22
23namespace oat\taoProctoring\model\event;
24
25use oat\oatbox\event\Event;
26use oat\oatbox\user\User;
27use oat\taoDelivery\model\execution\DeliveryExecution;
28
29class DeliveryExecutionTimerAdjusted implements Event
30{
31    /**
32     * @var DeliveryExecution
33     */
34    private $deliveryExecution;
35
36    /**
37     * @var User
38     */
39    private $proctor;
40
41    /**
42     * @var mixed
43     */
44    private $reason;
45
46    /**
47     * @var int
48     */
49    private $seconds;
50
51    /**
52     * DeliveryExecutionTimerAdjusted constructor.
53     * @param DeliveryExecution $deliveryExecution
54     * @param User $proctor
55     * @param int $seconds
56     * @param null $reason
57     */
58    public function __construct(DeliveryExecution $deliveryExecution, User $proctor, int $seconds, $reason = null)
59    {
60        $this->deliveryExecution = $deliveryExecution;
61        $this->proctor = $proctor;
62        $this->reason = $reason;
63        $this->seconds = $seconds;
64    }
65
66    /**
67     * @return string
68     */
69    public function getName(): string
70    {
71        return __CLASS__;
72    }
73
74    /**
75     * Returns the delivery execution
76     *
77     * @return DeliveryExecution
78     */
79    public function getDeliveryExecution(): DeliveryExecution
80    {
81        return $this->deliveryExecution;
82    }
83
84    /**
85     * Returns the reason
86     *
87     * @return mixed
88     */
89    public function getReason()
90    {
91        return $this->reason;
92    }
93
94    /**
95     * Returns the proctor
96     */
97    public function getProctor(): User
98    {
99        return $this->proctor;
100    }
101
102    public function getSeconds(): int
103    {
104        return $this->seconds;
105    }
106}