Serialized   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 12
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A get() 0 4 1
A set() 0 4 1
1
<?php
2
3
namespace Tzsk\Payu\Models\Casts;
4
5
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
6
7
class Serialized implements CastsAttributes
8
{
9
    public function get($model, string $key, $value, array $attributes)
10
    {
11
        return unserialize($value);
12
    }
13
14
    public function set($model, string $key, $value, array $attributes)
15
    {
16
        return serialize($value);
17
    }
18
}
19