Skip to content

Commit 205c814

Browse files
committed
Run phpcbf on tests
1 parent 25e9c93 commit 205c814

File tree

3 files changed

+29
-23
lines changed

3 files changed

+29
-23
lines changed

tests/TolerantASTConverter/ConversionTest.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php declare(strict_types = 1);
1+
<?php
2+
3+
declare(strict_types=1);
24

35
namespace TolerantASTConverter\Tests;
46

tests/TolerantASTConverter/ErrorTolerantConversionTest.php

+23-21
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php declare(strict_types=1);
1+
<?php
2+
3+
declare(strict_types=1);
24

35
namespace TolerantASTConverter\Tests;
46

@@ -13,7 +15,7 @@
1315
*/
1416
class ErrorTolerantConversionTest extends \PHPUnit\Framework\TestCase
1517
{
16-
public function testIncompleteVar() : void
18+
public function testIncompleteVar(): void
1719
{
1820
$incomplete_contents = <<<'EOT'
1921
<?php
@@ -30,7 +32,7 @@ function foo() {
3032
$this->runTestFallbackFromParser($incomplete_contents, $valid_contents);
3133
}
3234

33-
public function testIncompleteVarWithPlaceholderShort() : void
35+
public function testIncompleteVarWithPlaceholderShort(): void
3436
{
3537
$incomplete_contents = <<<'EOT'
3638
<?php
@@ -43,7 +45,7 @@ public function testIncompleteVarWithPlaceholderShort() : void
4345
$this->runTestFallbackFromParser($incomplete_contents, $valid_contents, true);
4446
}
4547

46-
public function testIncompleteVarWithPlaceholder() : void
48+
public function testIncompleteVarWithPlaceholder(): void
4749
{
4850
$incomplete_contents = <<<'EOT'
4951
<?php
@@ -60,7 +62,7 @@ function foo() {
6062
$this->runTestFallbackFromParser($incomplete_contents, $valid_contents, true);
6163
}
6264

63-
public function testIncompleteProperty() : void
65+
public function testIncompleteProperty(): void
6466
{
6567
$incomplete_contents = <<<'EOT'
6668
<?php
@@ -79,7 +81,7 @@ function foo() {
7981
$this->runTestFallbackFromParser($incomplete_contents, $valid_contents);
8082
}
8183

82-
public function testIncompletePropertyWithPlaceholder() : void
84+
public function testIncompletePropertyWithPlaceholder(): void
8385
{
8486
$incomplete_contents = <<<'EOT'
8587
<?php
@@ -98,7 +100,7 @@ function foo() {
98100
$this->runTestFallbackFromParser($incomplete_contents, $valid_contents, true);
99101
}
100102

101-
public function testIncompleteMethod() : void
103+
public function testIncompleteMethod(): void
102104
{
103105
$incomplete_contents = <<<'EOT'
104106
<?php
@@ -117,7 +119,7 @@ function foo() {
117119
$this->runTestFallbackFromParser($incomplete_contents, $valid_contents);
118120
}
119121

120-
public function testIncompleteMethodWithPlaceholder() : void
122+
public function testIncompleteMethodWithPlaceholder(): void
121123
{
122124
$incomplete_contents = <<<'EOT'
123125
<?php
@@ -136,7 +138,7 @@ function foo() {
136138
$this->runTestFallbackFromParser($incomplete_contents, $valid_contents, true);
137139
}
138140

139-
public function testMiscNoise() : void
141+
public function testMiscNoise(): void
140142
{
141143
$incomplete_contents = <<<'EOT'
142144
<?php
@@ -155,7 +157,7 @@ function foo() {
155157
$this->runTestFallbackFromParser($incomplete_contents, $valid_contents);
156158
}
157159

158-
public function testMiscNoiseWithPlaceholders() : void
160+
public function testMiscNoiseWithPlaceholders(): void
159161
{
160162
$incomplete_contents = <<<'EOT'
161163
<?php
@@ -174,7 +176,7 @@ function foo() {
174176
$this->runTestFallbackFromParser($incomplete_contents, $valid_contents, true);
175177
}
176178

177-
public function testIncompleteArithmeticWithPlaceholders() : void
179+
public function testIncompleteArithmeticWithPlaceholders(): void
178180
{
179181
$incomplete_contents = <<<'EOT'
180182
<?php
@@ -191,7 +193,7 @@ function foo() {
191193
$this->runTestFallbackFromParser($incomplete_contents, $valid_contents, true);
192194
}
193195

194-
public function testIncompleteArithmeticWithoutPlaceholders() : void
196+
public function testIncompleteArithmeticWithoutPlaceholders(): void
195197
{
196198
$incomplete_contents = <<<'EOT'
197199
<?php
@@ -208,7 +210,7 @@ function foo() {
208210
$this->runTestFallbackFromParser($incomplete_contents, $valid_contents, false);
209211
}
210212

211-
public function testMissingMember() : void
213+
public function testMissingMember(): void
212214
{
213215
// in 0.0.17, this starts trying to parse a typed property declaration
214216
// and discards all of it because it's invalid.
@@ -230,7 +232,7 @@ function aFunction() {}
230232
$this->runTestFallbackFromParser($incomplete_contents, $valid_contents, false);
231233
}
232234

233-
public function testIncompleteTypedProperty() : void
235+
public function testIncompleteTypedProperty(): void
234236
{
235237
$incomplete_contents = <<<'EOT'
236238
<?php
@@ -251,7 +253,7 @@ public function aFunction() {}
251253
$this->runTestFallbackFromParser($incomplete_contents, $valid_contents, false);
252254
}
253255

254-
public function testEmptyConstList() : void
256+
public function testEmptyConstList(): void
255257
{
256258
$incomplete_contents = <<<'EOT'
257259
<?php
@@ -264,7 +266,7 @@ class Test { }
264266
$this->runTestFallbackFromParser($incomplete_contents, $valid_contents, false);
265267
}
266268

267-
public function testMissingSemicolon() : void
269+
public function testMissingSemicolon(): void
268270
{
269271
$incomplete_contents = <<<'EOT'
270272
<?php
@@ -283,7 +285,7 @@ function foo() {
283285
$this->runTestFallbackFromParser($incomplete_contents, $valid_contents);
284286
}
285287

286-
public function testIncompleteMethodCallBeforeIfWithPlaceholders() : void
288+
public function testIncompleteMethodCallBeforeIfWithPlaceholders(): void
287289
{
288290
$incomplete_contents = <<<'EOT'
289291
<?php
@@ -309,7 +311,7 @@ public function testIncompleteMethodCallBeforeIfWithPlaceholders() : void
309311
$this->runTestFallbackFromParser($incomplete_contents, $valid_contents, true);
310312
}
311313

312-
public function testIncompleteMethodCallBeforeIfWithoutPlaceholders() : void
314+
public function testIncompleteMethodCallBeforeIfWithoutPlaceholders(): void
313315
{
314316
$incomplete_contents = <<<'EOT'
315317
<?php
@@ -361,7 +363,7 @@ public function bar() {
361363
EOT;
362364
*/
363365

364-
private static function normalizePolyfillAST(ast\Node $ast) : void
366+
private static function normalizePolyfillAST(ast\Node $ast): void
365367
{
366368
switch ($ast->kind) {
367369
case ast\AST_DIM:
@@ -377,7 +379,7 @@ private static function normalizePolyfillAST(ast\Node $ast) : void
377379
}
378380
}
379381

380-
private function runTestFallbackFromParser(string $incomplete_contents, string $valid_contents, bool $should_add_placeholders = false) : void
382+
private function runTestFallbackFromParser(string $incomplete_contents, string $valid_contents, bool $should_add_placeholders = false): void
381383
{
382384
$supports70 = ConversionTest::hasNativeASTSupport(70);
383385
if (!$supports70) {
@@ -386,7 +388,7 @@ private function runTestFallbackFromParser(string $incomplete_contents, string $
386388
$this->runTestFallbackFromParserForASTVersion($incomplete_contents, $valid_contents, 70, $should_add_placeholders);
387389
}
388390

389-
private function runTestFallbackFromParserForASTVersion(string $incomplete_contents, string $valid_contents, int $ast_version, bool $should_add_placeholders) : void
391+
private function runTestFallbackFromParserForASTVersion(string $incomplete_contents, string $valid_contents, int $ast_version, bool $should_add_placeholders): void
390392
{
391393
$ast = \ast\parse_code($valid_contents, $ast_version);
392394
$this->assertInstanceOf('\ast\Node', $ast, 'Examples(for validContents) must be syntactically valid PHP parsable by php-ast');

tests/TolerantASTConverter/TolerantASTConverterTest.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php declare(strict_types = 1);
1+
<?php
2+
3+
declare(strict_types=1);
24

35
namespace TolerantASTConverter\Tests;
46

0 commit comments

Comments
 (0)