-
-
Notifications
You must be signed in to change notification settings - Fork 348
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CodingStyle] Use double quote to escape quotes in EncapsedStringsToS…
…printfRector (#6326) * add test fixture for rectorphp/rector#8838 * use double quote to escape quotes in EncapsedStringsToSprintfRector * [ci-review] Rector Rectify --------- Co-authored-by: GitHub Action <[email protected]>
- Loading branch information
1 parent
5170018
commit 398b04d
Showing
2 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
...Style/Rector/Encapsed/EncapsedStringsToSprintfRector/Fixture/translation_function.php.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector\Fixture; | ||
|
||
final class TranslationFunction | ||
{ | ||
public function run(string $pattern) | ||
{ | ||
echo _("My translatable text with '{$pattern}'."); | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector\Fixture; | ||
|
||
final class TranslationFunction | ||
{ | ||
public function run(string $pattern) | ||
{ | ||
echo _(sprintf("My translatable text with '%s'.", $pattern)); | ||
} | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters