Skip to content

Commit 0e0a6e1

Browse files
committed
Merge branch 'dev-master': some doc fixes before release
2 parents 7766f1c + e7dfd66 commit 0e0a6e1

File tree

3 files changed

+25
-24
lines changed

3 files changed

+25
-24
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Files
22
*.orig
33
*.php
4-
.vsco*
4+
.vscode/**
55

66
# Dir
77
node_modules

.vscodeignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.vscode/**
2+
.vscode-test/**
3+
.gitignore
4+
vsc-extension-quickstart.md

README.md

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# PHP awesome snippets - VScode extension
1+
# PHP Awesome Snippets - VScode extension
22

33
[![VScode](https://img.shields.io/badge/Extension-VScode-blueviolet.svg)](https://marketplace.visualstudio.com/items?itemName=hakcorp.php-awesome-snippets)
44
![Snippets](https://img.shields.io/badge/Type-Snippets-yellow.svg)
@@ -9,13 +9,13 @@
99
[![PSR-12](https://img.shields.io/badge/Standard-PSR--12-%2326A69A.svg)](https://github.com/php-fig/fig-standards/blob/master/proposed/extended-coding-style-guide.md)
1010
[![MIT](https://img.shields.io/badge/License-MIT-%2300C853.svg)](https://github.com/h4kst3r/php-awesome-snippets/blob/master/LICENSE)
1111

12-
[![SemVer](https://img.shields.io/badge/dynamic/json.svg?color=B71C1C&label=SemVer&query=%24.version&url=https%3A%2F%2Fgithub.com%2Fh4kst3r%2Fphp-awesome-snippets%2Fblob%2Fmaster%2Fpackage.json)](https://github.com/h4kst3r/php-awesome-snippets/blob/master/CHANGELOG.md)
12+
[![SemVer](https://img.shields.io/badge/SemVer-1.1.0-%23B71C1C.svg)](https://github.com/h4kst3r/php-awesome-snippets/blob/master/CHANGELOG.md)
1313

1414
This [VScode extension](https://marketplace.visualstudio.com/items?itemName=hakcorp.php-awesome-snippets) provide a fullset of snippets for PHP devs. It's pretty simple !
1515

1616
You can use it to avoid wasting time typing Class blocks, function signatures or other common PHP statements.
1717

18-
![Demo PHP awesome snippet](https://github.com/h4kst3r/php-awesome-snippets/blob/master/img/snipdemo.gif)
18+
![Demo PHP Awesome Snippets](./img/snipdemo.gif)
1919

2020
The code generated is as compliant as possible with [PSR-1](https://www.php-fig.org/psr/psr-1/), [PSR-2](https://www.php-fig.org/psr/psr-2/) and [PSR-12](https://github.com/php-fig/fig-standards/blob/master/proposed/extended-coding-style-guide.md) (*Review* stage) coding standard provided by [PHP-FIG](https://www.php-fig.org/).
2121

@@ -26,16 +26,16 @@ This work is inspired by PHPstorm (*PHP Live Templates*) and other works availab
2626
## Usage
2727
Type a snippet (or part of it), press `Enter` or `Tab` (if `editor.tabCompletion` set to `true` in your settings) and the snippet will expand just right there.
2828

29-
> ***Tip:*** Snippets provided in this extension support `tab` to next/previous placeholder.
29+
> ***Tip :*** Snippets provided in this extension support `tab` to next/previous placeholder.
3030
31-
These snippets are meant to work in *PHP* context (VScode file). However there are also available in *Plain Text* files for convenience and PHP tags are available in *HTML* one.
31+
These snippets are meant to work in *PHP* context (VScode file). However there are also available in *Plain Text* files for convenience and PHP tags are available in *HTML* ones.
3232

3333
## Features
3434

3535
These snippets try to be **as intuitive as possible** and to avoid conflicts with previous or built-in snippets.
3636

3737
Placeholders are quite *'easy to use'* though some need optimizations.
38-
> ***Tip:*** If you want to use snippets and completion in placeholders
38+
> ***Tip :*** If you want to use snippets and completion in placeholders
3939
> look at the [Extension settings](#ext-settings) section.
4040
4141
----
@@ -70,8 +70,8 @@ Placeholders are quite *'easy to use'* though some need optimizations.
7070
| --- | --- |
7171
| arr | `[value, value, ...];` |
7272
| ark | `['key' => value, 'key' => value,...]` |
73-
| kv | `'key' => value,` *[1]* |
74-
| va | `value, ` *[1]* |
73+
| kv | `'key' => value,` **[1]** |
74+
| va | `value, ` **[1]** |
7575

7676
* **[1]** Addon snippet: use with `arr` or `ark` snippet to add `value` or `key => value` if needed.
7777

@@ -99,8 +99,7 @@ Placeholders are quite *'easy to use'* though some need optimizations.
9999
| fna | `function (Type $args): void {...}` |
100100
| fnu | `function (Type $args) use ($vars): void {...}` |
101101

102-
> ***Tip:*** You can call `functions` snippets above without type hinting
103-
> and return type (**PHP5 compatible**) by using **`-`** as prefix.
102+
***Tip :*** You can call `functions` snippets above without type hinting and return type (**PHP5 compatible**) by using **`-`** as prefix.
104103
> * `-fna` for `function ($args) {...}` *(anonymous function block)*
105104
106105
----
@@ -112,13 +111,13 @@ Placeholders are quite *'easy to use'* though some need optimizations.
112111
| ifel | `if (condition) {...} else {...}` |
113112
| ifelif | `if (condition) {...} elseif (condition) {...} else {...}` |
114113
| sw | `switch ($variable) { case 'label': ... break; ... default: ... break; }` |
115-
| cs | `case 'label': ... break;` *[1]* |
114+
| cs | `case 'label': ... break;` **[1]** |
116115
| tern | `condition ? if_true : if_false;` |
117116

118117
* **[1]** Addon snippet: use with `sw` snippet to add `case` if needed.
119118

120-
> ***Tip:*** The others `if` `else` forms are also available if needed:
121-
>
119+
***Tip :*** The others `if` `else` forms are also available if needed:
120+
122121
> | Snippet | Output |
123122
> | --- | --- |
124123
> | ifend | `if (condition): ... endif;` |
@@ -136,8 +135,8 @@ Placeholders are quite *'easy to use'* though some need optimizations.
136135
| wl | `while ($variable <= $limit) {...}` |
137136
| dowl | `do {...} while ($variable <= $limit);` |
138137

139-
> ***Tip:*** The others loop forms are also available if needed:
140-
>
138+
***Tip :*** The others loop forms are also available if needed:
139+
141140
> | Snippet | Output |
142141
> | --- | --- |
143142
> | foren | `foreach ($iterable as $item): {...} endforeach;` |
@@ -158,8 +157,7 @@ Placeholders are quite *'easy to use'* though some need optimizations.
158157
| inx | `interface InterfaceName extends Interfaces {...}` |
159158
| trt | `trait TraitName {...}` |
160159

161-
> ***Tip:*** You can call `Class` snippets above with `abstract` or `final` form
162-
> by using **`a`** or **`f`** as prefix.
160+
***Tip :*** You can call `Class` snippets above with `abstract` or `final` form by using **`a`** or **`f`** as prefix.
163161
> * `acl` for `abstract class ClassName {...}`
164162
> * `fcli` for `final class ClassName implements Interfaces {...}`
165163
@@ -188,13 +186,12 @@ Placeholders are quite *'easy to use'* though some need optimizations.
188186
| prif | `private function methodName(Type $args): void {...}` |
189187
| prisf | `private static function methodName(Type $args): void {...}` |
190188

191-
> ***Tip:*** You can call `methods` snippets above with `abstract` or `final` form
192-
> by using **`a`** or **`f`** as prefix.
189+
***Tip :*** You can call `methods` snippets above with `abstract` or `final` form by using **`a`** or **`f`** as prefix.
193190
> * `aprof` for `abstract protected function methodName(Type $args): void {...}`
194191
> * `fpubsf` for `final public static function methodName(Type $args): void {...}`
195192
196-
> ***Tip:*** You can call `methods` snippets above without type hinting
197-
> and return type (**PHP5 compatible**) by using **`-`** as prefix.
193+
***Tip :*** You can call `methods` snippets above without type hinting
194+
and return type (**PHP5 compatible**) by using **`-`** as prefix.
198195
> * `-apubf` for `abstract public function methodName(parameters) {...}`
199196
200197
----
@@ -204,8 +201,8 @@ Placeholders are quite *'easy to use'* though some need optimizations.
204201
| --- | --- |
205202
| tryc | `try {...} catch (\Throwable $e) {...}` |
206203
| tryf | `try {...} catch (\Throwable $e) {...} finally {...}` |
207-
| cat | `catch (\Throwable $e) {...}` *[1]* |
208-
| fy | `finally {...}` *[2]* |
204+
| cat | `catch (\Throwable $e) {...}` **[1]** |
205+
| fy | `finally {...}` **[2]** |
209206
| thr | `throw new SomeException("Error statement");` |
210207

211208
* **[1]** Addon snippet: use with `tryc` or `tryf` snippet to add `catch` if needed.

0 commit comments

Comments
 (0)