Commit graph

6 commits

Author SHA1 Message Date
Rob Lourens a8eda33032
Fix invalid php snippet (#192246)
Fix #189561
2023-09-06 02:13:03 +02:00
Rob Lourens 047b9cd0f5
Restore preexisting php snippets (#182929)
That shouldn't have been deleted in #174889
And also bring back one constructor snippet
2023-05-19 02:17:56 +02:00
David Freer 89636b9b4c
PHP Snippets Quality of Life and Continuity (#174889)
* QoL & continuity update to existing php snippets

- Sorted snippets by snippet title for discoverability
- Removed all doc comments from non 'doc_' prefixed snippets
- Added doc_trait for continuity with other patterns
- Updated snippet prefixes
	- Add kvp to keyval
	- Prefixed fun with class_
	- Changed doc_param to doc_var
	- Qualified 'con' to 'constructor' to not be confused with const
- Updated class snippet to default the 'class' placeholder to the file's base name
- Add snippet choices for private, public, protected where appropriate
- Add an additional tab stop to end of functions for additional args/params
- Remove array kvps since arrays can be associative or just values

* Add try catch finally php snippet

* Add param php snippet

* Add php func snippets

- Add fun for a general function out of scope of class
- Add fun_anonymous for anonymous functions
- Add fun_arrow for arrow functions

* Add promotion style constructor to php snippets

* Add property snippet to php snippets

* Add spaceship snippet to php snippets

* Add goto snippet to php snippets

* Add class_const snippet to php snippets

* Add here/now doc snippets to php snippets

* Add namespace related snippets to php snippets

* Add superglobal snippets to php snippets

* Add php 8 snippets

- Add match expression
- Add Attribute snippets
  - Add sensitive parameter
  - Add attribute target
  - Add attribute with target
- Rename class_const to const
- Add Dynamic Property Class snippet
- Add enum snippets
  - Basic Enum
  - Backed Enum
  - foreach enum

* Merge master to resolve conflict

* Remove php snippets as candidates

- Remove heredoc
- Remove nowdoc
- Remove php super global snippets
- Remove namespace_path
- Remove ethis (echo $this->)
- Remove try/catch finally

* Trim snippets

---------

Co-authored-by: Rob Lourens <roblourens@gmail.com>
2023-05-18 14:46:36 -07:00
Harald Kirschner ea5b244abd
File snippets for HTML and PHP (#161881)
* Adding file snippets for HTML and PHP to start small.

* Adding TS
2022-09-27 08:15:57 -07:00
Logan Ramos 63fad00228
Fix misspelling of parameters 2021-07-14 10:48:12 -04:00
Martin Aeschlimann d5e12a12dd Use code-snippet suffix for extension snippets. Fixes #94625 2020-04-08 10:12:23 +02:00
Renamed from extensions/php/snippets/php.snippets.json (Browse further)