laminas / laminas-server

Create Reflection-based RPC servers
https://docs.laminas.dev/laminas-server/
BSD 3-Clause "New" or "Revised" License
25 stars 13 forks source link

QA: PHPDocs improvements #4

Closed michalbundyra closed 4 years ago

michalbundyra commented 4 years ago
Q A
QA yes

Description

Improve PHPDocs in the library.

michalbundyra commented 4 years ago

After reviewing it, I've decided to close it, as I am noto honestly sure if it's gonna work as expected. Reflection can read parent docblock, but in my opinion resolving param types is not working properly. Unless there is some assumption somewhere that we should use always FQCN in docblock to get it working properly.

For now, if we have:

namespace Laminas\Server\Something;

class Node
{
    /**
     * @param self $node
     * @param Node $parent
     */
    public function abc(self $node, self $parent) { /*...*/ }
}

we get types:

but I believe we should get \Laminas\Server\Something\Node for both of them.