Completed
Pull Request — master (#33)
by Martijn
02:27
created
SwaggerGen/SwaggerGen.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -64,11 +64,17 @@
 block discarded – undo
64 64
 		$this->typeRegistry = $typeRegistry;
65 65
 	}
66 66
 
67
+	/**
68
+	 * @param string $name
69
+	 */
67 70
 	public function define($name, $value = 1)
68 71
 	{
69 72
 		$this->defines[$name] = $value;
70 73
 	}
71 74
 
75
+	/**
76
+	 * @param string $name
77
+	 */
72 78
 	public function undefine($name)
73 79
 	{
74 80
 		unset($this->defines[$name]);
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/TypeRegistry.php 1 patch
Braces   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -22,8 +22,8 @@  discard block
 block discarded – undo
22 22
  * @copyright  2014-2017 Martijn van der Lee
23 23
  * @license    https://opensource.org/licenses/MIT MIT
24 24
  */
25
-class TypeRegistry
26
-{
25
+class TypeRegistry
26
+{
27 27
 
28 28
 	/**
29 29
 	 * Map of format-name => class-name
@@ -37,10 +37,10 @@  discard block
 block discarded – undo
37 37
 	 * 
38 38
 	 * @param type $classname
39 39
 	 */
40
-	public function add($classname)
41
-	{
42
-		if (is_subclass_of($classname, '\\SwaggerGen\\Swagger\\Type\\AbstractType', true)) {
43
-			foreach ($classname::getFormats() as $format) {
40
+	public function add($classname)
41
+	{
42
+		if (is_subclass_of($classname, '\\SwaggerGen\\Swagger\\Type\\AbstractType', true)) {
43
+			foreach ($classname::getFormats() as $format) {
44 44
 				$this->formats[$format] = $classname;
45 45
 			}
46 46
 		}
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
 	 * 
52 52
 	 * @param string $name
53 53
 	 */
54
-	public function remove($name)
55
-	{
54
+	public function remove($name)
55
+	{
56 56
 		$this->formats[$name] = null;
57 57
 	}
58 58
 
@@ -61,8 +61,8 @@  discard block
 block discarded – undo
61 61
 	 * 
62 62
 	 * @return bool
63 63
 	 */
64
-	public function has($name)
65
-	{
64
+	public function has($name)
65
+	{
66 66
 		return !empty($this->formats[$name]);
67 67
 	}
68 68
 
@@ -71,8 +71,8 @@  discard block
 block discarded – undo
71 71
 	 * 
72 72
 	 * @return null|string
73 73
 	 */
74
-	public function get($name)
75
-	{
74
+	public function get($name)
75
+	{
76 76
 		return !empty($this->formats[$name]) ? $this->formats[$name] : null;
77 77
 	}
78 78
 
Please login to merge, or discard this patch.