Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Generator #284

Closed
Khorsa opened this issue Aug 31, 2016 · 4 comments
Closed

Error in Generator #284

Khorsa opened this issue Aug 31, 2016 · 4 comments

Comments

@Khorsa
Copy link

Khorsa commented Aug 31, 2016

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 added a commit that referenced this issue Aug 31, 2016
This reverts commit f9c66a6.
@theseer
Copy link
Owner

theseer commented Aug 31, 2016

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

@theseer
Copy link
Owner

theseer commented Aug 31, 2016

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
Copy link
Author

Khorsa commented Aug 31, 2016

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
Copy link
Owner

theseer commented Aug 31, 2016

That indeed looks more like a problem.

@theseer theseer reopened this Aug 31, 2016
@theseer theseer closed this as completed in f57d956 Jan 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants