Skip to content

Commit a0cc62f

Browse files
committed
Implement code review changes related to commit 2 (3a19186)
1 parent cbfa258 commit a0cc62f

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.1.inc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ if ($a)
8080

8181
<?php
8282

83-
if ($error === ERROR_INVALID_GENDER): ?>
84-
Invalid gender!
85-
<?php elseif ($error === ERROR_EMAIL_IN_USE): ?>
86-
Invalid email!
83+
if ($error === ERROR_ONE): ?>
84+
Error one!
85+
<?php elseif ($error === ERROR_TWO): ?>
86+
Error two!
8787
<?php endif;
8888

8989

src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.1.inc.fixed

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ if ($a) {
9292

9393
<?php
9494

95-
if ($error === ERROR_INVALID_GENDER): ?>
96-
Invalid gender!
97-
<?php elseif ($error === ERROR_EMAIL_IN_USE): ?>
98-
Invalid email!
95+
if ($error === ERROR_ONE): ?>
96+
Error one!
97+
<?php elseif ($error === ERROR_TWO): ?>
98+
Error two!
9999
<?php endif;
100100

101101

tests/Core/Tokenizers/Tokenizer/RecurseScopeMapSwitchTokenScopeTest.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ switch ($value) {
1313
// Test for https://github.com/squizlabs/PHP_CodeSniffer/issues/497
1414
/* testSwitchAlternativeSyntax */
1515
switch ($value):
16-
/* testEnsureTestWillNotPickUpWrongColon */
16+
/* testSwitchAlternativeSyntaxEnsureTestWillNotPickUpWrongColon */
1717
case 1:
1818
echo 'one';
1919
break;

tests/Core/Tokenizers/Tokenizer/RecurseScopeMapSwitchTokenScopeTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Tests setting the scope for T_SWITCH token (normal and alternative syntax).
44
*
55
* @author Rodrigo Primo <[email protected]>
6-
* @copyright 2021 Squiz Pty Ltd (ABN 77 084 670 600)
6+
* @copyright 2024 PHPCSStandards and contributors
77
* @license https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
88
*/
99

@@ -27,7 +27,7 @@ final class RecurseScopeMapSwitchTokenScopeTest extends AbstractTokenizerTestCas
2727
*
2828
* @link https://github.com/squizlabs/PHP_CodeSniffer/issues/497#ref-commit-b24b96b
2929
*
30-
* @dataProvider dataSwitch
30+
* @dataProvider dataSwitchScope
3131
* @covers \PHP_CodeSniffer\Tokenizers\Tokenizer::recurseScopeMap
3232
*
3333
* @return void
@@ -94,7 +94,7 @@ public function testSwitchScope($testMarker, $expectedTokens, $testOpenerMarker=
9494
*
9595
* @return array<string, array<string, string|array<string, int|string>>>
9696
*/
97-
public static function dataSwitch()
97+
public static function dataSwitchScope()
9898
{
9999
return [
100100
'switch normal syntax' => [
@@ -124,7 +124,7 @@ public static function dataSwitch()
124124
],
125125
];
126126

127-
}//end dataSwitch()
127+
}//end dataSwitchScope()
128128

129129

130130
}//end class

0 commit comments

Comments
 (0)