Completed
Push — master ( 8b81c8...699ba6 )
by Shcherbak
10:19
created

PropertyDefinition::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
cc 1
eloc 3
nc 1
nop 2
crap 2
1
<?
0 ignored issues
show
Security Best Practice introduced by
It is not recommend to use PHP's short opening tag <?, better use <?php, or <?= in case of outputting.

Short opening tags are disabled in PHP’s default configuration. In such a case, all content of this file is output verbatim to the browser without being parsed, or executed.

As a precaution to avoid these problems better use the long opening tag <?php.

Loading history...
2
3
  namespace Funivan\Cs\Tools\Php\RedundantNullPropertyValue;
4
5
  use Funivan\PhpTokenizer\Token;
6
7
  /**
8
   *
9
   */
10
  class PropertyDefinition {
11
12
    /**
13
     * @var Token
14
     */
15
    private $variable;
16
17
    /**
18
     * @var array
19
     */
20
    private $tokensToReplace;
21
22
23
    /**
24
     * @param Token $variable
25
     * @param array $tokensToReplace
26
     */
27
    public function __construct(Token $variable, array $tokensToReplace) {
28
      $this->variable = $variable;
29
      $this->tokensToReplace = $tokensToReplace;
30
    }
31
32
33
    /**
34
     * @return Token
35
     */
36
    public function getVariable() {
37
      return $this->variable;
38
    }
39
40
41
    /**
42
     * @return Token[]
43
     */
44
    public function getTokensToReplace() {
45
      return $this->tokensToReplace;
46
    }
47
48
49
  }