@@ 30-52 (lines=23) @@ | ||
27 | use phpDocumentor\Reflection\Php\Interface_; |
|
28 | ||
29 | ||
30 | class InterfaceFileBuilder extends FileBuilder { |
|
31 | ||
32 | protected function render() { |
|
33 | /** @var Interface_ $interface */ |
|
34 | $interface = $this->element; |
|
35 | ||
36 | if (!$this->shouldRenderElement($interface)) { |
|
37 | return; |
|
38 | } |
|
39 | ||
40 | $docBlock = $interface->getDocBlock(); |
|
41 | $this->addPageHeader($interface); |
|
42 | ||
43 | $this->indent(); |
|
44 | $this->addDocBlockDescription($interface); |
|
45 | $this->addParent($interface); |
|
46 | $this->unindent(); |
|
47 | ||
48 | $this->addConstants($interface->getConstants()); |
|
49 | $this->addMethods($interface->getMethods()); |
|
50 | } |
|
51 | ||
52 | } |
@@ 31-53 (lines=23) @@ | ||
28 | use phpDocumentor\Reflection\Php\Class_; |
|
29 | use phpDocumentor\Reflection\Php\Trait_; |
|
30 | ||
31 | class TraitFileBuilder extends FileBuilder { |
|
32 | ||
33 | protected function render() { |
|
34 | /** @var Trait_ $trait */ |
|
35 | $trait = $this->element; |
|
36 | ||
37 | if (!$this->shouldRenderElement($trait)) { |
|
38 | return; |
|
39 | } |
|
40 | ||
41 | $this->addPageHeader($trait); |
|
42 | ||
43 | $this->indent(); |
|
44 | $this->addDocBlockDescription($trait); |
|
45 | $this->addUsedTraits($trait); |
|
46 | $this->unindent(); |
|
47 | ||
48 | $this->addProperties($trait->getProperties()); |
|
49 | ||
50 | $this->addMethods($trait->getMethods()); |
|
51 | } |
|
52 | ||
53 | } |