Completed
Push — master ( cf6730...8c5e7c )
by Martijn
02:31
created
SwaggerGen/Parser/AbstractPreprocessor.php 1 patch
Doc Comments   +15 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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));
Please login to merge, or discard this patch.
SwaggerGen/Parser/Php/Parser.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -65,6 +65,9 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -153,9 +153,9 @@
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
SwaggerGen/Parser/Text/Parser.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
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
 	{
Please login to merge, or discard this patch.
SwaggerGen/Swagger/AbstractObject.php 1 patch
Doc Comments   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,6 +50,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 	{
Please login to merge, or discard this patch.
SwaggerGen/Swagger/Error.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -14,6 +14,9 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
SwaggerGen/Swagger/Parameter.php 1 patch
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,13 +62,16 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
SwaggerGen/Swagger/Swagger.php 2 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -47,6 +47,10 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -184,7 +184,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
SwaggerGen/Swagger/Type/AbstractType.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -37,6 +37,9 @@
 block discarded – undo
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
 	/**
Please login to merge, or discard this patch.
SwaggerGen/SwaggerGen.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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)
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.