https://github.com/vix-4800/php-typehints-vsc
Display parameter names and return types as inlay hints for PHP
https://github.com/vix-4800/php-typehints-vsc
php typehints vscode-extension
Last synced: about 1 month ago
JSON representation
Display parameter names and return types as inlay hints for PHP
- Host: GitHub
- URL: https://github.com/vix-4800/php-typehints-vsc
- Owner: vix-4800
- License: mit
- Created: 2025-12-13T16:18:06.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-01-10T06:01:52.000Z (about 2 months ago)
- Last Synced: 2026-01-13T19:48:56.025Z (about 2 months ago)
- Topics: php, typehints, vscode-extension
- Language: PHP
- Homepage: https://marketplace.visualstudio.com/items?itemName=vix.php-typehints-vsc
- Size: 1.11 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PHP Type Hints
Display parameter names and return types as inlay hints for PHP.
## Features
- **Parameter Hints**: Shows parameter names before arguments in function and method calls
- **Return Type Hints**: Displays inferred return types for functions without explicit type declarations
- **Interactive Hints**: Click on hints to insert them into your code!
- Click on parameter hints to add named parameters (PHP 8.0+)
- Click on return type hints to add type annotations
- **Smart Detection**: Automatically hides hints for named arguments (PHP 8.0+)
- **Configurable**: Hide hints when variable names match parameter names
- **LSP-Powered**: Leverages Language Server Protocol for accurate type information
## Screenshot

## Requirements
- [Intelephense](https://marketplace.visualstudio.com/items?itemName=bmewburn.vscode-intelephense-client) extension
must be installed and active
## Configuration
```jsonc
{
// Enable or disable all type hints
"phpTypeHints.enabled": true,
// Show parameter name hints for function calls
"phpTypeHints.showParameterHints": true,
// Show return type hints for function declarations
"phpTypeHints.showReturnTypeHints": true,
// Hide hint when variable name matches parameter name
"phpTypeHints.hideWhenArgumentMatchesName": true,
// Maximum file size to process (in bytes)
"phpTypeHints.maxFileSize": 100000
}
```
## Commands
- **PHP Type Hints: Toggle Hints** - Quickly enable/disable all hints
- **PHP Type Hints: Insert Named Parameter** - Insert a named parameter (triggered by clicking hint)
- **PHP Type Hints: Insert Return Type** - Insert a return type annotation (triggered by clicking hint)
## Development
### Install Dependencies
```bash
npm install
```
### Compile
```bash
npm run compile
```
### Run Tests
```bash
npm test
```
### Create VSIX Package
```bash
npm run package
```
## License
[MIT License](LICENSE)
## Alternatives
- [PhpStorm Parameter Hints in VScode](https://marketplace.visualstudio.com/items?itemName=MrChetan.phpstorm-parameter-hints-in-vscode)