Test Failed
Pull Request — master (#84)
by Maximo
04:28
created

Users::afterCreate()   B

Complexity

Conditions 8
Paths 22

Size

Total Lines 63
Code Lines 28

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 24
CRAP Score 8.1867

Importance

Changes 0
Metric Value
cc 8
eloc 28
nc 22
nop 0
dl 0
loc 63
ccs 24
cts 28
cp 0.8571
crap 8.1867
rs 8.4444
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
declare(strict_types=1);
3
4
namespace Gewaer\Models;
5
6
use Canvas\Models\Users as CanvasUsers;
7
8
/**
9
 * Class Users.
10
 *
11
 * @package Canvas\Models
12
 *
13
 * @property Users $user
14
 * @property Config $config
15
 * @property Apps $app
16
 * @property Companies $defaultCompany
17
 * @property \Phalcon\Di $di
18
 */
19
class Users extends CanvasUsers
20
{
21
}
22