Completed
Push — master ( 7ba484...b7f8cd )
by Martijn
02:31
created
SwaggerGen/SwaggerGen.php 1 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.
SwaggerGen/Parser/Php/Preprocessor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
 									if (!$this->handle($match[1], $match[2]) && $this->getState()) {
59 59
 										$output .= $line;
60 60
 									} else {
61
-										$output .= str_replace('@'.$this->getPrefix(), '!'.$this->getPrefix(), $line);
61
+										$output .= str_replace('@' . $this->getPrefix(), '!' . $this->getPrefix(), $line);
62 62
 									}
63 63
 								} else {
64 64
 									$output .= $line;
Please login to merge, or discard this patch.
SwaggerGen/Parser/Php/Parser.php 1 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/Swagger/Type/ReferenceObjectType.php 2 patches
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -17,26 +17,26 @@
 block discarded – undo
17 17
 
18 18
 	protected function parseDefinition($definition)
19 19
 	{
20
-        $definition = self::trim($definition);
21
-
22
-        $match = array();
23
-        if (preg_match(self::REGEX_START . self::REGEX_FORMAT . self::REGEX_CONTENT . self::REGEX_RANGE . self::REGEX_DEFAULT . self::REGEX_END, $definition, $match) !== 1) {
24
-            throw new \SwaggerGen\Exception("Unparseable string definition: '{$definition}'");
25
-        }
26
-
27
-        $type = strtolower($match[1]);
28
-
29
-        $reference = null;
30
-        if ($type === 'refobject') {
31
-            if (isset($match[2]))
32
-                $reference = $match[2];
33
-        } else {
34
-            $reference = $match[1];
35
-        }
36
-
37
-        if (empty($reference)) {
38
-            throw new \SwaggerGen\Exception("Referenced object name missing: '{$definition}'");
39
-        }
20
+		$definition = self::trim($definition);
21
+
22
+		$match = array();
23
+		if (preg_match(self::REGEX_START . self::REGEX_FORMAT . self::REGEX_CONTENT . self::REGEX_RANGE . self::REGEX_DEFAULT . self::REGEX_END, $definition, $match) !== 1) {
24
+			throw new \SwaggerGen\Exception("Unparseable string definition: '{$definition}'");
25
+		}
26
+
27
+		$type = strtolower($match[1]);
28
+
29
+		$reference = null;
30
+		if ($type === 'refobject') {
31
+			if (isset($match[2]))
32
+				$reference = $match[2];
33
+		} else {
34
+			$reference = $match[1];
35
+		}
36
+
37
+		if (empty($reference)) {
38
+			throw new \SwaggerGen\Exception("Referenced object name missing: '{$definition}'");
39
+		}
40 40
 
41 41
 		$this->reference = $reference;
42 42
 	}
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,9 @@
 block discarded – undo
28 28
 
29 29
         $reference = null;
30 30
         if ($type === 'refobject') {
31
-            if (isset($match[2]))
32
-                $reference = $match[2];
31
+            if (isset($match[2])) {
32
+                            $reference = $match[2];
33
+            }
33 34
         } else {
34 35
             $reference = $match[1];
35 36
         }
Please login to merge, or discard this patch.
SwaggerGen/Swagger/Operation.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -35,6 +35,9 @@
 block discarded – undo
35 35
 		return $this->consumes;
36 36
 	}
37 37
 
38
+	/**
39
+	 * @param string $summary
40
+	 */
38 41
 	public function __construct(AbstractObject $parent, $summary = null, Tag $tag = null)
39 42
 	{
40 43
 		parent::__construct($parent);
Please login to merge, or discard this patch.