Skip to content

Commit fcc04c8

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

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

Template.php

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

0 commit comments

Comments
 (0)