From fcc04c8a6cd8792615ea7c4c9cbd77e5b0b2f352 Mon Sep 17 00:00:00 2001 From: Andreas Heigl Date: Tue, 30 Sep 2025 07:06:52 +0200 Subject: [PATCH 1/3] Add a template for a class-description --- Template.php | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Template.php diff --git a/Template.php b/Template.php new file mode 100644 index 0000000..eee1adc --- /dev/null +++ b/Template.php @@ -0,0 +1,46 @@ + Date: Tue, 30 Sep 2025 18:51:28 +0200 Subject: [PATCH 2/3] Improve the text according to reviews This incorporates the suggestions from @crell and @jrfnl Thanks for the input! The main change is adding a function and moving the function-description into the subsection --- Template.php | 44 +++++++++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/Template.php b/Template.php index eee1adc..08aacd8 100644 --- a/Template.php +++ b/Template.php @@ -5,7 +5,7 @@ namespace Fig\Attributes; /** - * One-Line summary of what the attribute does + * One-Line summary of what the attribute does (PLAIN TEXT!) * * ## Target audience * @@ -13,34 +13,56 @@ * : Who should handle this attribute? Example: "static analysis tools" * Users * : Who adds this attribute to their code? Example: "packages that want to - * safeguard their functions via static analysis + * safeguard their functions via static analysis" + * + * ## Purpose * * Long explanation of what the attribute does and why it is relevant. * * Use citations[^citation] or [Links](https://example.com) in your text to make * sure people understand the relevance and where you got your ideas from. * + * ## When should the attribute be applied ? + * * If your Attribute has preconditions for usage you MUST use the keywords * described in [RFC 2119](https://datatracker.ietf.org/doc/html/rfc2119). * You SHOULD list them prominently. * * **Note:** DocBlock content MUST be Markdown formatted. Check out the * [Markdown-Guide](https://www.markdownguide.org/) for possible formatting + * and keep in mind that the short description should not contain markdown. + * + * Keep your lines at a maximum of 80 Characters. It increases readability on + * smaller windows. * * Please also use code-snippets where appropriate * * ```php - * Date: Fri, 10 Oct 2025 07:27:45 +0200 Subject: [PATCH 3/3] Improve template-file This movedthe template-file from a PHP-file to a markdown-file to not block the `template` name for an attribute. It also enhances the content slightly by referencing PSR-5, using dots at the end of all the subject lines, changing "function" to "method" in one place and extend the description of a parameter to show that multi-line is possible there as well. --- .editorconfig | 3 ++- Template.php => Template.md | 25 ++++++++++++++++--------- 2 files changed, 18 insertions(+), 10 deletions(-) rename Template.php => Template.md (75%) diff --git a/.editorconfig b/.editorconfig index cd8eb86..a8fbc70 100644 --- a/.editorconfig +++ b/.editorconfig @@ -10,6 +10,7 @@ indent_style = space end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true +max_line_length = 80 [*.md] -trim_trailing_whitespace = false +trim_trailing_whitespace = true diff --git a/Template.php b/Template.md similarity index 75% rename from Template.php rename to Template.md index 08aacd8..d7b4e77 100644 --- a/Template.php +++ b/Template.md @@ -1,3 +1,6 @@ +# A template for an attribute definition + +```php