@@ -32,7 +32,7 @@ |
||
32 | 32 | /** @var Project */ |
33 | 33 | protected $project; |
34 | 34 | |
35 | - public function __construct(Project &$project) { |
|
35 | + public function __construct(Project&$project) { |
|
36 | 36 | $this->project = $project; |
37 | 37 | } |
38 | 38 |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | private $indentLevel = 0; |
37 | 37 | /** @var string */ |
38 | - protected $content = '.. rst-class:: phpdoctorst' . PHP_EOL . PHP_EOL ; |
|
38 | + protected $content = '.. rst-class:: phpdoctorst' . PHP_EOL . PHP_EOL; |
|
39 | 39 | |
40 | 40 | public function getContent() { |
41 | 41 | return $this->content; |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | } |
59 | 59 | |
60 | 60 | public function addFieldList($key, $value) { |
61 | - $this->addLine(':'.self::escape($key).':'); |
|
61 | + $this->addLine(':' . self::escape($key) . ':'); |
|
62 | 62 | $this->indent()->addMultiline($value, true)->unindent(); |
63 | 63 | return $this; |
64 | 64 | } |
@@ -209,7 +209,7 @@ |
||
209 | 209 | $this->log('Build indexes.'); |
210 | 210 | $namespaces = $this->project->getNamespaces(); |
211 | 211 | $namespaces['\\'] = $this->project->getRootNamespace(); |
212 | - usort($namespaces, function (Namespace_ $a, Namespace_ $b) { |
|
212 | + usort($namespaces, function(Namespace_ $a, Namespace_ $b) { |
|
213 | 213 | return strcmp($a->getFqsen(), $b->getFqsen()); |
214 | 214 | }); |
215 | 215 | /** @var Namespace_ $namespace */ |
@@ -62,7 +62,7 @@ |
||
62 | 62 | $apiDocBuilder->setVerboseOutput(true); |
63 | 63 | $apiDocBuilder->setDebugOutput(true); |
64 | 64 | } |
65 | - if($input->getOption('public-only')) { |
|
65 | + if ($input->getOption('public-only')) { |
|
66 | 66 | $apiDocBuilder->addExtension(PublicOnlyExtension::class); |
67 | 67 | } |
68 | 68 | $apiDocBuilder->build(); |
@@ -68,7 +68,7 @@ |
||
68 | 68 | * @return mixed |
69 | 69 | */ |
70 | 70 | public static function getNamespace(Element $element) { |
71 | - return substr($element->getFqsen(), 0, strlen($element->getFqsen())-strlen('\\'. $element->getName())); |
|
71 | + return substr($element->getFqsen(), 0, strlen($element->getFqsen()) - strlen('\\' . $element->getName())); |
|
72 | 72 | //return str_replace('\\' . $element->getName(), '', $element->getFqsen()); |
73 | 73 | } |
74 | 74 |
@@ -44,7 +44,7 @@ |
||
44 | 44 | */ |
45 | 45 | public function render($type, &$builder, $element) { |
46 | 46 | if ($type === PhpDomainBuilder::SECTION_AFTER_DESCRIPTION) { |
47 | - if($element instanceof Class_ || $element instanceof Interface_ || $element instanceof Trait_) { |
|
47 | + if ($element instanceof Class_ || $element instanceof Interface_ || $element instanceof Trait_) { |
|
48 | 48 | $builder->addLine(); |
49 | 49 | /** @var Interface_ $interface */ |
50 | 50 | $interface = $builder->getElement(); |
@@ -47,7 +47,7 @@ |
||
47 | 47 | return; |
48 | 48 | } |
49 | 49 | if ($type === PhpDomainBuilder::SECTION_BEFORE_DESCRIPTION) { |
50 | - if($element instanceof Class_) { |
|
50 | + if ($element instanceof Class_) { |
|
51 | 51 | $modifiers = $element->isAbstract() ? 'abstract' : ''; |
52 | 52 | $modifiers = $element->isFinal() ? ' final' : $modifiers; |
53 | 53 | $builder->addLine(':php:`' . $modifiers . ' class ' . RstBuilder::escape($builder->getElement()->getName()) . ' {}`'); |