Commit graph

14 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
Rob Lourens
5c0fc719a2 Fix #71138 2019-03-27 15:43:49 -07:00
benjamenhogben
1de8905bf5 Change throwable var name 2018-10-09 14:07:13 +01:00
benjamenhogben
f0b51ea9ad Catch Throwable user editable 2018-10-05 10:59:25 +01:00
benjamenhogben
7d30396d0c Add throwable to try/catch block 2018-10-05 09:48:33 +01:00
Ben Hogben
3edd27449e add php try catch snippet 2018-10-04 17:10:18 +01:00
Martin Aeschlimann
f8217340ad [php] folding snippets 2017-11-30 12:11:21 +01:00
Jacob Lambert
9f8dd87d48 Update PHP snippits 2017-03-09 21:23:15 -07:00
Erich Gamma
8f35cc4768 Hello Code 2015-11-13 14:39:38 +01:00