Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
80.00% |
4 / 5 |
|
75.00% |
3 / 4 |
CRAP | |
0.00% |
0 / 1 |
| ClassPropertyRemovedEvent | |
80.00% |
4 / 5 |
|
75.00% |
3 / 4 |
4.13 | |
0.00% |
0 / 1 |
| __construct | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getName | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getClass | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getPropertyName | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 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 | |
| 21 | declare(strict_types=1); |
| 22 | |
| 23 | namespace oat\tao\model\event; |
| 24 | |
| 25 | use core_kernel_classes_Class; |
| 26 | use oat\oatbox\event\Event; |
| 27 | |
| 28 | class ClassPropertyRemovedEvent implements Event |
| 29 | { |
| 30 | /** @var core_kernel_classes_Class */ |
| 31 | private $class; |
| 32 | |
| 33 | /** @var string */ |
| 34 | private $propertyName; |
| 35 | |
| 36 | public function __construct(core_kernel_classes_Class $class, string $propertyName) |
| 37 | { |
| 38 | $this->class = $class; |
| 39 | $this->propertyName = $propertyName; |
| 40 | } |
| 41 | |
| 42 | public function getName(): string |
| 43 | { |
| 44 | return self::class; |
| 45 | } |
| 46 | |
| 47 | public function getClass(): core_kernel_classes_Class |
| 48 | { |
| 49 | return $this->class; |
| 50 | } |
| 51 | |
| 52 | public function getPropertyName(): string |
| 53 | { |
| 54 | return $this->propertyName; |
| 55 | } |
| 56 | } |