Passed
Pull Request — master (#39)
by Michael
02:36
created

ProsemirrorException::addExtraData()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 2
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace dokuwiki\plugin\prosemirror;
4
5
/**
6
 * Class ProsemirrorException
7
 *
8
 * A translatable exception
9
 *
10
 * @package dokuwiki\plugin\prosemirror
11
 */
12
class ProsemirrorException extends \RuntimeException {
13
    protected $data = [];
14
15
    /**
16
     * @param string $key
17
     * @param mixed $data
18
     */
19
    public function addExtraData($key, $data)
20
    {
21
        $this->data[$key] = $data;
22
    }
23
24
    public function getExtraData()
25
    {
26
        return $this->data;
27
    }
28
}
29