Completed
Push — master ( a3ab04...96da42 )
by Maxime
03:50
created

WebHookController::postMessage()   C

Complexity

Conditions 12
Paths 4

Size

Total Lines 49
Code Lines 28

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 31
CRAP Score 12

Importance

Changes 2
Bugs 0 Features 2
Metric Value
c 2
b 0
f 2
dl 0
loc 49
ccs 31
cts 31
cp 1
rs 5.1474
cc 12
eloc 28
nc 4
nop 2
crap 12

How to fix   Complexity   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: mfrancois
5
 * Date: 31/07/2016
6
 * Time: 19:09
7
 */
8
9
namespace Distilleries\Messenger\Http\Controllers;
10
11
use Distilleries\Messenger\Http\Controllers\Base\WebHookBaseTrait;
12
use Illuminate\Routing\Controller;
13
14
class WebHookController extends Controller
15
{
16
    use WebHookBaseTrait;
17
}