Skip to content

Commit

Permalink
Update src/AopCodeGenNewCode.php
Browse files Browse the repository at this point in the history
Co-authored-by: Yoshitaka Jingu <yoshitaka.jingu@gmail.com>
  • Loading branch information
koriym and jingu committed Oct 5, 2023
1 parent 69a187f commit 8e734ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AopCodeGenNewCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function insert(string $code): void

public function implementsInterface(string $interfaceName): void
{
$pattern = '/(class\s+\w+\s+(?:extends\s+\w+\s+)?)(implements\s+\w+(?:,\s*\w+)*)?/';
$pattern = '@(class\s+\w+\s*(?:extends\s+\w+)?)\s*(implements\s+[\w]+)@';

$this->code = (string) preg_replace_callback($pattern, static function ($matches) use ($interfaceName) {
if (isset($matches[2])) {
Expand Down

0 comments on commit 8e734ec

Please sign in to comment.