1 | <?php |
||
12 | final class Fixer |
||
13 | { |
||
14 | /** |
||
15 | * @var File |
||
16 | */ |
||
17 | private $currentFile; |
||
18 | |||
19 | /** |
||
20 | * @var string[]|array<int, string> |
||
21 | */ |
||
22 | private $tokens = []; |
||
23 | |||
24 | 6 | public function startFile(File $file) |
|
39 | |||
40 | 2 | public function getContents() : string |
|
44 | |||
45 | 4 | public function getTokenContent(int $stackPtr) : string |
|
49 | |||
50 | 4 | public function replaceToken(int $stackPtr, string $content) : bool |
|
55 | |||
56 | 1 | public function substrToken(int $stackPtr, int $start, int $length=null) : bool |
|
68 | |||
69 | 2 | public function addContent(int $stackPtr, string $content) : bool |
|
74 | |||
75 | 2 | public function addContentBefore(int $stackPtr, string $content) : bool |
|
80 | |||
81 | 1 | public function addNewline(int $stackPtr) : bool |
|
85 | |||
86 | 1 | public function addNewlineBefore(int $stackPtr) : bool |
|
90 | |||
91 | /** |
||
92 | * Needed for legacy compatibility. |
||
93 | */ |
||
94 | 1 | public function beginChangeset() |
|
97 | |||
98 | /** |
||
99 | * Needed for legacy compatibility. |
||
100 | */ |
||
101 | 1 | public function endChangeset() |
|
104 | } |
||
105 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
integer
values, zero is a special case, in particular the following results might be unexpected: