Skip to content

Commit

Permalink
Handle function calls with @ error suppression
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHenryIE committed Aug 18, 2024
1 parent a2cc245 commit 2e0a2f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Prefixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ public function replaceNamespace(string $contents, string $originalNamespace, st
|:\s* # In a ternary operator
|\(string\)\s* # casting a namespaced class to a string
)
@? # Maybe preceeded by the @ symbol for error suppression
(?<searchNamespace>
{$searchNamespace} # followed by the namespace to replace
)
Expand Down
2 changes: 1 addition & 1 deletion tests/Issues/StraussIssue114Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function test_muted_errors()

exec('composer install');

$result = $this->runStrauss();
$this->runStrauss();

$php_string = file_get_contents($this->testsWorkingDir . '/vendor-prefixed/aws/aws-sdk-php/src/Configuration/ConfigurationResolver.php');

Expand Down

0 comments on commit 2e0a2f8

Please sign in to comment.