BaseCommand   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A output() 0 10 2
1
<?php namespace App\Console\Commands;
2
3
use Illuminate\Console\Command;
4
use Symfony\Component\Console\Input\InputOption;
5
use Symfony\Component\Console\Input\InputArgument;
6
7
class BaseCommand extends Command {
8
9
	/**
10
	 * Create a new command instance.
11
	 */
12
	public function __construct()
13
	{
14
		parent::__construct();
15
	}
16
17
	public function output($message, $sendToSlack = true)
18
	{
19
		$message = '`[' . strtoupper(app('env')) . ']` ' . $message;
20
		
21
		$this->info(str_replace('`', '', $message));
22
23
		if ($sendToSlack) {
24
			\Slack::send($message);
25
		}
26
	}
27
}
28