HeartbeatController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
c 2
b 0
f 0
lcom 0
cbo 2
dl 0
loc 14
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A beat() 0 10 1
1
<?php
2
3
namespace App\Http\Controllers;
4
5
use App\Ping;
6
use App\Http\Requests;
7
use Illuminate\Http\Request;
8
9
class HeartbeatController extends Controller
10
{
11
12
    public function beat($name)
13
    {
14
        //validate name is the right format
15
        
16
        $ping = Ping::findOrNewFromName($name);
17
18
        $ping->recordPingUpdate();
19
20
        return response('', 204);
21
    }
22
}
23