Passed
Push — 1.11.x ( cb5789...9ce60a )
by Angel Fernando Quiroz
11:39
created

HookDocumentItemView   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 25
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A notifyDocumentItemView() 0 10 2
A __construct() 0 3 1
1
<?php
2
3
/* For licensing terms, see /license.txt */
4
5
/**
6
 * Class HookDocumentItemView.
7
 */
8
class HookDocumentItemView extends HookEvent implements HookDocumentItemViewEventInterface
9
{
10
    /**
11
     * HookDocumentItemView constructor.
12
     *
13
     * @throws Exception
14
     */
15
    protected function __construct()
16
    {
17
        parent::__construct('HookDocumentItemView');
18
    }
19
20
    /**
21
     * @inheritDoc
22
     */
23
    public function notifyDocumentItemView(): array
24
    {
25
        $tools = [];
26
27
        /** @var HookDocumentItemViewObserverInterface $observer */
28
        foreach ($this->observers as $observer) {
29
            $tools[] = $observer->notifyDocumentItemView($this);
30
        }
31
32
        return $tools;
33
    }
34
}
35