ObjectToStringConverter::__invoke()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 2
c 1
b 0
f 1
dl 0
loc 5
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Jackal\Copycat\Converter\ValueConverter;
4
5
/**
6
 * Class ObjectToStringConverter
7
 * @package Jackal\Copycat\Converter\ValueConverter
8
 */
9
class ObjectToStringConverter extends AbstractConverter
10
{
11
    /**
12
     * @param $value
13
     * @return mixed
14
     */
15
    public function __invoke($value)
16
    {
17
        $value[$this->fieldName] = serialize($value[$this->fieldName]);
18
19
        return $value;
20
    }
21
}
22