Conditions | 1 |
Paths | 1 |
Total Lines | 24 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Tests | 15 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
39 | 26 | public function isProperty($variablePtr) |
|
40 | { |
||
41 | 26 | $tokens = $this->file->getTokens(); |
|
42 | |||
43 | 26 | $propertyPointer = $this->file->findPrevious( |
|
44 | 26 | [T_STATIC, T_WHITESPACE, T_COMMENT], |
|
45 | 26 | $variablePtr - 1, |
|
46 | 26 | null, |
|
47 | 26 | true |
|
48 | ); |
||
49 | 26 | $propertyToken = $tokens[$propertyPointer]; |
|
50 | 26 | $propertyCode = $propertyToken['code']; |
|
51 | |||
52 | 26 | return in_array( |
|
53 | $propertyCode, |
||
54 | [ |
||
55 | 26 | T_PRIVATE, |
|
56 | 26 | T_PROTECTED, |
|
57 | 26 | T_PUBLIC, |
|
58 | 26 | T_VAR |
|
59 | ], |
||
60 | 26 | true |
|
61 | ); |
||
62 | } |
||
63 | } |
||
64 |