You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use Cspray\ArchitecturalDecision\DocBlockArchitecturalDecision;
41
41
use Attribute;
42
+
use DateTimeImmutable;
42
43
43
44
/**
44
45
* Explain the decision and its potential business impact.
45
46
*/
46
47
#[Attribute]
47
48
final class MyFirstDecision extends DocBlockArchitecturalDecision {
48
49
49
-
public function getDate() : string {
50
-
return '2022-07-19';
50
+
public function date() : DateTimeImmutable {
51
+
return new DateTimeImmutable('2022-07-19');
51
52
}
52
53
53
-
public function getStatus() : string|DecisionStatus {
54
+
public function status() : string|DecisionStatus {
54
55
return DecisionStatus::Draft;
55
56
}
56
57
@@ -67,7 +68,7 @@ If successful a file named `architectural-decisions.xml` will be generated and s
67
68
68
69
### Setting Custom Meta Data
69
70
70
-
There might be additional information you'd like to include with an ArchitecturalDecisionRecord that doesn't fit into the contents of the decision. Perhaps it is additional data that can be used with static analysis. Perhaps you like to include information about who authored the decision or some other meta-data. You can implement the `ArchitecturalDecisionRecord::setMetaData(DOMElement $meta)` method to add whatever data you'd like to the generated XML document. Please review the [DOMDocument]() documentation for how to appropriately add elements and attribute to the `<meta>` element.
71
+
There might be additional information you'd like to include with an ArchitecturalDecisionRecord that doesn't fit into the contents of the decision. Perhaps it is additional data that can be used with static analysis. Perhaps you like to include information about who authored the decision or some other meta-data. You can implement the `ArchitecturalDecisionRecord::setMetaData(DOMElement $meta)` method to add whatever data you'd like to the generated XML document. Please review the [DOMDocument](https://www.php.net/domdocument) documentation for how to appropriately add elements and attribute to the `<meta>` element.
0 commit comments