SlackNotifier   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A notifyOfDeployment() 0 4 1
1
<?php
2
3
namespace ParityBit\DeploymentNotifier\Notifiers;
4
5
use ParityBit\DeploymentNotifier\Clients\SlackClient;
6
use ParityBit\DeploymentNotifier\Deployment;
7
8
/**
9
 * A notifier to tell slack there has been a deployment
10
 */
11
class SlackNotifier implements Notifier
12
{
13
    protected $client;
14
15
    public function __construct(SlackClient $client)
16
    {
17
        $this->client = $client;
18
    }
19
20
    public function notifyOfDeployment(Deployment $deployment)
21
    {
22
        $this->client->sendMessage();
0 ignored issues
show
Bug introduced by
The call to sendMessage() misses a required argument $message.

This check looks for function calls that miss required arguments.

Loading history...
23
    }
24
}
25