Skip to content

Commit

Permalink
change is_a to instanceof
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikbjorn committed Dec 14, 2011
1 parent 3eda845 commit bc0ec33
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Request/ParamConverter/ParamConverterManager.php
Expand Up @@ -41,9 +41,10 @@ public function apply(Request $request, $configurations)


foreach ($configurations as $configuration) { foreach ($configurations as $configuration) {
// If the value is already an instance of the class we are trying to convert it into // If the value is already an instance of the class we are trying to convert it into
// we should continue as no convertion is required `is_a` was un-deprecated in 5.3 // we should continue as no convertion is required
$value = $request->attributes->get($configuration->getName()); $value = $request->attributes->get($configuration->getName());
if (is_object($value) && is_a($value, $configuration->getClass())) { $className = $configuration->getClass();
if (is_object($value) && $value instanceof $className) {
continue; continue;
} }


Expand Down

0 comments on commit bc0ec33

Please sign in to comment.