getExampleProperties()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
/*
5
 * Copyright (C)
6
 * Nathan Boiron <[email protected]>
7
 * Romain Canon <[email protected]>
8
 *
9
 * This file is part of the TYPO3 NotiZ project.
10
 * It is free software; you can redistribute it and/or modify it
11
 * under the terms of the GNU General Public License, either
12
 * version 3 of the License, or any later version.
13
 *
14
 * For the full copyright and license information, see:
15
 * http://www.gnu.org/licenses/gpl-3.0.html
16
 */
17
18
namespace CuyZ\Notiz\Domain\Event\Scheduler;
19
20
use TYPO3\CMS\Scheduler\Task\AbstractTask;
0 ignored issues
show
Bug introduced by
The type TYPO3\CMS\Scheduler\Task\AbstractTask was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
21
22
/**
23
 * Event triggered when a task from the scheduler was executed.
24
 */
25
class SchedulerTaskWasExecutedEvent extends SchedulerTaskEvent
26
{
27
    /**
28
     * @label Event/Scheduler:task.execution_done.marker.result
29
     * @marker
30
     *
31
     * @var bool
32
     */
33
    protected $result;
34
35
    /**
36
     * @param AbstractTask $task
37
     * @param bool $result
38
     */
39
    public function run(AbstractTask $task, bool $result)
40
    {
41
        $this->checkTaskFilter($task);
42
        $this->fillTaskData($task);
43
44
        $this->result = $result;
45
    }
46
47
    /**
48
     * @return array
49
     */
50
    public function getExampleProperties(): array
51
    {
52
        return parent::getExampleProperties() +
53
            [
54
                'result' => true,
55
            ];
56
    }
57
}
58