Passed
Push — 1.11.x ( 5ac02c...b5fc1e )
by Julito
12:15
created

HookDocumentAction::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
/* For licensing terms, see /license.txt */
4
5
class HookDocumentAction extends HookEvent implements HookDocumentActionEventInterface
6
{
7
    protected function __construct()
8
    {
9
        parent::__construct('HookDocumentAction');
10
    }
11
12
    /**
13
     * Update all the observers.
14
     *
15
     * @param int $type
16
     *
17
     * @return array
18
     */
19
    public function notifyDocumentAction($type)
20
    {
21
        $this->eventData['type'] = $type;
22
23
        /** @var HookDocumentActionEventInterface $observer */
24
        foreach ($this->observers as $observer) {
25
            $data = $observer->notifyDocumentAction($this);
26
            $this->setEventData($data);
27
        }
28
29
        return $this->eventData;
30
    }
31
}
32