zendframework / zend-code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Check that two MethodGenerator instances hold metadata for methods with the same signature

petr-buchin opened this issue · comments

Suppose I have two MethodGenerator instances - $methodA and $methodB.
Does this library provide a way to check, whether methods, that might be generated by $methodA and $methodB will have the same signature?
By the same signature I mean identical method names, same params with same type hints and same return types.
I thought there might be method like MethodGenerator::hasSameSignature(MethodGenerator $method) but I don't see anything like that in the class API.

I think it would be a very helpful feature, since for decorating class methods it's necessary to check that generated method has the same signature as existing one.

This repository has been closed and moved to laminas/laminas-code; a new issue has been opened at laminas/laminas-code#14.