Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
imanghafoori1 authored Aug 3, 2024
1 parent 0b0e3c0 commit d5a9072
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -398,18 +398,13 @@ UserRepo::where(...); /// UserRepo is not a model
<a name="capturing-php-statements" ></a>
:five: **Capturing php "statements":**

Let's say we want to opt into PHP 7.4 arrow functions:
Let's say we want to opt into PHP v7.4 arrow functions:

```php
'fn' => [
'search' => 'function (<in_between>)<until>{ <statement>; }',
'search' => 'function (<in_between>)<until>{ return <statement>; }',
'replace' => 'fn (<1>) => <3>',
'tags' => 'php74,refactor',
'mutator' => function ($matches) {
$matches[2][1] = str_replace(['return '], '', $matches[2][1]);

return $matches;
}
]

```
Expand Down

0 comments on commit d5a9072

Please sign in to comment.