Completed
Push — PSR-11-2 ( a5ad88...7f5041 )
by Nikolaos
03:59
created

None::serialize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1.125

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 2
cts 4
cp 0.5
rs 10
cc 1
nc 1
nop 0
crap 1.125
1
<?php
2
3
/**
4
 * This file is part of the Phalcon Framework.
5
 *
6
 * (c) Phalcon Team <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE.txt
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Phalcon\Storage\Serializer;
15
16
/**
17
 * Class None
18
 *
19
 * @package Phalcon\Storage\Serializer
20
 */
21
class None extends AbstractSerializer
22
{
23
    /**
24
     * Serializes data
25
     *
26
     * @return string
27
     */
28 1
    public function serialize()
29
    {
30 1
        return $this->data;
31
    }
32
33
    /**
34
     * Unserializes data
35
     *
36
     * @param string $data
37
     */
38 1
    public function unserialize($data): void
39
    {
40 1
        $this->data = $data;
41 1
    }
42
}
43