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

Cake\View\ViewBuilder::setClassName(null) docblock Update Needed #12805

Closed
1 of 3 tasks
challgren opened this issue Dec 12, 2018 · 1 comment
Closed
1 of 3 tasks

Cake\View\ViewBuilder::setClassName(null) docblock Update Needed #12805

challgren opened this issue Dec 12, 2018 · 1 comment
Labels
Milestone

Comments

@challgren
Copy link
Contributor

This is a (multiple allowed):

  • bug

  • enhancement

  • feature-discussion (RFC)

  • CakePHP Version: 3.6.14.

  • Platform and Target: PHP 7.2.12, PHPStan 0.10.6.

What you did

My code contains a simple $this->viewBuilder()->setClassName(null); in a controller to not render a view.

What happened

PHPStan emits an error Parameter #1 $name of method Cake\View\ViewBuilder::setClassName() expects string, null given.

What you expected to happen

No error to be emitted since the ViewBuilder->$_className is declared as @var string|null the docblock for ViewBuilder::setName($name) should be updated with @param string|null $name The name of the view.

@dereuromark dereuromark added this to the 3.7.1 milestone Dec 12, 2018
@challgren
Copy link
Contributor Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants