Passed
Pull Request — master (#84)
by Maximo
04:41
created

PushNotificationTask::mainAction()   B

Complexity

Conditions 9
Paths 1

Size

Total Lines 86
Code Lines 42

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 90

Importance

Changes 0
Metric Value
cc 9
eloc 42
nc 1
nop 0
dl 0
loc 86
ccs 0
cts 56
cp 0
crap 90
rs 7.6924
c 0
b 0
f 0

How to fix   Long Method   

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
namespace Gewaer\Cli\Tasks;
4
5
use Canvas\Cli\Tasks\PushNotificationTask as CanvasPushNotificationTask;
6
7
/**
8
 * CLI To send push ontification and pusher msg.
9
 *
10
 * @package Gewaer\Cli\Tasks
11
 *
12
 * @property Config $config
13
 * @property \Pusher\Pusher $pusher
14
 * @property \Monolog\Logger $log
15
 */
16
class PushNotificationTask extends CanvasPushNotificationTask
17
{
18
}
19