Code Duplication    Length = 10-10 lines in 2 locations

class/EventHandler.php 2 locations

@@ 56-65 (lines=10) @@
53
     *
54
     * @return bool
55
     */
56
    public function createEvent($data)
57
    {
58
        $event = $this->create();
59
        $this->_checkDate($data);
60
        $this->_userTimeToServerTime($data);
61
        $this->_addRecurValue($data);
62
        $event->setVars($data);
63
64
        return $this->insert($event, true);
65
    }
66
67
    /**
68
     * @param $data
@@ 88-97 (lines=10) @@
85
     *
86
     * @return bool
87
     */
88
    public function modifyEvent($eventId, $data)
89
    {
90
        $event = $this->get($eventId);
91
        $this->_checkDate($data);
92
        $this->_userTimeToServerTime($data);
93
        $this->_addRecurValue($data);
94
        $event->setVars($data);
95
96
        return $this->insert($event);
97
    }
98
99
    /**
100
     * @param $eventId