Skip to content

Commit

Permalink
Fix: Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Feb 24, 2025
1 parent 83deb88 commit d7b2249
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 40 deletions.

This file was deleted.

This file was deleted.

13 changes: 0 additions & 13 deletions test/Fixture/Statements/NoSwitchRule/Success/switch-not-used.php

This file was deleted.

29 changes: 29 additions & 0 deletions test/Fixture/Statements/NoSwitchRule/script.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Expressions\NoSwitchRule;

switch ($foo) {
case 'foo':
return 'It is foo!';

case 'bar':
return 'It is bar!';
}

switch ($foo) {
case 'foo':
return 'It is foo!';

case 'bar':
return 'It is bar!';
}

sWiTcH ($foo) {
case 'foo':
return 'It is foo!';

case 'bar':
return 'It is bar!';
}
6 changes: 5 additions & 1 deletion test/Integration/Statements/NoSwitchRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ public function testNoSwitchRule(): void
],
[
'Control structures using switch should not be used.',
7,
15,
],
[
'Control structures using switch should not be used.',
23,
],
],
);
Expand Down

0 comments on commit d7b2249

Please sign in to comment.