Code Duplication    Length = 8-12 lines in 2 locations

src/Models/EloquentModel.php 2 locations

@@ 41-48 (lines=8) @@
38
     * @param  string  $key
39
     * @return mixed
40
     */
41
    public function getAttribute($key)
42
    {
43
        if (in_array($key, $this->multipleHighloadBlockFields)) {
44
            return unserialize($this->attributes[$key]);
45
        }
46
47
        return parent::getAttribute($key);
48
    }
49
50
    /**
51
     * Set a given attribute on the model.
@@ 57-68 (lines=12) @@
54
     * @param  mixed  $value
55
     * @return $this
56
     */
57
    public function setAttribute($key, $value)
58
    {
59
        if (in_array($key, $this->multipleHighloadBlockFields)) {
60
            $this->attributes[$key] = serialize($value);
61
62
            return $this;
63
        }
64
65
        parent::setAttribute($key, $value);
66
67
        return $this;
68
    }
69
}
70