GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Notify::notify()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 2
eloc 3
nc 2
nop 0
1
<?php
2
3
namespace UCD\Unicode\Character\Repository\Capability;
4
5
trait Notify
6
{
7
    /**
8
     * @var \SplObjectStorage|\SplObserver[]
9
     */
10
    private $observers;
11
12
    /**
13
     * @param \SplObserver $observer
14
     */
15
    public function attach(\SplObserver $observer)
16
    {
17
        $this->getObservers()
18
            ->attach($observer);
19
    }
20
21
    /**
22
     * @param \SplObserver $observer
23
     */
24
    public function detach(\SplObserver $observer)
25
    {
26
        $this->getObservers()
27
            ->detach($observer);
28
    }
29
30
    /**
31
     * Classes using this trait must remember to implement \SplSubject!
32
     */
33
    public function notify()
34
    {
35
        foreach ($this->getObservers() as $observer) {
36
            $observer->update($this);
37
        }
38
    }
39
40
    /**
41
     * @return \SplObjectStorage|\SplObserver[]
42
     */
43
    private function getObservers()
44
    {
45
        if (!isset($this->observers)) {
46
            $this->observers = new \SplObjectStorage();
47
        }
48
49
        return $this->observers;
50
    }
51
}