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

Transform   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 37
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setEnabled() 0 4 1
A isEnabled() 0 4 1
transform() 0 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