Skip to content

Commit f5645cd

Browse files
committed
Arrow function tests: remove some stray function calls
Follow-up on #3215 which made these redundant, but didn't remove them.
1 parent 2ba5393 commit f5645cd

File tree

1 file changed

+0
-38
lines changed

1 file changed

+0
-38
lines changed

tests/Core/Tokenizer/BackfillFnTokenTest.php

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ class BackfillFnTokenTest extends AbstractMethodUnitTest
2424
*/
2525
public function testSimple()
2626
{
27-
$tokens = self::$phpcsFile->getTokens();
28-
2927
foreach (['/* testStandard */', '/* testMixedCase */'] as $comment) {
3028
$token = $this->getTargetToken($comment, T_FN);
3129
$this->backfillHelper($token);
@@ -44,8 +42,6 @@ public function testSimple()
4442
*/
4543
public function testWhitespace()
4644
{
47-
$tokens = self::$phpcsFile->getTokens();
48-
4945
$token = $this->getTargetToken('/* testWhitespace */', T_FN);
5046
$this->backfillHelper($token);
5147
$this->scopePositionTestHelper($token, 6, 13);
@@ -62,8 +58,6 @@ public function testWhitespace()
6258
*/
6359
public function testComment()
6460
{
65-
$tokens = self::$phpcsFile->getTokens();
66-
6761
$token = $this->getTargetToken('/* testComment */', T_FN);
6862
$this->backfillHelper($token);
6963
$this->scopePositionTestHelper($token, 8, 15);
@@ -80,8 +74,6 @@ public function testComment()
8074
*/
8175
public function testHeredoc()
8276
{
83-
$tokens = self::$phpcsFile->getTokens();
84-
8577
$token = $this->getTargetToken('/* testHeredoc */', T_FN);
8678
$this->backfillHelper($token);
8779
$this->scopePositionTestHelper($token, 4, 9);
@@ -98,8 +90,6 @@ public function testHeredoc()
9890
*/
9991
public function testNestedOuter()
10092
{
101-
$tokens = self::$phpcsFile->getTokens();
102-
10393
$token = $this->getTargetToken('/* testNestedOuter */', T_FN);
10494
$this->backfillHelper($token);
10595
$this->scopePositionTestHelper($token, 5, 25);
@@ -147,8 +137,6 @@ public function testNestedInner()
147137
*/
148138
public function testFunctionCall()
149139
{
150-
$tokens = self::$phpcsFile->getTokens();
151-
152140
$token = $this->getTargetToken('/* testFunctionCall */', T_FN);
153141
$this->backfillHelper($token);
154142
$this->scopePositionTestHelper($token, 5, 17);
@@ -165,8 +153,6 @@ public function testFunctionCall()
165153
*/
166154
public function testChainedFunctionCall()
167155
{
168-
$tokens = self::$phpcsFile->getTokens();
169-
170156
$token = $this->getTargetToken('/* testChainedFunctionCall */', T_FN);
171157
$this->backfillHelper($token);
172158
$this->scopePositionTestHelper($token, 5, 12, 'bracket');
@@ -183,8 +169,6 @@ public function testChainedFunctionCall()
183169
*/
184170
public function testFunctionArgument()
185171
{
186-
$tokens = self::$phpcsFile->getTokens();
187-
188172
$token = $this->getTargetToken('/* testFunctionArgument */', T_FN);
189173
$this->backfillHelper($token);
190174
$this->scopePositionTestHelper($token, 8, 15, 'comma');
@@ -201,8 +185,6 @@ public function testFunctionArgument()
201185
*/
202186
public function testClosure()
203187
{
204-
$tokens = self::$phpcsFile->getTokens();
205-
206188
$token = $this->getTargetToken('/* testClosure */', T_FN);
207189
$this->backfillHelper($token);
208190
$this->scopePositionTestHelper($token, 5, 60, 'comma');
@@ -219,8 +201,6 @@ public function testClosure()
219201
*/
220202
public function testReturnType()
221203
{
222-
$tokens = self::$phpcsFile->getTokens();
223-
224204
$token = $this->getTargetToken('/* testReturnType */', T_FN);
225205
$this->backfillHelper($token);
226206
$this->scopePositionTestHelper($token, 11, 18, 'comma');
@@ -237,8 +217,6 @@ public function testReturnType()
237217
*/
238218
public function testReference()
239219
{
240-
$tokens = self::$phpcsFile->getTokens();
241-
242220
$token = $this->getTargetToken('/* testReference */', T_FN);
243221
$this->backfillHelper($token);
244222
$this->scopePositionTestHelper($token, 6, 9);
@@ -255,8 +233,6 @@ public function testReference()
255233
*/
256234
public function testGrouped()
257235
{
258-
$tokens = self::$phpcsFile->getTokens();
259-
260236
$token = $this->getTargetToken('/* testGrouped */', T_FN);
261237
$this->backfillHelper($token);
262238
$this->scopePositionTestHelper($token, 5, 8);
@@ -273,8 +249,6 @@ public function testGrouped()
273249
*/
274250
public function testArrayValue()
275251
{
276-
$tokens = self::$phpcsFile->getTokens();
277-
278252
$token = $this->getTargetToken('/* testArrayValue */', T_FN);
279253
$this->backfillHelper($token);
280254
$this->scopePositionTestHelper($token, 4, 9, 'comma');
@@ -291,8 +265,6 @@ public function testArrayValue()
291265
*/
292266
public function testYield()
293267
{
294-
$tokens = self::$phpcsFile->getTokens();
295-
296268
$token = $this->getTargetToken('/* testYield */', T_FN);
297269
$this->backfillHelper($token);
298270
$this->scopePositionTestHelper($token, 5, 14);
@@ -309,8 +281,6 @@ public function testYield()
309281
*/
310282
public function testNullableNamespace()
311283
{
312-
$tokens = self::$phpcsFile->getTokens();
313-
314284
$token = $this->getTargetToken('/* testNullableNamespace */', T_FN);
315285
$this->backfillHelper($token);
316286
$this->scopePositionTestHelper($token, 15, 18);
@@ -327,8 +297,6 @@ public function testNullableNamespace()
327297
*/
328298
public function testNamespaceOperatorInTypes()
329299
{
330-
$tokens = self::$phpcsFile->getTokens();
331-
332300
$token = $this->getTargetToken('/* testNamespaceOperatorInTypes */', T_FN);
333301
$this->backfillHelper($token);
334302
$this->scopePositionTestHelper($token, 16, 19);
@@ -386,8 +354,6 @@ public function testKeywordReturnTypes()
386354
*/
387355
public function testUnionParamType()
388356
{
389-
$tokens = self::$phpcsFile->getTokens();
390-
391357
$token = $this->getTargetToken('/* testUnionParamType */', T_FN);
392358
$this->backfillHelper($token);
393359
$this->scopePositionTestHelper($token, 13, 21);
@@ -404,8 +370,6 @@ public function testUnionParamType()
404370
*/
405371
public function testUnionReturnType()
406372
{
407-
$tokens = self::$phpcsFile->getTokens();
408-
409373
$token = $this->getTargetToken('/* testUnionReturnType */', T_FN);
410374
$this->backfillHelper($token);
411375
$this->scopePositionTestHelper($token, 11, 18);
@@ -474,8 +438,6 @@ public function testTernary()
474438
*/
475439
public function testNestedInMethod()
476440
{
477-
$tokens = self::$phpcsFile->getTokens();
478-
479441
$token = $this->getTargetToken('/* testNestedInMethod */', T_FN);
480442
$this->backfillHelper($token);
481443
$this->scopePositionTestHelper($token, 5, 17);

0 commit comments

Comments
 (0)