1111
1212namespace FOS \RestBundle \Request ;
1313
14- use FOS \RestBundle \Util \Codes ;
1514use FOS \RestBundle \Controller \Annotations \QueryParam ;
1615use FOS \RestBundle \Controller \Annotations \Param ;
1716use FOS \RestBundle \Controller \Annotations \RequestParam ;
1817use Doctrine \Common \Util \ClassUtils ;
1918use Symfony \Component \HttpFoundation \Request ;
2019use Symfony \Component \HttpKernel \Exception \BadRequestHttpException ;
21- use Symfony \Component \HttpKernel \Exception \HttpException ;
2220
2321/**
2422 * Helper to validate parameters of the active request.
@@ -153,7 +151,7 @@ public function get($name, $strict = null)
153151 * @param string $param param to clean
154152 * @param boolean $strict is strict
155153 *
156- * @throws \RuntimeException
154+ * @throws BadRequestHttpException
157155 * @return string
158156 */
159157 public function cleanParamWithRequirements (Param $ config , $ param , $ strict )
@@ -167,7 +165,9 @@ public function cleanParamWithRequirements(Param $config, $param, $strict)
167165 if ($ strict ) {
168166 $ paramType = $ config instanceof QueryParam ? 'Query ' : 'Request ' ;
169167
170- throw new BadRequestHttpException ($ paramType . " parameter value ' $ param', does not match requirements ' {$ config ->requirements }' " );
168+ throw new BadRequestHttpException (
169+ $ paramType . " parameter value ' $ param', does not match requirements ' {$ config ->requirements }' "
170+ );
171171 }
172172
173173 return null === $ default ? '' : $ default ;
0 commit comments