Skip to content

Commit c8bda0e

Browse files
committed
Merge branch '2.12' into 2.13
2 parents fbb9c1c + a1cd2cb commit c8bda0e

File tree

8 files changed

+32
-16
lines changed

8 files changed

+32
-16
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@ Choose from the list of available rules:
873873
with a single asterisk, after the opening slash. Both must end with a
874874
single asterisk before the closing slash.
875875

876-
* **multiline_whitespace_before_semicolons**
876+
* **multiline_whitespace_before_semicolons** [@PhpCsFixer]
877877

878878
Forbid multi-line whitespace before the closing semicolon or move the
879879
semicolon to the new line for chained calls.

src/Console/ConfigurationResolver.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,8 @@ public function getFixers()
324324
$this->fixers = $this->createFixerFactory()
325325
->useRuleSet($this->getRuleSet())
326326
->setWhitespacesConfig(new WhitespacesFixerConfig($this->config->getIndent(), $this->config->getLineEnding()))
327-
->getFixers();
327+
->getFixers()
328+
;
328329

329330
if (false === $this->getRiskyAllowed()) {
330331
$riskyFixers = array_map(

src/RuleSet.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ final class RuleSet implements RuleSetInterface
213213
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
214214
'method_chaining_indentation' => true,
215215
'multiline_comment_opening_closing' => true,
216+
'multiline_whitespace_before_semicolons' => ['strategy' => 'new_line_for_chained_calls'],
216217
'no_alternative_syntax' => true,
217218
'no_binary_string' => true,
218219
'no_extra_blank_lines' => ['tokens' => [

tests/Console/ConfigurationResolverTest.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,8 @@ public function testResolvePathWithFileThatIsExcludedDirectlyOverridePathMode()
347347
$config = new Config();
348348
$config->getFinder()
349349
->in(__DIR__)
350-
->notPath(basename(__FILE__));
350+
->notPath(basename(__FILE__))
351+
;
351352

352353
$resolver = $this->createConfigurationResolver(
353354
['path' => [__FILE__]],
@@ -362,7 +363,8 @@ public function testResolvePathWithFileThatIsExcludedDirectlyIntersectionPathMod
362363
$config = new Config();
363364
$config->getFinder()
364365
->in(__DIR__)
365-
->notPath(basename(__FILE__));
366+
->notPath(basename(__FILE__))
367+
;
366368

367369
$resolver = $this->createConfigurationResolver([
368370
'path' => [__FILE__],
@@ -378,7 +380,8 @@ public function testResolvePathWithFileThatIsExcludedByDirOverridePathMode()
378380
$config = new Config();
379381
$config->getFinder()
380382
->in($dir)
381-
->exclude(basename(__DIR__));
383+
->exclude(basename(__DIR__))
384+
;
382385

383386
$resolver = $this->createConfigurationResolver(
384387
['path' => [__FILE__]],
@@ -394,7 +397,8 @@ public function testResolvePathWithFileThatIsExcludedByDirIntersectionPathMode()
394397
$config = new Config();
395398
$config->getFinder()
396399
->in($dir)
397-
->exclude(basename(__DIR__));
400+
->exclude(basename(__DIR__))
401+
;
398402

399403
$resolver = $this->createConfigurationResolver([
400404
'path-mode' => 'intersection',
@@ -410,7 +414,8 @@ public function testResolvePathWithFileThatIsNotExcluded()
410414
$config = new Config();
411415
$config->getFinder()
412416
->in($dir)
413-
->notPath('foo-'.basename(__FILE__));
417+
->notPath('foo-'.basename(__FILE__))
418+
;
414419

415420
$resolver = $this->createConfigurationResolver(
416421
['path' => [__FILE__]],

tests/FixerDefinition/VersionSpecificCodeSampleTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ public function testIsSuitableForUsesVersionSpecification($version, $isSatisfied
6565

6666
$versionSpecification
6767
->isSatisfiedBy($version)
68-
->willReturn($isSatisfied);
68+
->willReturn($isSatisfied)
69+
;
6970

7071
$codeSample = new VersionSpecificCodeSample(
7172
'<php echo $foo;',

tests/Runner/RunnerTest.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,16 @@ public function testThatFixSuccessfully()
4040
$linterProphecy = $this->prophesize(\PhpCsFixer\Linter\LinterInterface::class);
4141
$linterProphecy
4242
->isAsync()
43-
->willReturn(false);
43+
->willReturn(false)
44+
;
4445
$linterProphecy
4546
->lintFile(Argument::type('string'))
46-
->willReturn($this->prophesize(\PhpCsFixer\Linter\LintingResultInterface::class)->reveal());
47+
->willReturn($this->prophesize(\PhpCsFixer\Linter\LintingResultInterface::class)->reveal())
48+
;
4749
$linterProphecy
4850
->lintSource(Argument::type('string'))
49-
->willReturn($this->prophesize(\PhpCsFixer\Linter\LintingResultInterface::class)->reveal());
51+
->willReturn($this->prophesize(\PhpCsFixer\Linter\LintingResultInterface::class)->reveal())
52+
;
5053

5154
$fixers = [
5255
new Fixer\ClassNotation\VisibilityRequiredFixer(),

tests/Test/AbstractFixerTestCase.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ private function getLinter()
194194
$linterProphecy = $this->prophesize(\PhpCsFixer\Linter\LinterInterface::class);
195195
$linterProphecy
196196
->lintSource(Argument::type('string'))
197-
->willReturn($this->prophesize(\PhpCsFixer\Linter\LintingResultInterface::class)->reveal());
197+
->willReturn($this->prophesize(\PhpCsFixer\Linter\LintingResultInterface::class)->reveal())
198+
;
198199

199200
$linter = $linterProphecy->reveal();
200201
} else {

tests/Test/AbstractIntegrationTestCase.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,8 @@ private static function createFixers(IntegrationCase $case)
353353
->setWhitespacesConfig(
354354
new WhitespacesFixerConfig($config['indent'], $config['lineEnding'])
355355
)
356-
->getFixers();
356+
->getFixers()
357+
;
357358
}
358359

359360
/**
@@ -384,13 +385,16 @@ private function getLinter()
384385
$linterProphecy = $this->prophesize(\PhpCsFixer\Linter\LinterInterface::class);
385386
$linterProphecy
386387
->lintSource(Argument::type('string'))
387-
->willReturn($this->prophesize(\PhpCsFixer\Linter\LintingResultInterface::class)->reveal());
388+
->willReturn($this->prophesize(\PhpCsFixer\Linter\LintingResultInterface::class)->reveal())
389+
;
388390
$linterProphecy
389391
->lintFile(Argument::type('string'))
390-
->willReturn($this->prophesize(\PhpCsFixer\Linter\LintingResultInterface::class)->reveal());
392+
->willReturn($this->prophesize(\PhpCsFixer\Linter\LintingResultInterface::class)->reveal())
393+
;
391394
$linterProphecy
392395
->isAsync()
393-
->willReturn(false);
396+
->willReturn(false)
397+
;
394398

395399
$linter = $linterProphecy->reveal();
396400
} else {

0 commit comments

Comments
 (0)