https://github.com/datlechin/vscode-phpstorm-snippets
PHPStorm Snippets for VS Code.
https://github.com/datlechin/vscode-phpstorm-snippets
Last synced: about 2 months ago
JSON representation
PHPStorm Snippets for VS Code.
- Host: GitHub
- URL: https://github.com/datlechin/vscode-phpstorm-snippets
- Owner: datlechin
- License: mit
- Created: 2023-08-14T17:40:57.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-26T13:56:54.000Z (almost 2 years ago)
- Last Synced: 2024-12-25T17:42:58.391Z (12 months ago)
- Homepage: https://marketplace.visualstudio.com/items?itemName=ngoquocdat.vscode-phpstorm-snippets
- Size: 436 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# PHPStorm Snippets for VS Code
This extension provides you with a set of handy code snippets inspired by PHPStorm, a popular integrated development environment (IDE) for PHP development. With these snippets, you can increase your productivity and speed up your coding process while working with PHP code in Visual Studio Code.
## Features
This extension includes the following PHPStorm-inspired code snippets:
| Trigger | Snippet | Description |
| ------------- | ---------------------------------------------------- | ------------------------------------- |
| `it` | `it('', function () { ... });` | Create a pest it test |
| `test` | `test('', function () { ... });` | Create a pest it test |
| `ctor` | `public function __construct() { ... }` | Constructor method |
| `eco` | `echo '';` | Echo statement |
| `t` | `$this->` | `$this` reference |
| `thr` | `throw new` | Throw statement |
| `fore` | `foreach ( as $item) { ... }` | `foreach` loop |
| `forek` | `foreach (interable_expr as $key => $value) { ... }` | `foreach` loop with key and value |
| `fori` | `for ($i = 0; $i < $length; $i++) { ... }` | `for` loop |
| `rer` | `require '';` | Require statement |
| `rero` | `require_once '';` | Require_once statement |
| `inc` | `include '';` | Include statement |
| `inco` | `include_once '';` | Include_once statement |
| `__invoke` | `public function __invoke() { ... }` | Magic `__invoke` method |
| `__construct` | `public function __construct() { ... }` | Constructor method |
| `fun` | `function () { ... }` | Generic function declaration |
| `prif` | `private function () { ... }` | Private function declaration |
| `prisf` | `private static function () { ... }` | Private static function declaration |
| `prosf` | `protected static function () { ... }` | Protected static function declaration |
| `prof` | `protected function () { ... }` | Protected function declaration |
| `pubf` | `public function () { ... }` | Public function declaration |
| `pubsf` | `public static function () { ... }` | Public static function declaration |
## License
PHPStorm Snippets is open-sourced software licensed under [the MIT license](./LICENSE).