Completed
Push — master ( 1b74d9...fbc723 )
by Martijn
02:22
created
SwaggerGen/Swagger/Type/AbstractRegexType.php 1 patch
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
 		$match = array();
47 47
 		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) {
48
-			throw new \SwaggerGen\Exception("Unparseable {$this->format} definition: '{$definition}'");
48
+			throw new \SwaggerGen\Exception("unparseable {$this->format} definition: '{$definition}'");
49 49
 		}
50 50
 
51 51
 		if (strtolower($match[1] !== $this->format)) {
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 		$value = parent::validateDefault($value);
62 62
 		
63 63
 		if (preg_match('/' . $this->pattern . '/', $value) !== 1) {
64
-			throw new \SwaggerGen\Exception("Invalid {$this->format} default value");
64
+			throw new \SwaggerGen\Exception("invalid {$this->format} default value");
65 65
 		}
66 66
 		
67 67
 		return $value;
Please login to merge, or discard this patch.
SwaggerGen/Swagger/Type/StringType.php 1 patch
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 	{
162 162
 		if (empty($value)) {
163 163
 			$type = $this->format ?: ($this->enum ? 'enum' : 'string');
164
-			throw new \SwaggerGen\Exception("Empty {$type} default");
164
+			throw new \SwaggerGen\Exception("empty {$type} default");
165 165
 		}
166 166
 
167 167
 		if (!empty($this->enum) && !in_array($value, $this->enum)) {
@@ -170,12 +170,12 @@  discard block
 block discarded – undo
170 170
 
171 171
 		if ($this->maxLength !== null && mb_strlen($value) > $this->maxLength) {
172 172
 			$type = $this->format ?: ($this->enum ? 'enum' : 'string');
173
-			throw new \SwaggerGen\Exception("Default {$type} length beyond maximum: '{$value}'");
173
+			throw new \SwaggerGen\Exception("default {$type} length beyond maximum: '{$value}'");
174 174
 		}
175 175
 
176 176
 		if ($this->minLength !== null && mb_strlen($value) < $this->minLength) {
177 177
 			$type = $this->format ?: ($this->enum ? 'enum' : 'string');
178
-			throw new \SwaggerGen\Exception("Default {$type} length beyond minimum: '{$value}'");
178
+			throw new \SwaggerGen\Exception("default {$type} length beyond minimum: '{$value}'");
179 179
 		}
180 180
 
181 181
 		return $value;
Please login to merge, or discard this patch.
SwaggerGen/Swagger/Type/AbstractType.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -175,7 +175,7 @@
 block discarded – undo
175 175
 			return new $class($parent, $definition);
176 176
 		} elseif (isset(self::$classTypes[$format])) {
177 177
 			$type = self::$classTypes[$format];
178
-			$class = "\\SwaggerGen\\Swagger\\Type\\{$type}Type";
178
+			$class = "\\SwaggerGen\\Swagger\\Type\\{$type}type";
179 179
 			return new $class($parent, $definition);
180 180
 		} else {
181 181
 			return new ReferenceObjectType($parent, $definition);
Please login to merge, or discard this patch.
SwaggerGen/Swagger/Parameter.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
 			$this->Type = new $class($this, $definition);
112 112
 		} elseif (isset(self::$classTypes[$format])) {
113 113
 			$type = self::$classTypes[$format];
114
-			$class = "\\SwaggerGen\\Swagger\\Type\\{$type}Type";
114
+			$class = "\\SwaggerGen\\Swagger\\Type\\{$type}type";
115 115
 			$this->Type = new $class($this, $definition);
116 116
 		} else {
117 117
 			throw new \SwaggerGen\Exception("Type format not recognized: '{$format}'");
Please login to merge, or discard this patch.
SwaggerGen/Swagger/Type/ArrayType.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -159,6 +159,9 @@
 block discarded – undo
159 159
 								), parent::toArray()));
160 160
 	}
161 161
 
162
+	/**
163
+	 * @param string|null $items
164
+	 */
162 165
 	private function validateItems($items)
163 166
 	{
164 167
 		if (empty($items)) {
Please login to merge, or discard this patch.
SwaggerGen/Swagger/Type/IntegerType.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -140,6 +140,9 @@
 block discarded – undo
140 140
 		return __CLASS__;
141 141
 	}
142 142
 
143
+	/**
144
+	 * @param string|null $value
145
+	 */
143 146
 	private function validateDefault($value)
144 147
 	{
145 148
 		if (preg_match('~^-?\d+$~', $value) !== 1) {
Please login to merge, or discard this patch.
SwaggerGen/Swagger/Type/NumberType.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -131,6 +131,9 @@
 block discarded – undo
131 131
 		return __CLASS__;
132 132
 	}
133 133
 
134
+	/**
135
+	 * @param string|null $value
136
+	 */
134 137
 	private function validateDefault($value)
135 138
 	{
136 139
 		if (preg_match('~^-?(?:\\d*\\.?\\d+|\\d+\\.\\d*)$~', $value) !== 1) {
Please login to merge, or discard this patch.