@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | * Get the first word from a string and remove it from the string. |
| 51 | 51 | * |
| 52 | 52 | * @param string $data |
| 53 | - * @return boolean|string |
|
| 53 | + * @return string|false |
|
| 54 | 54 | */ |
| 55 | 55 | private static function wordShift(&$data) |
| 56 | 56 | { |
@@ -61,6 +61,10 @@ discard block |
||
| 61 | 61 | return false; |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | + /** |
|
| 65 | + * @param string $command |
|
| 66 | + * @param string $expression |
|
| 67 | + */ |
|
| 64 | 68 | protected function handle($command, $expression) |
| 65 | 69 | { |
| 66 | 70 | switch (strtolower($command)) { |
@@ -120,6 +124,11 @@ discard block |
||
| 120 | 124 | return true; |
| 121 | 125 | } |
| 122 | 126 | |
| 127 | + /** |
|
| 128 | + * @param string $content |
|
| 129 | + * |
|
| 130 | + * @return string |
|
| 131 | + */ |
|
| 123 | 132 | public function preprocess($content) |
| 124 | 133 | { |
| 125 | 134 | $this->stack = array(); |
@@ -127,6 +136,11 @@ discard block |
||
| 127 | 136 | return $this->parseContent($content); |
| 128 | 137 | } |
| 129 | 138 | |
| 139 | + /** |
|
| 140 | + * @param string $filename |
|
| 141 | + * |
|
| 142 | + * @return string |
|
| 143 | + */ |
|
| 130 | 144 | public function preprocessFile($filename) |
| 131 | 145 | { |
| 132 | 146 | return $this->preprocess(file_get_contents($filename)); |
@@ -65,6 +65,9 @@ |
||
| 65 | 65 | } |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | + /** |
|
| 69 | + * @param string $file |
|
| 70 | + */ |
|
| 68 | 71 | public function parse($file, Array $dirs = array(), Array $defines = array()) |
| 69 | 72 | { |
| 70 | 73 | $this->dirs = $this->common_dirs; |
@@ -153,9 +153,9 @@ |
||
| 153 | 153 | $commandLineNumber = $lineNumber; |
| 154 | 154 | } elseif ($command) { |
| 155 | 155 | if ($lineNumber < count($commentLines) - 1) { |
| 156 | - $data.= ' ' . $line; |
|
| 156 | + $data .= ' ' . $line; |
|
| 157 | 157 | } else { |
| 158 | - $data.= preg_replace('~\s*\**\/\s*$~', '', $line); |
|
| 158 | + $data .= preg_replace('~\s*\**\/\s*$~', '', $line); |
|
| 159 | 159 | } |
| 160 | 160 | } |
| 161 | 161 | } |
@@ -102,7 +102,7 @@ |
||
| 102 | 102 | * Get the first word from a string and remove it from the string. |
| 103 | 103 | * |
| 104 | 104 | * @param string $data |
| 105 | - * @return boolean|string |
|
| 105 | + * @return string|false |
|
| 106 | 106 | */ |
| 107 | 107 | private static function wordShift(&$data) |
| 108 | 108 | { |
@@ -50,6 +50,9 @@ discard block |
||
| 50 | 50 | return $this->parent; |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | + /** |
|
| 54 | + * @param string $classname |
|
| 55 | + */ |
|
| 53 | 56 | protected function getParentClass($classname) |
| 54 | 57 | { |
| 55 | 58 | if (is_a($this, $classname)) { |
@@ -82,7 +85,7 @@ discard block |
||
| 82 | 85 | } |
| 83 | 86 | |
| 84 | 87 | /** |
| 85 | - * @return array |
|
| 88 | + * @return string[] |
|
| 86 | 89 | */ |
| 87 | 90 | public function toArray() |
| 88 | 91 | { |
@@ -143,7 +146,7 @@ discard block |
||
| 143 | 146 | /** |
| 144 | 147 | * Shifts the first word off a text line and returns it |
| 145 | 148 | * @param string $data |
| 146 | - * @return string|bool Either the first word or false if no more words available |
|
| 149 | + * @return string|false Either the first word or false if no more words available |
|
| 147 | 150 | */ |
| 148 | 151 | public static function wordShift(&$data) |
| 149 | 152 | { |
@@ -157,7 +160,7 @@ discard block |
||
| 157 | 160 | /** |
| 158 | 161 | * Splits a text line in all it's words |
| 159 | 162 | * @param string $data |
| 160 | - * @return string |
|
| 163 | + * @return string[] |
|
| 161 | 164 | */ |
| 162 | 165 | public static function wordSplit($data) |
| 163 | 166 | { |
@@ -14,6 +14,9 @@ |
||
| 14 | 14 | class Error extends Response |
| 15 | 15 | { |
| 16 | 16 | |
| 17 | + /** |
|
| 18 | + * @param string $description |
|
| 19 | + */ |
|
| 17 | 20 | public function __construct(AbstractObject $parent = null, $code, $description = null) |
| 18 | 21 | { |
| 19 | 22 | parent::__construct($parent, $code, null, $description); |
@@ -62,13 +62,16 @@ |
||
| 62 | 62 | |
| 63 | 63 | /** |
| 64 | 64 | * Return true if the parameter is of type 'formData' |
| 65 | - * @return type |
|
| 65 | + * @return boolean |
|
| 66 | 66 | */ |
| 67 | 67 | public function isForm() |
| 68 | 68 | { |
| 69 | 69 | return $this->in === 'form'; |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | + /** |
|
| 73 | + * @param string $in |
|
| 74 | + */ |
|
| 72 | 75 | public function __construct(AbstractObject $parent, $in, $data, $required = false) |
| 73 | 76 | { |
| 74 | 77 | parent::__construct($parent); |
@@ -47,6 +47,10 @@ |
||
| 47 | 47 | |
| 48 | 48 | //private $security; |
| 49 | 49 | |
| 50 | + /** |
|
| 51 | + * @param string $host |
|
| 52 | + * @param string $basePath |
|
| 53 | + */ |
|
| 50 | 54 | public function __construct($host = null, $basePath = null) |
| 51 | 55 | { |
| 52 | 56 | parent::__construct(null); |
@@ -184,7 +184,7 @@ |
||
| 184 | 184 | } |
| 185 | 185 | |
| 186 | 186 | if (!isset($this->Paths[$path])) { |
| 187 | - $this->Paths[$path] = new Path($this, $Tag ? : $this->defaultTag); |
|
| 187 | + $this->Paths[$path] = new Path($this, $Tag ?: $this->defaultTag); |
|
| 188 | 188 | } |
| 189 | 189 | return $this->Paths[$path]; |
| 190 | 190 | |
@@ -37,6 +37,9 @@ |
||
| 37 | 37 | $this->parseDefinition($definition); |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | + /** |
|
| 41 | + * @param string $definition |
|
| 42 | + */ |
|
| 40 | 43 | abstract protected function parseDefinition($definition); |
| 41 | 44 | |
| 42 | 45 | /** |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | /** |
| 74 | 74 | * @param string $file |
| 75 | 75 | * @param string[] $dirs |
| 76 | - * @return Php\Entity\Statement[] |
|
| 76 | + * @return Statement[] |
|
| 77 | 77 | */ |
| 78 | 78 | private function parseTextFile($file, $dirs) |
| 79 | 79 | { |
@@ -82,8 +82,8 @@ discard block |
||
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | /** |
| 85 | - * @param string $file |
|
| 86 | 85 | * @param string[] $dirs |
| 86 | + * @param string $text |
|
| 87 | 87 | * @return Php\Entity\Statement[] |
| 88 | 88 | */ |
| 89 | 89 | private function parseText($text, $dirs) |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | |
| 158 | 158 | $stacktrace = array(); |
| 159 | 159 | foreach ($stack as $object) { |
| 160 | - $stacktrace[] = (string)$object; |
|
| 160 | + $stacktrace[] = (string) $object; |
|
| 161 | 161 | } |
| 162 | 162 | $messages[] = join(", \n", $stacktrace); |
| 163 | 163 | |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | break; |
| 175 | 175 | |
| 176 | 176 | case self::FORMAT_JSON_PRETTY: |
| 177 | - $flags = (defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : 0); // Since PHP 5.4.0 |
|
| 177 | + $flags = (defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : 0); // Since PHP 5.4.0 |
|
| 178 | 178 | $output = json_encode($output, $flags); |
| 179 | 179 | break; |
| 180 | 180 | |