MoveEvent   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 31
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
3
/*
4
 * This file is part of the Icybee package.
5
 *
6
 * (c) Olivier Laviale <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Icybee\Modules\Files\File;
13
14
use ICanBoogie\Event;
15
16
use Icybee\Modules\Files\File;
17
18
/**
19
 * Event class for the `Icybee\Modules\Files\File::move` event.
20
 */
21
class MoveEvent extends Event
22
{
23
	/**
24
	 * Previous path.
25
	 *
26
	 * @var string
27
	 */
28
	public $from;
29
30
	/**
31
	 * New path.
32
	 *
33
	 * @var string
34
	 */
35
	public $to;
36
37
	/**
38
	 * The event is constructed with the type `move`.
39
	 *
40
	 * @param File $target
41
	 * @param string $from Previous path.
42
	 * @param string $to New path.
43
	 */
44
	public function __construct(File $target, $from, $to)
45
	{
46
		$this->from = $from;
47
		$this->to = $to;
48
49
		parent::__construct($target, 'move');
50
	}
51
}
52