@@ -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 */ |
@@ -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()) . ' {}`'); |
@@ -66,10 +66,10 @@ |
||
66 | 66 | $apiDocBuilder->setVerboseOutput(true); |
67 | 67 | $apiDocBuilder->setDebugOutput(true); |
68 | 68 | } |
69 | - if($input->getOption('public-only')) { |
|
69 | + if ($input->getOption('public-only')) { |
|
70 | 70 | $apiDocBuilder->addExtension(PublicOnlyExtension::class); |
71 | 71 | } |
72 | - if($input->getOption('element-toc')) { |
|
72 | + if ($input->getOption('element-toc')) { |
|
73 | 73 | $apiDocBuilder->addExtension(TocExtension::class); |
74 | 74 | } |
75 | 75 | $apiDocBuilder->build(); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | * @return mixed |
70 | 70 | */ |
71 | 71 | public static function getNamespace(Element $element) { |
72 | - return substr($element->getFqsen(), 0, strlen($element->getFqsen())-strlen('\\'. $element->getName())); |
|
72 | + return substr($element->getFqsen(), 0, strlen($element->getFqsen()) - strlen('\\' . $element->getName())); |
|
73 | 73 | //return str_replace('\\' . $element->getName(), '', $element->getFqsen()); |
74 | 74 | } |
75 | 75 | |
@@ -265,8 +265,8 @@ discard block |
||
265 | 265 | * @param $fqsen string |
266 | 266 | * @return string |
267 | 267 | */ |
268 | - public static function getLink($type, $fqsen, $description='') { |
|
269 | - if($description !== '') { |
|
268 | + public static function getLink($type, $fqsen, $description = '') { |
|
269 | + if ($description !== '') { |
|
270 | 270 | return ':php:' . $type . ':`' . RstBuilder::escape($description) . '<' . RstBuilder::escape(substr($fqsen, 1)) . '>`'; |
271 | 271 | } |
272 | 272 | return ':php:' . $type . ':`' . RstBuilder::escape(substr($fqsen, 1)) . '`'; |