@@ -71,7 +71,9 @@ discard block |
||
71 | 71 | $files = new \RecursiveIteratorIterator($dir); |
72 | 72 | |
73 | 73 | foreach ($files as $file) { |
74 | - if ($file->isDir()) continue; |
|
74 | + if ($file->isDir()) { |
|
75 | + continue; |
|
76 | + } |
|
75 | 77 | try { |
76 | 78 | $interfaceList[] = new LocalFile($file->getPathname()); |
77 | 79 | } catch (\Exception $e) { |
@@ -102,8 +104,9 @@ discard block |
||
102 | 104 | public function createDirectoryStructure() { |
103 | 105 | foreach ($this->project->getNamespaces() as $namespace) { |
104 | 106 | $namespaceDir = $this->dstDir . str_replace("\\", "/", $namespace->getFqsen()); |
105 | - if (is_dir($namespaceDir)) |
|
106 | - continue; |
|
107 | + if (is_dir($namespaceDir)) { |
|
108 | + continue; |
|
109 | + } |
|
107 | 110 | if (!mkdir($namespaceDir, 0755, true)) { |
108 | 111 | throw new \Exception('Could not create directory '. $namespaceDir); |
109 | 112 | } |
@@ -95,7 +95,9 @@ |
||
95 | 95 | foreach ($method->getArguments() as $argument) { |
96 | 96 | /** @var Param $param */ |
97 | 97 | $param = $params[$argument->getName()]; |
98 | - if ($param !== null) $this->addIndentMultiline(3, ':param ' . RstBuilder::escape($param->getType()) . ' $' . $argument->getName() . ': ' . RstBuilder::escape($param->getDescription()), true); |
|
98 | + if ($param !== null) { |
|
99 | + $this->addIndentMultiline(3, ':param ' . RstBuilder::escape($param->getType()) . ' $' . $argument->getName() . ': ' . RstBuilder::escape($param->getDescription()), true); |
|
100 | + } |
|
99 | 101 | } |
100 | 102 | foreach ($docBlock->getTags() as $tag) { |
101 | 103 | $this->addDocblockTag($tag->getName(), $docBlock); |
@@ -90,37 +90,49 @@ |
||
90 | 90 | $tags = $docBlock->getTagsByName($tag); |
91 | 91 | switch ($tag) { |
92 | 92 | case 'return': |
93 | - if (sizeof($tags) === 0) continue; |
|
93 | + if (sizeof($tags) === 0) { |
|
94 | + continue; |
|
95 | + } |
|
94 | 96 | /** @var Return_ $return */ |
95 | 97 | $return = $tags[0]; |
96 | 98 | $this->addIndentMultiline($indent, ':returns: ' . $return->getType() . ' ' . RstBuilder::escape($return->getDescription()), true); |
97 | 99 | break; |
98 | 100 | case 'throws': |
99 | - if (sizeof($tags) === 0) continue; |
|
101 | + if (sizeof($tags) === 0) { |
|
102 | + continue; |
|
103 | + } |
|
100 | 104 | /** @var Throws $return */ |
101 | 105 | $return = $tags[0]; |
102 | 106 | $this->addIndentMultiline($indent, ':throws: ' . $return->getType() . ' ' . RstBuilder::escape($return->getDescription()), true); |
103 | 107 | break; |
104 | 108 | case 'since': |
105 | - if (sizeof($tags) === 0) continue; |
|
109 | + if (sizeof($tags) === 0) { |
|
110 | + continue; |
|
111 | + } |
|
106 | 112 | /** @var Since $return */ |
107 | 113 | $return = $tags[0]; |
108 | 114 | $this->addIndentMultiline($indent, ':since: ' . $return->getVersion() . ' ' . RstBuilder::escape($return->getDescription()), true); |
109 | 115 | break; |
110 | 116 | case 'deprecated': |
111 | - if (sizeof($tags) === 0) continue; |
|
117 | + if (sizeof($tags) === 0) { |
|
118 | + continue; |
|
119 | + } |
|
112 | 120 | /** @var Deprecated $return */ |
113 | 121 | $return = $tags[0]; |
114 | 122 | $this->addIndentMultiline($indent, ':deprecated: ' . $return->getVersion() . ' ' . RstBuilder::escape($return->getDescription()), true); |
115 | 123 | break; |
116 | 124 | case 'see': |
117 | - if (sizeof($tags) === 0) continue; |
|
125 | + if (sizeof($tags) === 0) { |
|
126 | + continue; |
|
127 | + } |
|
118 | 128 | /** @var See $return */ |
119 | 129 | $return = $tags[0]; |
120 | 130 | $this->addIndentMultiline($indent, ':see: ' . $return->getReference() . ' ' . RstBuilder::escape($return->getDescription()), true); |
121 | 131 | break; |
122 | 132 | case 'license': |
123 | - if (sizeof($tags) === 0) continue; |
|
133 | + if (sizeof($tags) === 0) { |
|
134 | + continue; |
|
135 | + } |
|
124 | 136 | /** @var DocBlock\Tags\BaseTag $return */ |
125 | 137 | $return = $tags[0]; |
126 | 138 | $this->addIndentMultiline($indent, ':license: ' . RstBuilder::escape($return->getDescription()), true); |
@@ -125,16 +125,18 @@ |
||
125 | 125 | $this->addIndentLine(1, '.. rst-class:: ' . $modifiers)->addLine(); |
126 | 126 | $this->addIndentLine(2, '.. php:method:: '.$method->getName().'('.$args.')'); |
127 | 127 | $this->addLine(); |
128 | - if ($docBlock) |
|
129 | - $this->addIndentMultiline(3, $docBlock->getDescription()); |
|
128 | + if ($docBlock) { |
|
129 | + $this->addIndentMultiline(3, $docBlock->getDescription()); |
|
130 | + } |
|
130 | 131 | $this->addLine(); |
131 | 132 | |
132 | 133 | if (!empty($params)) { |
133 | 134 | foreach ($method->getArguments() as $argument) { |
134 | 135 | /** @var Param $param */ |
135 | 136 | $param = $params[$argument->getName()]; |
136 | - if ($param !== null) |
|
137 | - $this->addIndentMultiline(3, ':param ' . $param->getType() . ' $' . $argument->getName() . ': ' . $param->getDescription()); |
|
137 | + if ($param !== null) { |
|
138 | + $this->addIndentMultiline(3, ':param ' . $param->getType() . ' $' . $argument->getName() . ': ' . $param->getDescription()); |
|
139 | + } |
|
138 | 140 | } |
139 | 141 | } |
140 | 142 |