Completed
Push — master ( 55e75e...f90246 )
by Martijn
01:38
created
SwaggerGen/Swagger/Type/ObjectType.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -63,8 +63,8 @@  discard block
 block discarded – undo
63 63
 					if (preg_match(self::REGEX_PROP_START . self::REGEX_PROP_NAME . self::REGEX_PROP_REQUIRED . self::REGEX_PROP_ASSIGN . self::REGEX_PROP_DEFINITION . self::REGEX_PROP_END, $property, $prop_match) !== 1) {
64 64
 						throw new \SwaggerGen\Exception("Unparseable property definition: '{$property}'");
65 65
 					}
66
-                    $this->properties[$prop_match[1]] = new Property($this, $prop_match[3]);
67
-                    if ($prop_match[2] !== '!' && $prop_match[2] !== '?') {
66
+					$this->properties[$prop_match[1]] = new Property($this, $prop_match[3]);
67
+					if ($prop_match[2] !== '!' && $prop_match[2] !== '?') {
68 68
 						$this->required[$prop_match[1]] = true;
69 69
 					}
70 70
 				}
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 			// type name description...
104 104
 			case 'property':
105 105
 			case 'property?':
106
-            case 'property!':
106
+			case 'property!':
107 107
 				$definition = self::wordShift($data);
108 108
 				if (empty($definition)) {
109 109
 					throw new \SwaggerGen\Exception("Missing property definition");
@@ -114,18 +114,18 @@  discard block
 block discarded – undo
114 114
 					throw new \SwaggerGen\Exception("Missing property name: '{$definition}'");
115 115
 				}
116 116
 
117
-                unset($this->required[$name]);
117
+				unset($this->required[$name]);
118 118
 				$readOnly = null;
119
-                $propertySuffix = substr($command, -1);
120
-                if ($propertySuffix === '!') {
121
-                    $readOnly = true;
122
-                }
119
+				$propertySuffix = substr($command, -1);
120
+				if ($propertySuffix === '!') {
121
+					$readOnly = true;
122
+				}
123 123
 				else if ($propertySuffix !== '?') {
124 124
 					$this->required[$name] = true;
125 125
 				}
126 126
 
127 127
 				$this->mostRecentProperty = new Property($this, $definition, $data, $readOnly);
128
-                $this->properties[$name] = $this->mostRecentProperty;
128
+				$this->properties[$name] = $this->mostRecentProperty;
129 129
 				return $this;
130 130
 
131 131
 			case 'min':
Please login to merge, or discard this patch.
Braces   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	 * @return \SwaggerGen\Swagger\Type\AbstractType|boolean
99 99
 	 */
100 100
 	public function handleCommand($command, $data = null)
101
-	{		
101
+	{
102 102
 		switch (strtolower($command)) {
103 103
 			// type name description...
104 104
 			case 'property':
@@ -119,8 +119,7 @@  discard block
 block discarded – undo
119 119
                 $propertySuffix = substr($command, -1);
120 120
                 if ($propertySuffix === '!') {
121 121
                     $readOnly = true;
122
-                }
123
-				else if ($propertySuffix !== '?') {
122
+                } else if ($propertySuffix !== '?') {
124 123
 					$this->required[$name] = true;
125 124
 				}
126 125
 
Please login to merge, or discard this patch.