HealthCheck::toArray()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 6
rs 10
cc 1
nc 1
nop 1
1
<?php
2
namespace Health\Resources;
3
4
use Illuminate\Http\Resources\Json\JsonResource;
5
6
/**
7
 * Health Check Resource
8
 *
9
 * @method string getName()
10
 * @method string getState()
11
 * @method array getData()
12
 */
13
class HealthCheck extends JsonResource
14
{
15
16
    public function toArray($request)
17
    {
18
        return [
19
            'name' => $this->getName(),
20
            'status' => $this->getState(),
21
            'data' => $this->getData()
22
        ];
23
    }
24
}
25