Uuid   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
dl 0
loc 28
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A get() 0 3 1
A set() 0 3 1
1
<?php
2
3
namespace Staudenmeir\EloquentJsonRelations\Casts;
4
5
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
6
7
class Uuid implements CastsAttributes
8
{
9
    /**
10
     * Cast the given value.
11
     *
12
     * @param \Illuminate\Database\Eloquent\Model $model
13
     * @param string $key
14
     * @param mixed $value
15
     * @param array $attributes
16
     * @return mixed
17
     */
18
    public function get($model, $key, $value, $attributes)
19
    {
20
        return $value;
21
    }
22
23
    /**
24
     * Prepare the given value for storage.
25
     *
26
     * @param \Illuminate\Database\Eloquent\Model $model
27
     * @param string $key
28
     * @param mixed $value
29
     * @param array $attributes
30
     * @return mixed
31
     */
32
    public function set($model, $key, $value, $attributes)
33
    {
34
        return $value;
35
    }
36
}
37