Passed
Pull Request — master (#60)
by Michael
02:37
created

SmileyNode::toSyntax()   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 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace dokuwiki\plugin\prosemirror\parser;
4
5
6
class SmileyNode extends Node
7
{
8
9
    protected $parent;
10
    protected $data;
11
12
    public function __construct($data, $parent)
13
    {
14
        $this->parent = &$parent;
15
        $this->data = $data;
16
    }
17
18
    /**
19
     * Get the node's representation as DokuWiki Syntax
20
     *
21
     * @return string
22
     */
23
    public function toSyntax()
24
    {
25
        return $this->data['attrs']['syntax'];
26
    }
27
}
28