@@ -70,24 +70,24 @@ discard block |
||
| 70 | 70 | */ |
| 71 | 71 | private function findChildNamespaces() |
| 72 | 72 | { |
| 73 | - $currentNamespaceFqsen = (string) $this->currentNamespace->getFqsen(); |
|
| 73 | + $currentNamespaceFqsen = (string)$this->currentNamespace->getFqsen(); |
|
| 74 | 74 | /** @var Namespace_ $namespace */ |
| 75 | 75 | foreach ($this->namespaces as $namespace) { |
| 76 | 76 | // check if not root and doesn't start with current namespace |
| 77 | 77 | if ($currentNamespaceFqsen !== '\\' && strpos( |
| 78 | - (string) $namespace->getFqsen(), |
|
| 79 | - $currentNamespaceFqsen.'\\' |
|
| 78 | + (string)$namespace->getFqsen(), |
|
| 79 | + $currentNamespaceFqsen . '\\' |
|
| 80 | 80 | ) !== 0) { |
| 81 | 81 | continue; |
| 82 | 82 | } |
| 83 | - if ((string) $namespace->getFqsen() !== $currentNamespaceFqsen && strpos( |
|
| 84 | - (string) $namespace->getFqsen(), |
|
| 83 | + if ((string)$namespace->getFqsen() !== $currentNamespaceFqsen && strpos( |
|
| 84 | + (string)$namespace->getFqsen(), |
|
| 85 | 85 | $currentNamespaceFqsen |
| 86 | 86 | ) === 0) { |
| 87 | 87 | // only keep first level children |
| 88 | 88 | $childrenPath = substr( |
| 89 | - (string) $namespace->getFqsen(), |
|
| 90 | - strlen((string) $this->currentNamespace->getFqsen()) + 1 |
|
| 89 | + (string)$namespace->getFqsen(), |
|
| 90 | + strlen((string)$this->currentNamespace->getFqsen()) + 1 |
|
| 91 | 91 | ); |
| 92 | 92 | if (strpos($childrenPath, '\\') === false) { |
| 93 | 93 | $this->childNamespaces[] = $namespace; |
@@ -98,15 +98,15 @@ discard block |
||
| 98 | 98 | |
| 99 | 99 | public function render() |
| 100 | 100 | { |
| 101 | - $currentNamespaceFqsen = (string) $this->currentNamespace->getFqsen(); |
|
| 101 | + $currentNamespaceFqsen = (string)$this->currentNamespace->getFqsen(); |
|
| 102 | 102 | if ($currentNamespaceFqsen !== '\\') { |
| 103 | 103 | $label = str_replace('\\', '-', $currentNamespaceFqsen); |
| 104 | - $this->addLine('.. _namespace'.$label.':')->addLine(); |
|
| 104 | + $this->addLine('.. _namespace' . $label . ':')->addLine(); |
|
| 105 | 105 | $this->addH1(RstBuilder::escape($this->currentNamespace->getName())); |
| 106 | 106 | $this->addLine(self::escape($currentNamespaceFqsen))->addLine(); |
| 107 | 107 | } else { |
| 108 | 108 | $label = 'root-namespace'; |
| 109 | - $this->addLine('.. _namespace-'.$label.':')->addLine(); |
|
| 109 | + $this->addLine('.. _namespace-' . $label . ':')->addLine(); |
|
| 110 | 110 | $this->addH1(RstBuilder::escape('\\')); |
| 111 | 111 | } |
| 112 | 112 | $this->addLine(); |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | continue; |
| 136 | 136 | } |
| 137 | 137 | if ($type === self::RENDER_INDEX_NAMESPACE) { |
| 138 | - $this->addLine($entry->getName().' <'.$entry->getName().'/index>'); |
|
| 138 | + $this->addLine($entry->getName() . ' <' . $entry->getName() . '/index>'); |
|
| 139 | 139 | } else { |
| 140 | 140 | $this->addElementTocEntry($entry); |
| 141 | 141 | } |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | |
| 207 | 207 | private function addElementTocEntry(Fqsen $entry) |
| 208 | 208 | { |
| 209 | - $currentNamespaceFqsen = (string) $this->currentNamespace->getFqsen(); |
|
| 209 | + $currentNamespaceFqsen = (string)$this->currentNamespace->getFqsen(); |
|
| 210 | 210 | $subPath = $entry; |
| 211 | 211 | if ($currentNamespaceFqsen !== '\\' && substr( |
| 212 | 212 | $entry, |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | $subPath = substr($entry, strlen($currentNamespaceFqsen)); |
| 217 | 217 | } |
| 218 | 218 | $path = substr(str_replace('\\', '/', $subPath), 1); |
| 219 | - $this->addLine($entry->getName().' <'.$path.'>'); |
|
| 219 | + $this->addLine($entry->getName() . ' <' . $path . '>'); |
|
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | private function addFunctions() |
@@ -242,10 +242,10 @@ discard block |
||
| 242 | 242 | /** @var Argument $argument */ |
| 243 | 243 | foreach ($function->getArguments() as $argument) { |
| 244 | 244 | // TODO: defaults, types |
| 245 | - $args .= '$'.$argument->getName().', '; |
|
| 245 | + $args .= '$' . $argument->getName() . ', '; |
|
| 246 | 246 | } |
| 247 | 247 | $args = substr($args, 0, -2); |
| 248 | - $this->beginPhpDomain('function', $function->getName().'('.$args.')'); |
|
| 248 | + $this->beginPhpDomain('function', $function->getName() . '(' . $args . ')'); |
|
| 249 | 249 | $this->addDocBlockDescription($function); |
| 250 | 250 | if (!empty($params)) { |
| 251 | 251 | foreach ($function->getArguments() as $argument) { |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | $param = $params[$argument->getName()]; |
| 255 | 255 | if ($param !== null) { |
| 256 | 256 | $this->addMultiline( |
| 257 | - ':param '.self::escape($param->getType()).' $'.$argument->getName().': '.$param->getDescription(), |
|
| 257 | + ':param ' . self::escape($param->getType()) . ' $' . $argument->getName() . ': ' . $param->getDescription(), |
|
| 258 | 258 | true |
| 259 | 259 | ); |
| 260 | 260 | } |