Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | /** |
| 6 | * Fast Forward Development Tools for PHP projects. |
| 7 | * |
| 8 | * This file is part of fast-forward/dev-tools project. |
| 9 | * |
| 10 | * @author Felipe Sayão Lobato Abreu <github@mentordosnerds.com> |
| 11 | * @license https://opensource.org/licenses/MIT MIT License |
| 12 | * |
| 13 | * @see https://github.com/php-fast-forward/ |
| 14 | * @see https://github.com/php-fast-forward/dev-tools |
| 15 | * @see https://github.com/php-fast-forward/dev-tools/issues |
| 16 | * @see https://php-fast-forward.github.io/dev-tools/ |
| 17 | * @see https://datatracker.ietf.org/doc/html/rfc2119 |
| 18 | */ |
| 19 | |
| 20 | namespace FastForward\DevTools\Composer\Json\Schema; |
| 21 | |
| 22 | /** |
| 23 | * Defines the contract for representing the "support" section of a composer.json file. |
| 24 | * |
| 25 | * The support section contains optional metadata intended to help users, contributors, |
| 26 | * and integrators obtain assistance, report issues, review documentation, access source |
| 27 | * code, and follow project communication channels. |
| 28 | * |
| 29 | * Implementations of this interface MUST provide string-based accessors for each supported |
| 30 | * support entry defined by Composer metadata conventions. Since the "support" section is |
| 31 | * optional, implementations MAY return an empty string when a given support entry is not |
| 32 | * defined. Implementations SHOULD return normalized and human-usable values whenever possible. |
| 33 | * |
| 34 | * URL-based values SHOULD be fully qualified. The IRC value SHOULD follow the format |
| 35 | * "irc://server/channel" when provided. The email value SHOULD represent a valid support |
| 36 | * email address when available. |
| 37 | * |
| 38 | * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", |
| 39 | * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this |
| 40 | * interface are to be interpreted as described in RFC 2119. |
| 41 | */ |
| 42 | interface SupportInterface |
| 43 | { |
| 44 | /** |
| 45 | * Retrieves the support email address. |
| 46 | * |
| 47 | * This method MUST return the email address intended for support requests. |
| 48 | * Implementations MAY return an empty string when no support email is defined. |
| 49 | * Implementations SHOULD return a syntactically valid email address. |
| 50 | * |
| 51 | * @return string the support email address |
| 52 | */ |
| 53 | public function getEmail(): string; |
| 54 | |
| 55 | /** |
| 56 | * Retrieves the URL to the issue tracker. |
| 57 | * |
| 58 | * This method MUST return the URL used to report bugs, request features, |
| 59 | * or otherwise track issues related to the project. |
| 60 | * Implementations MAY return an empty string when no issue tracker is defined. |
| 61 | * Implementations SHOULD return a fully qualified URL. |
| 62 | * |
| 63 | * @return string the issue tracker URL |
| 64 | */ |
| 65 | public function getIssues(): string; |
| 66 | |
| 67 | /** |
| 68 | * Retrieves the URL to the support forum. |
| 69 | * |
| 70 | * This method MUST return the URL of the forum intended for community support |
| 71 | * or project-related discussions. |
| 72 | * Implementations MAY return an empty string when no forum is defined. |
| 73 | * Implementations SHOULD return a fully qualified URL. |
| 74 | * |
| 75 | * @return string the forum URL |
| 76 | */ |
| 77 | public function getForum(): string; |
| 78 | |
| 79 | /** |
| 80 | * Retrieves the URL to the project wiki. |
| 81 | * |
| 82 | * This method MUST return the URL of the wiki that provides project knowledge, |
| 83 | * guides, or collaborative documentation. |
| 84 | * Implementations MAY return an empty string when no wiki is defined. |
| 85 | * Implementations SHOULD return a fully qualified URL. |
| 86 | * |
| 87 | * @return string the wiki URL |
| 88 | */ |
| 89 | public function getWiki(): string; |
| 90 | |
| 91 | /** |
| 92 | * Retrieves the IRC channel for support. |
| 93 | * |
| 94 | * This method MUST return the IRC endpoint intended for project support. |
| 95 | * Implementations MAY return an empty string when no IRC channel is defined. |
| 96 | * Implementations SHOULD return the value in the format "irc://server/channel". |
| 97 | * |
| 98 | * @return string the IRC support channel |
| 99 | */ |
| 100 | public function getIrc(): string; |
| 101 | |
| 102 | /** |
| 103 | * Retrieves the URL to browse or download the project source code. |
| 104 | * |
| 105 | * This method MUST return the source URL associated with the project. |
| 106 | * Implementations MAY return an empty string when no source URL is defined. |
| 107 | * Implementations SHOULD return a fully qualified URL. |
| 108 | * |
| 109 | * @return string the source code URL |
| 110 | */ |
| 111 | public function getSource(): string; |
| 112 | |
| 113 | /** |
| 114 | * Retrieves the URL to the project documentation. |
| 115 | * |
| 116 | * This method MUST return the URL that points to official documentation |
| 117 | * or usage guides for the project. |
| 118 | * Implementations MAY return an empty string when no documentation URL is defined. |
| 119 | * Implementations SHOULD return a fully qualified URL. |
| 120 | * |
| 121 | * @return string the documentation URL |
| 122 | */ |
| 123 | public function getDocs(): string; |
| 124 | |
| 125 | /** |
| 126 | * Retrieves the URL to the RSS feed. |
| 127 | * |
| 128 | * This method MUST return the RSS feed URL when the project provides syndicated updates. |
| 129 | * Implementations MAY return an empty string when no RSS feed is defined. |
| 130 | * Implementations SHOULD return a fully qualified URL. |
| 131 | * |
| 132 | * @return string the RSS feed URL |
| 133 | */ |
| 134 | public function getRss(): string; |
| 135 | |
| 136 | /** |
| 137 | * Retrieves the URL to the chat channel. |
| 138 | * |
| 139 | * This method MUST return the URL for the project's chat-based support |
| 140 | * or communication channel. |
| 141 | * Implementations MAY return an empty string when no chat channel is defined. |
| 142 | * Implementations SHOULD return a fully qualified URL. |
| 143 | * |
| 144 | * @return string the chat channel URL |
| 145 | */ |
| 146 | public function getChat(): string; |
| 147 | |
| 148 | /** |
| 149 | * Retrieves the URL to the vulnerability disclosure policy. |
| 150 | * |
| 151 | * This method MUST return the URL that describes how security vulnerabilities |
| 152 | * SHALL be reported to the project maintainers. |
| 153 | * Implementations MAY return an empty string when no security policy is defined. |
| 154 | * Implementations SHOULD return a fully qualified URL. |
| 155 | * |
| 156 | * @return string the vulnerability disclosure policy URL |
| 157 | */ |
| 158 | public function getSecurity(): string; |
| 159 | } |