ClassRegistrationTrait   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 23
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace BestIt\Sniffs;
6
7
use PHP_CodeSniffer\Util\Tokens;
8
9
/**
10
 * Helps you with the registration of the class sniffs.
11
 *
12
 * @author blange <[email protected]>
13
 * @package BestIt\Sniffs
14
 */
15
trait ClassRegistrationTrait
16
{
17
    /**
18
     * Registers the tokens that this sniff wants to listen for.
19
     *
20
     * An example return value for a sniff that wants to listen for whitespace
21
     * and any comments would be:
22
     *
23
     * <code>
24
     *    return array(
25
     *            T_WHITESPACE,
26
     *            T_DOC_COMMENT,
27
     *            T_COMMENT,
28
     *           );
29
     * </code>
30
     *
31
     * @return int[]
32
     */
33
    public function register(): array
34
    {
35
        return Tokens::$ooScopeTokens;
36
    }
37
}
38