ArraySerializer::getReverseRepresentation()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 1
ccs 0
cts 0
cp 0
nc 1
1
<?php
2
namespace einfach\representer\serializer;
3
4
/**
5
 * Class ArraySerializer
6
 *
7
 * @package einfach\representer\serializer
8
 *
9
 */
10
trait ArraySerializer
11
{
12 6
    public function toArray()
13
    {
14 6
        return $this->getRepresentation();
15
    }
16
17 3
    public function fromArray($array)
18
    {
19 3
        return $this->getReverseRepresentation($array);
20
    }
21
22
    protected abstract function getRepresentation();
23
24
    protected abstract function getReverseRepresentation($projection);
25
}
26