Completed
Push — develop ( 61ee3a...f2bd12 )
by Seth
08:02
created

Transform::setEnabled()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace smtech\CanvasICSSync\SyncIntoCanvas\Transform;
4
5
use smtech\CanvasICSSync\SyncIntoCanvas\Event;
6
7
abstract class Transform
8
{
9
    /**
10
     * Is this transformation enabled?
11
     *
12
     * @var [type]
13
     */
14
    protected $enabled;
15
16
    /**
17
     * Set whether or not this transformation is enabled
18
     *
19
     * @param boolean $enabled
20
     */
21
    public function setEnabled($enabled)
22
    {
23
        $this->enabled = (boolean) $enabled;
24
    }
25
26
    /**
27
     * Is this transformation enabled?
28
     *
29
     * @return boolean
30
     */
31
    public function isEnabled()
32
    {
33
        return $this->enabled;
34
    }
35
36
    /**
37
     * Transform the event
38
     *
39
     * @param  Event $event
40
     * @return Event The transformed event
41
     */
42
    abstract public function transform(Event &$event);
0 ignored issues
show
Coding Style Best Practice introduced by
Please use __construct() instead of a PHP4-style constructor that is named after the class.
Loading history...
43
}
44