Completed
Push — master ( abc908...ccbe0b )
by Oscar
02:09
created

SerializeRepository   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
lcom 0
cbo 1
dl 0
loc 20
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A stringify() 0 4 1
A parse() 0 4 1
1
<?php
2
3
namespace FlyCrud;
4
5
class SerializeRepository extends Repository
6
{
7
    protected $extension = 'txt';
8
9
    /**
10
     * {@inheritdoc}
11
     */
12
    protected function stringify(array $data)
13
    {
14
        return serialize($data);
15
    }
16
17
    /**
18
     * {@inheritdoc}
19
     */
20
    protected function parse($source)
21
    {
22
        return unserialize($source);
23
    }
24
}
25