DefinitionList hasMethod fix

Call to child definition only if it has given class

If first element in list is BuilderDefinition and it has not given class then it will raise exception regardless of next definitions.


        $builderDefinition = new BuilderDefinition();
        
        // some builder definition initialization

        $definitionClass = new ClassDefinition('foo');
        $definitionClass->addMethod('doFoo');

        $definitionList = new DefinitionList(array($builderDefinition, $definitionClass));
       
        $definitionList->hasMethod('foo', 'doFoo')