theseer / phpdox

Documentation generator for PHP Code using standard technology (SRC, DOCBLOCK, XML and XSLT)
http://phpdox.de
Other
599 stars 121 forks source link

Error in Generator #284

Closed Khorsa closed 6 years ago

Khorsa commented 8 years ago

Generator has an error of public/private/protection attribute detection in files: \src\generator\project\objects\MethodObject.php \src\generator\project\objects\MemberObject.php

    public function isPublic() {
        return $this->node->getAttribute('visibility', 'public') == 'public';
    }
    public function isPrivate() {
        return $this->node->getAttribute('visibility', 'public') == 'private';
    }
    public function isProtected() {
        return $this->node->getAttribute('visibility', 'public') == 'protected';
    }
theseer commented 8 years ago

Actually, this was not a bug. The detection logic is correct.

theseer commented 8 years ago

For clarification: The "public" in the getAttribute() is the default in case the attribute is not set. That's correct, since PHP by default considers things public.

Khorsa commented 8 years ago

Yes, i'm sorry - it was wrong place for error )) May be, it is here:

Application.php [236]: $generator->run( new \TheSeer\phpDox\Generator\Project( $srcDir, $pconfig->getWorkDirectory() ) );

Generator.php [135]: public function run(Project $project, $publicOnly = FALSE) {

($publicOnly == TRUE) will never recieve by Generator from Application

theseer commented 8 years ago

That indeed looks more like a problem.