Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>RJS AssistantNew to Visual Studio Code? Get it now.
RJS Assistant

RJS Assistant

Ralph J. Smit

|
1 install
| (0) | Free
PhpStorm-style PHP refactorings for VS Code — closure/arrow function conversion and more
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

RJS Assistant

PhpStorm-style PHP refactorings for VS Code and Cursor.

Features

Press Alt+Enter (or Ctrl+.) on a PHP closure or arrow function to see available refactorings:

Convert closure to arrow function

// Before
$fn = function (int $x) use ($y) { return $x + $y; };

// After
$fn = fn (int $x) => $x + $y;

The refactoring is offered when the closure:

  • Has exactly one return statement
  • Does not use by-reference captures (use (&$var))
  • Does not have a void return type

Convert arrow function to closure

// Before
$fn = fn (int $x) => $x + $y;

// After
$fn = function (int $x) use ($y) { return $x + $y; };

Automatically detects which outer-scope variables need to be listed in the use() clause.

Supported features

  • Typed parameters and return types are preserved
  • Static closures/arrow functions
  • $this is excluded from the use() clause (auto-bound in non-static closures)
  • Nested closures (refactoring applies to the innermost one at cursor)

Installation

Search for "RJS Assistant" in the VS Code or Cursor extension marketplace, or install from the command line:

code --install-extension ralphjsmit.ralphjsmit-assistant
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft