LuaSerializationVisitor   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 8
c 0
b 0
f 0
ccs 0
cts 3
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getResult() 0 3 1
1
<?php
2
3
namespace Vlaswinkel\Lua\JMS;
4
5
use JMS\Serializer\GenericSerializationVisitor;
6
use Vlaswinkel\Lua\Lua;
7
8
/**
9
 * Class LuaSerializationVisitor
10
 *
11
 * @see     https://github.com/schmittjoh/serializer/blob/1.1.0/src/JMS/Serializer/JsonSerializationVisitor.php
12
 *
13
 * @author  Johannes M. Schmitt <[email protected]>
14
 * @author  Koen Vlaswinkel <[email protected]>
15
 * @package Vlaswinkel\Lua\JMS
16
 */
17
class LuaSerializationVisitor extends GenericSerializationVisitor {
18
    /**
19
     * @return object|array
20
     */
21
    public function getResult() {
22
        return Lua::serialize($this->getRoot());
23
    }
24
}