Skip to content

Commit 282b881

Browse files
committed
Add a template for a class-description
1 parent d131700 commit 282b881

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

Template.php

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?php declare(strict_types=1);
2+
3+
namespace Fig\Attributes;
4+
5+
/**
6+
* One-Line summary of what the attribute does
7+
*
8+
* ## Target audience
9+
*
10+
* Implementors
11+
* : Who should handle this attribute? Example: "static analysis tools"
12+
* Users
13+
* : Who adds this attribute to their code? Example: "packages that want to
14+
* safeguard their functions via static analysis
15+
*
16+
* Long explanation of what the attribute does and why it is relevant.
17+
*
18+
* Use citations[^citation] or [Links](https://example.com) in your text to make
19+
* sure people understand the relevance and where you got your ideas from.
20+
*
21+
* If your Attribute has preconditions for usage you MUST use the keywords
22+
* described in [RFC 2119](https://datatracker.ietf.org/doc/html/rfc2119).
23+
* You SHOULD list them prominently.
24+
*
25+
* **Note:** DocBlock content MUST be Markdown formatted. Check out the
26+
* [Markdown-Guide](https://www.markdownguide.org/) for possible formatting
27+
*
28+
* Please also use code-snippets where appropriate
29+
*
30+
* ```php
31+
* <?php
32+
* echo 'Hello World';
33+
* ```
34+
*
35+
* You MUST describe parameters to your Attribute extensively! You SHOULD use
36+
* the well-known Annotations for that
37+
*
38+
* @param string $example_1 Does x and y
39+
* @param boolean $example_2
40+
*
41+
* [^citation] https://en.wikipedia.org/wiki/Citation
42+
*/
43+
#[\Attribute(\Attribute::TARGET_CLASS)]
44+
final class Template {}

0 commit comments

Comments
 (0)