Completed
Push — master ( f728fb...890a42 )
by Martijn
02:07
created
SwaggerGen/Swagger/Type/StringType.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -151,6 +151,9 @@
 block discarded – undo
151 151
 		));
152 152
 	}
153 153
 
154
+	/**
155
+	 * @return string
156
+	 */
154 157
 	protected function validateDefault($value)
155 158
 	{
156 159
 		if (empty($value)) {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@
 block discarded – undo
154 154
 	protected function validateDefault($value)
155 155
 	{
156 156
 		if (empty($value)) {
157
-			throw new \SwaggerGen\Exception("Empty {$this->type} default");
157
+			throw new \SwaggerGen\Exception("empty {$this->type} default");
158 158
 		}
159 159
 
160 160
 		if (!empty($this->enum) && !in_array($value, $this->enum)) {
Please login to merge, or discard this patch.
SwaggerGen/Swagger/Schema.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
 			// Internal type if type known and not overwritten by definition
73 73
 			if (isset(self::$classTypes[$format])) {
74 74
 				$type = self::$classTypes[$format];
75
-				$class = "SwaggerGen\\Swagger\\Type\\{$type}Type";
75
+				$class = "SwaggerGen\\Swagger\\Type\\{$type}type";
76 76
 				$this->type = new $class($this, $definition);
77 77
 			} else {
78 78
 				$this->type = new Type\ReferenceObjectType($this, $definition);
Please login to merge, or discard this patch.
SwaggerGen/Swagger/Type/AbstractRegexType.php 1 patch
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
 		$match = array();
46 46
 		if (preg_match(self::REGEX_START . self::REGEX_FORMAT . self::REGEX_DEFAULT_START . $this->regex . self::REGEX_DEFAULT_END . self::REGEX_END, $definition, $match) !== 1) {
47
-			throw new \SwaggerGen\Exception("Unparseable {$this->type} definition: '{$definition}'");
47
+			throw new \SwaggerGen\Exception("unparseable {$this->type} definition: '{$definition}'");
48 48
 		}
49 49
 
50 50
 		if (strtolower($match[1] !== $this->type)) {
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 		$value = parent::validateDefault($value);
61 61
 		
62 62
 		if (preg_match('/' . $this->pattern . '/', $value) !== 1) {
63
-			throw new \SwaggerGen\Exception("Invalid {$this->type} default value");
63
+			throw new \SwaggerGen\Exception("invalid {$this->type} default value");
64 64
 		}
65 65
 		
66 66
 		return $value;
Please login to merge, or discard this patch.
SwaggerGen/Swagger/Swagger.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -199,7 +199,8 @@  discard block
 block discarded – undo
199 199
 					$this->tags[] = $Tag;
200 200
 				}
201 201
 
202
-				if ($command === 'api') { // backwards compatibility
202
+				if ($command === 'api') {
203
+// backwards compatibility
203 204
 					$this->defaultTag = $Tag;
204 205
 				}
205 206
 				return $Tag;
@@ -330,7 +331,8 @@  discard block
 block discarded – undo
330 331
 	 * @param string $name
331 332
 	 * @return boolean
332 333
 	 */
333
-	public function hasDefinition($name) {
334
+	public function hasDefinition($name)
335
+	{
334 336
 		return isset($this->definitions[$name]);
335 337
 	}
336 338
 	
Please login to merge, or discard this patch.