Passed
Push — master ( 86c8f0...871627 )
by Benjamin
03:46
created
src/netfocusinc/argh/ParameterCollection.php 1 patch
Braces   +8 added lines, -11 removed lines patch added patch discarded remove patch
@@ -146,8 +146,7 @@  discard block
 block discarded – undo
146 146
 			$index = $this->map[$key];
147 147
 			
148 148
 			return $this->parameters[$index];
149
-		}
150
-		else
149
+		} else
151 150
 		{
152 151
 			throw new ArghException('Parameter \'' . $key . '\' not in collection');
153 152
 		}	
@@ -198,9 +197,10 @@  discard block
 block discarded – undo
198 197
 			$this->map[$param->getName()] = count($this->parameters)-1;
199 198
 			
200 199
 			// Map the new parameter's 'flag' to its corresponding index in the $parameters array
201
-			if(!empty($param->getFlag())) $this->map[$param->getFlag()] = count($this->parameters)-1;
202
-		}
203
-		else
200
+			if(!empty($param->getFlag())) {
201
+				$this->map[$param->getFlag()] = count($this->parameters)-1;
202
+			}
203
+		} else
204 204
 		{
205 205
 			throw(new ArghException(__CLASS__ . ': Parameter \'' . $param->getName() . '\' cannot be redefined.'));
206 206
 		}
@@ -232,22 +232,19 @@  discard block
 block discarded – undo
232 232
 				{
233 233
 					// Call VariableParameters::addValue() method
234 234
 					$this->parameters[$this->map[$a->getKey()]]->addValue($a->getValue());
235
-				}
236
-				else if( null !== $this->parameters[$this->map[$a->getKey()]]->getValue() )
235
+				} else if( null !== $this->parameters[$this->map[$a->getKey()]]->getValue() )
237 236
 				{
238 237
 					//
239 238
 					// Do NOT allow a Parameter's value to be redefined
240 239
 					//
241 240
 					
242 241
 					throw(new ArghException(__CLASS__ . ': Parameter \'' . $a->getKey() . '\' value cannot be redefined.'));
243
-				}
244
-				else
242
+				} else
245 243
 				{
246 244
 					// Set Parameter value	
247 245
 					$this->parameters[$this->map[$a->getKey()]]->setValue($a->getValue());
248 246
 				}
249
-			}
250
-			else
247
+			} else
251 248
 			{
252 249
 				throw(new ArghException(__CLASS__ . ': Cannot merge Argument \'' . $a->getKey() . '\'. Parameter not defined.'));
253 250
 			}
Please login to merge, or discard this patch.
src/netfocusinc/argh/Language.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -253,8 +253,7 @@
 block discarded – undo
253 253
 		{
254 254
 			// Create an array of Rules
255 255
 			$this->rules = array();
256
-		}
257
-		catch(\Exception $e)
256
+		} catch(\Exception $e)
258 257
 		{
259 258
 			throw($e);
260 259
 		}
Please login to merge, or discard this patch.