Completed
Push — master ( 01982b...3c7394 )
by ANTHONIUS
11s
created

InstallEvent::setDryRun()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the dotfiles project.
7
 *
8
 *     (c) Anthonius Munthi <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Dotfiles\Core\Event;
15
16
class InstallEvent extends AbstractEvent
17
{
18
    public const NAME = 'dotfiles.install';
19
20
    /**
21
     * @var array
22
     */
23
    private $patches = array();
24
25
    public function addPatch($target, $patch): void
26
    {
27
        if (!isset($this->patches[$target])) {
28
            $this->patches[$target] = array();
29
        }
30
        $this->patches[$target][] = $patch;
31
    }
32
33
    /**
34
     * @return array
35
     */
36
    public function getPatches(): array
37
    {
38
        return $this->patches;
39
    }
40
}
41