Skip to content

PHP String Field is a PhpStorm plugin that adds navigation and reference support for dot notation string parameters.

License

Notifications You must be signed in to change notification settings

re7r/idea-plugin-php-string-field

Repository files navigation

PHP String Field

PHP StringField is a PhpStorm plugin that adds navigation and references support for string parameters of property names.
Including nested fields accessed via dot notation ('profile.avatar.url').

Features

  • Navigation, reference, and find usages support.

Usage

  • Add the @string-field to a @param phpdoc tag, to enable navigation through string path.
  • Use the @string-field:call to interpret the last field to be treated as a callable method.

Example

class User {
     public Profile $profile;

    /**
     * @param string $path @string-field
     */
    public function field(string $path) {
        // ...
    }
}

$user = new User();
$user->field('profile.avatar.url');

Now you can navigate from 'profile.avatar.url' directly to the corresponding property or method in the class.

About

PHP String Field is a PhpStorm plugin that adds navigation and reference support for dot notation string parameters.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages