File tree Expand file tree Collapse file tree 2 files changed +29
-2
lines changed
src/phpDocumentor/Reflection
tests/phpDocumentor/Reflection Expand file tree Collapse file tree 2 files changed +29
-2
lines changed Original file line number Diff line number Diff line change @@ -303,6 +303,24 @@ public function getLongDescription()
303
303
}
304
304
305
305
/**
306
+ * Returns whether this DocBlock is the start of a Template section.
307
+ *
308
+ * A Docblock may serve as template for a series of subsequent DocBlocks. This is indicated by a special marker
309
+ * (`#@+`) that is appended directly after the opening `/**` of a DocBlock.
310
+ *
311
+ * An example of such an opening is:
312
+ *
313
+ * ```
314
+ * /**#@+
315
+ * * My DocBlock
316
+ * * /
317
+ * ```
318
+ *
319
+ * The description and tags (not the summary!) are copied onto all subsequent DocBlocks and also applied to all
320
+ * elements that follow until another DocBlock is found that contains the closing marker (`#@-`).
321
+ *
322
+ * @see self::isTemplateEnd() for the check whether a closing marker was provided.
323
+ *
306
324
* @return boolean
307
325
*/
308
326
public function isTemplateStart ()
@@ -311,6 +329,10 @@ public function isTemplateStart()
311
329
}
312
330
313
331
/**
332
+ * Returns whether this DocBlock is the end of a Template section.
333
+ *
334
+ * @see self::isTemplateStart() for a more complete description of the Docblock Template functionality.
335
+ *
314
336
* @return boolean
315
337
*/
316
338
public function isTemplateEnd ()
Original file line number Diff line number Diff line change @@ -71,8 +71,7 @@ public function testConstruct()
71
71
72
72
/**
73
73
* @covers \phpDocumentor\Reflection\DocBlock::splitDocBlock
74
- * @group test
75
- *
74
+ *
76
75
* @return void
77
76
*/
78
77
public function testConstructWithTagsOnly ()
@@ -92,6 +91,9 @@ public function testConstructWithTagsOnly()
92
91
$ this ->assertFalse ($ object ->hasTag ('category ' ));
93
92
}
94
93
94
+ /**
95
+ * @covers \phpDocumentor\Reflection\DocBlock::isTemplateStart
96
+ */
95
97
public function testIfStartOfTemplateIsDiscovered ()
96
98
{
97
99
$ fixture = <<<DOCBLOCK
@@ -110,6 +112,9 @@ public function testIfStartOfTemplateIsDiscovered()
110
112
$ this ->assertTrue ($ object ->isTemplateStart ());
111
113
}
112
114
115
+ /**
116
+ * @covers \phpDocumentor\Reflection\DocBlock::isTemplateEnd
117
+ */
113
118
public function testIfEndOfTemplateIsDiscovered ()
114
119
{
115
120
$ fixture = <<<DOCBLOCK
You can’t perform that action at this time.
0 commit comments