Code Duplication    Length = 20-27 lines in 2 locations

src/Modules/Core/Http/Resources/Setting.php 1 location

@@ 7-33 (lines=27) @@
4
5
use Illuminate\Http\Resources\Json\JsonResource;
6
7
class Setting extends JsonResource
8
{
9
    /**
10
     * Indicates if the resource's collection keys should be preserved.
11
     *
12
     * @var bool
13
     */
14
    public $preserveKeys = true;
15
16
    /**
17
     * Transform the resource into an array.
18
     *
19
     * @param  \Illuminate\Http\Request  $request
20
     * @return array
21
     */
22
    public function toArray($request)
23
    {
24
        return [
25
            'id' => $this->id,
26
            'name' => $this->name,
27
            'value' => $this->value,
28
            'key' => $this->key,
29
            'createdAt' => $this->created_at,
30
            'updatedAt' => $this->updated_at,
31
        ];
32
    }
33
}
34

src/Modules/Notifications/Http/Resources/Notification.php 1 location

@@ 7-26 (lines=20) @@
4
5
use Illuminate\Http\Resources\Json\JsonResource;
6
7
class Notification extends JsonResource
8
{
9
    /**
10
     * Transform the resource into an array.
11
     *
12
     * @param  \Illuminate\Http\Request  $request
13
     * @return array
14
     */
15
    public function toArray($request)
16
    {
17
        return [
18
            'id' => $this->id,
19
            'type' => $this->type,
20
            'data' => $this->data,
21
            'readAt' => $this->read_at,
22
            'createdAt' => $this->created_at,
23
            'updatedAt' => $this->updated_at,
24
        ];
25
    }
26
}
27