fixed check for wrong class in FormTypeParser, fixed CS in ParserInterface

This commit is contained in:
Evan Villemez 2012-07-23 13:27:58 -04:00
parent 06e3a2256b
commit b2a2426f76
2 changed files with 3 additions and 3 deletions

View File

@ -47,7 +47,7 @@ class FormTypeParser implements ParserInterface
{ {
if (is_string($class) && class_exists($class)) { if (is_string($class) && class_exists($class)) {
$ref = new \ReflectionClass($class); $ref = new \ReflectionClass($class);
return ($ref->implementsInterface('Nelmio\ApiDocBundle\Parser\ParserInterface')); return ($ref->implementsInterface('Symfony\Component\Form\FormTypeInterface'));
} }
return false; return false;

View File

@ -22,7 +22,7 @@ interface ParserInterface
* @param string $item The string name of the class to parse. * @param string $item The string name of the class to parse.
* @return boolean * @return boolean
*/ */
function supportsClass($className); public function supportsClass($className);
/** /**
* Returns an array of class property metadata where each item is a key (the property name) and * Returns an array of class property metadata where each item is a key (the property name) and
@ -35,6 +35,6 @@ interface ParserInterface
* @param string $class The string name of the class to parse. * @param string $class The string name of the class to parse.
* @return array * @return array
*/ */
function parse($className); public function parse($className);
} }