Skip to content

Commit

Permalink
Adds the missing backward-slashes in front of InvalidArgumentException
Browse files Browse the repository at this point in the history
  • Loading branch information
terwey committed Feb 24, 2014
1 parent 088870c commit 1c0fb3c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions newscoop/library/Newscoop/Services/InputManipulator.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public static function getVar(array $parameters = array())
return true;
}
if (!$parameters['ignoreErrors']) {
throw new InvalidArgumentException('"'.$parameters['variableName'].'" is not set');
throw new \InvalidArgumentException('"'.$parameters['variableName'].'" is not set');
}

return $parameters['defaultValue'];
Expand All @@ -111,7 +111,7 @@ public static function getVar(array $parameters = array())
case 'int':
if (!is_numeric($parameters['inputObject'][$parameters['variableName']])) {
if (!$parameters['ignoreErrors']) {
throw new InvalidArgumentException('"'.$parameters['variableName'].'" Incorrect type. Expected type: "'.$parameters['variableType'].'" got "'.gettype($parameters['inputObject'][$parameters['variableName']]).'" ("'.$parameters['inputObject'][$parameters['variableName']].'") instead.');
throw new \InvalidArgumentException('"'.$parameters['variableName'].'" Incorrect type. Expected type: "'.$parameters['variableType'].'" got "'.gettype($parameters['inputObject'][$parameters['variableName']]).'" ("'.$parameters['inputObject'][$parameters['variableName']].'") instead.');
}

return (int) $parameters['defaultValue'];
Expand All @@ -120,7 +120,7 @@ public static function getVar(array $parameters = array())
case 'string':
if (!is_string($parameters['inputObject'][$parameters['variableName']])) {
if (!$parameters['ignoreErrors']) {
throw new InvalidArgumentException('"'.$parameters['variableName'].'" Incorrect type. Expected type: "'.$parameters['variableType'].'" got "'.gettype($parameters['inputObject'][$parameters['variableName']]).'" ("'.$parameters['inputObject'][$parameters['variableName']].'") instead.');
throw new \InvalidArgumentException('"'.$parameters['variableName'].'" Incorrect type. Expected type: "'.$parameters['variableType'].'" got "'.gettype($parameters['inputObject'][$parameters['variableName']]).'" ("'.$parameters['inputObject'][$parameters['variableName']].'") instead.');
}

return $parameters['defaultValue'];
Expand Down

0 comments on commit 1c0fb3c

Please sign in to comment.